;+ ; NAME: ; PlotPrep ; PURPOSE: ; CALLING SEQUENCE: FUNCTION PlotPrep, xin, yin, nvalid, $ oplotx = oplotx , $ newyaxis = newyaxis , $ yaxis = yaxis , $ xrange = xrange , $ yrange = yrange , $ ystyle = ystyle , $ ynozero = ynozero , $ ylog = ylog , $ changecolor = changecolor, $ ycolor = ycolor , $ silent = silent , $ _extra = _extra , $ ; Output xpnt = xpnt , $ ypnt = ypnt , $ npnt = npnt ; INPUTS: ; xin one-dimensional abcissa array ; To plot a time axis (using TimeXAxis) xin must be ; an array of time structures, or a string array that ; is converted to time structures with TimeSet. ; yin one-dimensional ordinate array ; must have the same size as xin ; nvalid one-dimensional array identifying the array elements ; to be plotted as: ; - an array of indices e.g. [0,1,2,7,8,9,10] ; - a boolean array (containing only values 0 or 1) ; of same size as xin and yin, e.g. [1,1,1,0,0,0,0,1,1,1,1] ; if nvalid is absent, all finite ordinate values are plotted ; OPTIONAL INPUT PARAMETERS: ; /oplotx if not set, then a new plot (with a new x-axis) is started) ; (implicitly /newyaxis is set and yaxis=-1, i.e. a y-axis ; will be drawn on the left) ; if set, then the arrays are overplotted on a previous plot ; (the keywords /newyaxis and yaxis=yaxis can be used to add ; additional y axes, if necessary) ; /newyaxis adds a new yaxis ; (if /oplotx is NOT set, then /newyaxis is assumed set) ; yaxis=yaxis controls the position of a new y axis; yaxis is used ; only if /newaxis is set ; yaxis=-1 : y-axis on left (default) ; yaxis=0 : y-axis on right ; 0