This page was created by the IDL library routine
mk_html_help
. For more information on
this routine, refer to the IDL Online Help Navigator
or type:
? mk_html_help
at the IDL command line prompt.
Last modified: Tue Dec 20 11:48:26 2005.
NAME: ERRPLOT_X -- Plot error bars IN THE X DIRECTION over a previously drawn plot. PURPOSE: Plot error bars IN THE X DIRECTION over a previously drawn plot. CATEGORY: J6 - plotting, graphics, one dimensional. CALLING SEQUENCE: ERRPLOT_X, Low, High, Y INPUTS: Low: A vector of lower estimates, equal to Xdata - error. High: A vector of upper estimates, equal to Xdata + error. Y: A vector containing the ordinate (Y-values). KEYWORD Parameters: WIDTH: The width of the error bars, in units of the width of the plot area. The default is 1% of plot width. OUTPUTS: None. COMMON BLOCKS: None. SIDE EFFECTS: An overplot is produced. RESTRICTIONS: Logarithmic restriction removed. PROCEDURE: Error bars are drawn for each element. EXAMPLES: To plot symmetrical error bars where X = data values and ERR = symmetrical error estimates, enter: PLOT, X, Y ;Plot data ERRPLOT_x, X-ERR, X+ERR, Y ;Overplot error bars. If error estimates are non-symetrical, enter: PLOT, X, Y ERRPLOT, Upper, Lower, Y ;Where Upper & Lower are bounds. MODIFICATION HISTORY: DMS, RSI, June, 1983. Joe Zawodney, LASP, Univ of Colo., March, 1986. Removed logarithmic restriction. DMS, March, 1989. Modified for Unix IDL. KDB, March, 1997. Modified to used !p.noclip RJF, Nov, 1997. Removed unnecessary print statement Disable and re-enable the symbols for the bars DMS, Dec, 1998. Use device coordinates. Cleaned up logic. Carl Heiles nov 26 2001. Pirated idl's errplot, which does the y direction, and changed it to do the x direction.
(See /dzd2/heiles/idl/gen/plotting/errplot_x.pro)
NAME: GRAPHSELECT PURPOSE: Select points within an area of a graph defined by the cursor. Return the indices of these points. CALLING SEQUENCE: Result = GRAPHSELECT(X, Y [,N][,/NOFILL][,/RESTORE]) INPUTS: X: array of x values on the plot. Y: array of y values on the plot. KEYWORD PARAMETERS: /NOFILL - Set this keyword to inhibit filling of the defined region on completion. /RESTORE - Set this keyword to restore the display to its original state upon completion. N.B., this doesn't do such a great job, but that's DEFROI's fault! OUTPUTS: Returns the indices of the points that are within the selected area. OPTIONAL OUTPUTS: N: the number of points inside the selected area. COMMON BLOCKS: None. SIDE EFFECTS: The area selected is drawn on the plot window and, unless the /NOFILL keyword is set, filled in. RESTRICTIONS: Only works for interactive, pixel oriented devices with a cursor. Selected region must have less than 1001 vertices. Can only be used in most recently created window. PROCEDURES CALLED: DEFROI() EXAMPLE: Create some x and y values... IDL> x = indgen(20) IDL> y = randomn(seed,20) Plot the points... IDL> plot, x, y, psym=4 Select a region of the plot and return the indices of these points... IDL> indx = graphselect(x,y,n_indx) NOTES: If you are trying to obtain the indices of an image, you need to pass in arrays of x and y values, e.g., they should be arrays of size N_elements(x) by N_elements(y) in which the x array is repeated in N_elements(y) rows and the y array is repeated in N_elements(x) columns. The routine will return the indices of points within the selected polygon. MODIFICATION HISTORY: Written by Carl Heiles. 12 Sep 1998. Souped up by Tim Robishaw 19 Aug 2003.
(See /dzd2/heiles/idl/gen/plotting/graphselect.pro)
NAME: hor -- set horizontal scale for all plots
(See /dzd2/heiles/idl/gen/plotting/hor.pro)
NAME: POINTSINSIDE -- Find points inside curve that has been plotted on the terminal window. PURPOSE: Find the indices of points inside a defined curve that has been plotted on the terminal window. CALLING SEQUENCE: POINTSINSIDE, x, y, xcurve, ycurve, indx INPUTS: X: the array of x-values of the points on the plot. Y: the array of y-values of the points on the plot. XCURVE: the array of x-values of the points that define the curve. YCURVE: the array of y-values of the points that define the curve. OUTPUTS: INDX: the indices of x and y that lie within the curve defined by XCURVE, YCURVE. indx is equivalent to what you get with the "where" function. RESTRICTIONS: You cannot use this on any plot except for the most recently defined plot. That is, if you made a plot (nr 1) and then another one (nr 2), you can use it on nr 2 but not on nr 1. EXAMPLE: You made a contour plot and want to find all points within the contour. FIRST, get the vertices of the contour plot: CONTOUR, delchisq_n, dela0_v, dela1_v, levels=[ 2.3], $ xtit='!4d!Xa!D0!N', ytit= '!4d!Xa!D1!N' , $ xra = [-1.5,1.5], /xsty, yra=[-0.6,0.6], /ysty $ , path_xy=path_xy, /path_data_coords, path_info=path_info NEXT, get rid of the points in path_xy that are garbage at the beginning: xypath = fltarr( (path_info.n)[1], (path_info.n)[1]) for nr=0,1 do xypath[ nr,*] = path_xy[ nr, (path_info.offset)[1]:*] FINALLY, to find the points inside the 2.3 contour, call this routine: POINTSINSIDE, xpoints, ypoints, xypath[0,*], xypath[1,*], INDX after all this, INDX contains the indices of (XPOINTS, YPOINSTS) that lie inside the contour. RELATED PROCEDURES: my GRAPHSELECT; IDL'S DEFROI HISTORY: Written by Carl Heiles. 12 Sep 1998.
(See /dzd2/heiles/idl/gen/plotting/pointsinside.pro)
NAME: ver -- change vertical scale for all plots.
(See /dzd2/heiles/idl/gen/plotting/ver.pro)