Coyote Graphics Routines

Date: Fri Mar 27 12:14:20 2015

single page | use frames     summary     class     fields     routine details     file attributes

.\

cgzplot__define.pro

Graphics


This program creates a "zoomable" line plot in an interactive, resizable window. The user can zoom into or out of the plot. Once a plot is zoomed, the user can then pan the plot in both the X and Y directions. See the operating instructions for how to interact with the line plot.

Operating Instructions--

Use the LEFT mouse button to zoom the plot and the RIGHT mouse button to pan the plot.

If you click and drag inside the plot axes, you will create a rubber band box. Select the portion of data you wish to zoom into. The zoom will occur in both the X and Y directions. If you wish to zoom the plot all the way back out, simply click and release the LEFT mouse button inside the plot axes without moving the mouse.

Once you are zoomed into a plot, you can adjust the zoom by clicking the LEFT mouse button outside the plot axes. If you click the mouse below the plot, you will cause the X axis to zoom out of the plot by the zoomFactor amount (normally 5% of the current range of the axis). If you wish to zoom the X axis into the plot, simply click above in the region of the window above the plot. Click below the plot to zoom out, above the plot to zoom in. Similarly, you can adjust the zoom on the Y axis. Clicking to the left of the plot zooms the Y axis out, while clicking to the right of the plot zooms the Y axis in.

If you are zoomed into the plot, you can pan to different locations in the plot by using the RIGHT mouse button. Hold and drag the RIGHT mouse button inside the plot axes. The entire plot will pan in both the X and Y directions.

File output requires that ImageMagick and GhostScript be installed on your machine. Note that exact axis scaling is always in effect.

This program object is accessed through the cgZPlot procedure, as in the examples below.

Examples

Use as you would use the cgPlot command:

cgZPlot, cgDemoData(1) cgZPlot, cgDemoData(1), Aspect=1.0 cgZPlot, cgDemoData(1), Color='olive', AxisColor='red', Thick=2 cgZPlot, cgDemoData(1), Color='blue', SymColor='red', PSym=-16 Example using error bars:
data = Congrid(cgDemoData(1), 15) seed = -5L time = cgScaleVector(Findgen(N_Elements(data)), 1, 9) high_yerror = RandomU(seed, N_Elements(data)) * 5 > 0.5 low_yerror = RandomU(seed, N_Elements(data)) * 4 > 0.25 high_xerror = RandomU(seed, N_Elements(data)) * 0.75 > 0.1 low_xerror = RandomU(seed, N_Elements(data)) * 0.75 > 0.1 xtitle = 'Time' ytitle = 'Signal Strength' title = 'Error Bar Plot' position = [0.125, 0.125, 0.9, 0.925] thick = (!D.Name EQ 'PS') ? 3 : 1 cgZPlot, time, data, Color='red5', PSym=-16, $ SymSize=1.0, Thick=thick, Title=title, XTitle=xtitle, YTitle=ytitle, $ Position=position, YStyle=1, $ ERR_XLow=low_xerror, ERR_XHigh=high_xerror, ERR_CLIP=1, $ ERR_YLow=low_yerror, ERR_YHigh=high_yerror, ERR_Color='blu5'

Class description for cgZPlot

Inheritance

Properties

Properties in cgGraphicsKeywords

Properties in cgZPlot

ERR_THICK set init
XSIZE init
YSIZE init
ERR_CLIP set init
ERR_WIDTH set init
_EXTRA set
ERR_XLOW set init
ZOOMFACTOR get set init
SYMCOLOR set init
MIN_VALUE get set init
YNOZERO get set init
XLOG get set init
INDEP set
DRAW set
PARENT init
XRANGE init
DRAWID init
MAX_VALUE get set init
DEP set
YRANGE init
_REF_EXTRA get init
ERR_XHIGH set init
LABEL get set init
ERR_YLOW set init
UNDOLIST get
ERR_YHIGH set init
ASPECT get set init
DATA_X get
DATA_Y get
LEGENDS get set init
YLOG get set init
ERR_COLOR set init
OPLOTS get set init

Fields

Fields in cgGraphicsKeywords

Fields in cgZPlot

PIXMAPID 0L
ERR_THICK 0L
XSIZE 0L
YSIZE 0L
ERR_CLIP 0B
ORIG_YRANGE [0.00000000D, 0.00000000D]
ERR_WIDTH ptr_new()
ERR_XLOW ptr_new()
ZOOMFACTOR 0.000000
SAVEDIR ''
DRAG 0B
SYMCOLOR ptr_new()
MIN_VALUE ptr_new()
YNOZERO ptr_new()
ORIG_XRANGE [0.00000000D, 0.00000000D]
MODE 0B
NSUM ptr_new()
XLOG ptr_new()
INDEP ptr_new()
WID 0L
X0 0L
X1 0L
DRAWID 0L
REDOLIST obj_new()
MAX_VALUE ptr_new()
DEP ptr_new()
CURRENT_POSITION [0.00000000D, 0.00000000D, 0.00000000D, 0.00000000D]
BANGP { !PLT, BACKGROUND: 0L, CHARSIZE: 0.000000, CHARTHICK: 0.000000, CLIP: lonarr(6), COLOR: 0L, FONT: 0L, LINESTYLE: 0L, MULTI: [0L, 0L, 0L, 0L, 0L], NOCLIP: 0L, NOERASE: 0L, NSUM: 0L, POSITION: [0.000000, 0.000000, 0.000000, 0.000000], PSYM: 0L, REGION: [0.000000, 0.000000, 0.000000, 0.000000], SUBTITLE: '', SYMSIZE: 0.000000, T: dblarr(4, 4), T3D: 0L, THICK: 0.000000, TITLE: '', TICKLEN: 0.000000, CHANNEL: 0L }
ERR_XHIGH ptr_new()
LABEL ''
BANGX { !AXIS, TITLE: '', TYPE: 0L, STYLE: 0L, TICKS: 0L, TICKLEN: 0.000000, THICK: 0.000000, RANGE: [0.00000000D, 0.00000000D], CRANGE: [0.00000000D, 0.00000000D], S: [0.00000000D, 0.00000000D], MARGIN: [0.000000, 0.000000], OMARGIN: [0.000000, 0.000000], WINDOW: [0.000000, 0.000000], REGION: [0.000000, 0.000000], CHARSIZE: 0.000000, MINOR: 0L, TICKV: dblarr(60), TICKNAME: strarr(60), GRIDSTYLE: 0L, TICKFORMAT: strarr(10), TICKINTERVAL: 0.00000000D, TICKLAYOUT: 0L, TICKUNITS: strarr(10) }
ERR_YLOW ptr_new()
BANGY { !AXIS, TITLE: '', TYPE: 0L, STYLE: 0L, TICKS: 0L, TICKLEN: 0.000000, THICK: 0.000000, RANGE: [0.00000000D, 0.00000000D], CRANGE: [0.00000000D, 0.00000000D], S: [0.00000000D, 0.00000000D], MARGIN: [0.000000, 0.000000], OMARGIN: [0.000000, 0.000000], WINDOW: [0.000000, 0.000000], REGION: [0.000000, 0.000000], CHARSIZE: 0.000000, MINOR: 0L, TICKV: dblarr(60), TICKNAME: strarr(60), GRIDSTYLE: 0L, TICKFORMAT: strarr(10), TICKINTERVAL: 0.00000000D, TICKLAYOUT: 0L, TICKUNITS: strarr(10) }
UNDOLIST obj_new()
ERR_YHIGH ptr_new()
ASPECT ptr_new()
Y0 0L
Y1 0L
LEGENDS ptr_new()
TLB 0L
YLOG ptr_new()
ERR_COLOR ptr_new()
OPLOTS ptr_new()

Author information

Author

FANNING SOFTWARE CONSULTING:

David W. Fanning 1645 Sheely Drive Fort Collins, CO 80526 USA Phone: 970-221-0438 E-mail: david@idlcoyote.com Coyote's Guide to IDL Programming: http://www.idlcoyote.com

Copyright

Copyright (c) 2012, Fanning Software Consulting, Inc.

History

Change History:

Written 16 May 2012, by David W. Fanning. Added UNDO capability arbitrarily set to 50 items. 17 May 2012. DWF. Added a REDO capability and the ability to adjust the Y range (via a button) so that you can see the actual data Y range of all the data in the X range of a particular view of the data. 21 May 2012. DWF. Added a PARENT keyword and changed the algorithm slightly so that this interactive widget functionality can be incorporated into your own widget programs. 21 may 2012. DWF. Added compile options idl2 to all modules. Fixed a typo for REDO button. 14 June 2012. DWF. Separated the object code from the driver code for easier inheritance. 14 June 2012. DWF. Removed the POLAR keyword, which can't be used in a zoom plot. 15 June 2012. DWF. Added a persistent output save directory. 30 June 2012. DWF. Added an ERASE method to erase the current display. 10 July 2012. DWF. Added a LABEL keyword to add a label instead of a title to a plot. 13 July 2012. DWF. Added the ability to include overplot objects in the zoom window. 17 July 2012. DWF. Added a Destroy method and now remove widget GUI in CLEANUP method. 2 Oct 2012. DWF. I had the GetProperty and SetProperty keyword inheritance mechanism screwed up. Sorted now. 13 March 2013. DWF. Added the ability to display error bars on the zoomable plot. 30 Sep 2014. DWF. Added a SYMCOLOR keyword to the zoomable plot. 30 Sep 2014. DWF.

Routines

result = cgZPlot::INIT(x [, y] [, ASPECT=float], DRAWID=DRAWID [, /ERR_CLIP] [, ERR_COLOR=varies] [, ERR_THICK=integer] [, ERR_WIDTH=float] [, ERR_XHIGH=ERR_XHIGH] [, ERR_XLOW=ERR_XLOW] [, ERR_YHIGH=ERR_YHIGH] [, ERR_YLOW=ERR_YLOW] [, LABEL=string] [, LEGENDS=object] [, MAX_VALUE=float] [, MIN_VALUE=float] [, OPLOTS=object] [, PARENT=long] [, SYMCOLOR=string/integer] [, /XLOG] [, XRANGE=double] [, XSIZE=int] [, /YLOG] [, YRANGE=double] [, /YNOZERO] [, YSIZE=int] [, ZOOMFACTOR=float] [, _REF_EXTRA=any])

This is the initialization method of the cgZPlot object.

cgZPlot::CLEANUP

The clean-up method for the object.

cgZPlot::AddLegends [, legendObject] [, /CLEAR] [, /DRAW] [, INDEX=integer] [, /REPLACE]

This method adds a cgLegendItem object or array of objects to the plot.

cgZPlot::AddOverplots [, oplotObject] [, /CLEAR] [, /DRAW] [, INDEX=integer] [, /REPLACE]

This method adds a cgOverplot object or array of objects to the plot.

cgZPlot::AdjustRange [, event]

This event handler will adjust the data Y range of the line plot to include all of the data in the current data X range, even if that data is currently not being displayed.

cgZPlot::Button_Events, event

Button down events are processed in this event handler method.

cgZPlot::CopyPixmap

This method copies the contents of the pixmap into the display window.

cgZplot::Destroy

This method destroys the object and the GUI, if it still exists.

cgZPlot::Draw

This is the standard drawing method for the object.

cgZPlot::DrawPlot [, OUTPUT=string]

This method simply gets the keywords it needs and draws the line plot.

cgZPlot::Erase

This method simply erases the display.

cgZPlot::FileOutput, event

This event handler method allows the plot in the graphics window to be output to a file.

cgZPlot::GetProperty, DATA_X=DATA_X, DATA_Y=DATA_Y [, ASPECT=float] [, LABEL=string] [, LEGENDS=object] [, MAX_VALUE=float] [, MIN_VALUE=float] [, OPLOTS=object] [, UNDOLIST=objref] [, /XLOG] [, /YLOG] [, /YNOZERO] [, ZOOMFACTOR=float] [, _REF_EXTRA=any]

The properties of the object (keywords) are retrieved with this method.

result = cgZPlot::InsidePlot(x, y)

This method simply determines if a button click is inside (returns 1) or outside (returns 0) the plot boundaries, determined by the plot axes.

cgZPlot::Notify_Realize

The purpose of this method is to draw the initial line plot in the draw widget.

cgZPlot::Pan_Events, event

This event handler method responds to panning events until it gets a button UP event.

cgZPlot::ResizeDrawWidget, xsize, ysize [, /DRAW]

This method resizes the draw widget.

cgZPlot::SetProperty [, ASPECT=float] [, DEP=any] [, /DRAW] [, /ERR_CLIP] [, ERR_COLOR=varies] [, ERR_THICK=integer] [, ERR_WIDTH=float] [, ERR_XHIGH=ERR_XHIGH] [, ERR_XLOW=ERR_XLOW] [, ERR_YHIGH=ERR_YHIGH] [, ERR_YLOW=ERR_YLOW] [, INDEP=any] [, LABEL=string] [, LEGENDS=object] [, MAX_VALUE=float] [, MIN_VALUE=float] [, OPLOTS=object] [, SYMCOLOR=string/integer] [, /XLOG] [, /YLOG] [, /YNOZERO] [, ZOOMFACTOR=float] [, _EXTRA=any]

This method allow plot keywords to be set to appropriate values.

cgZPlot::Quit, event

This event handler method destroys the widget program.

cgZPlot::Redo [, event]

This method performs the REDO action and restores the plot to it's previous condition.

cgZPlot::TLB_Resize_Events, event

This event handler method resizes the graphics window.

cgZPlot::Undo [, event]

This method performs the UNDO action and restores the plot to it's previous condition.

cgZPlot::UndoList

This method maintains the UNDO list.

cgZPlot::Zoom_Events, event

This event handler method allows the user to create a rubber-band box for zooming into the line plot.

cgZPlot_Events, event

This is the main event handler for the program.

cgZPlot_Cleanup, tlb

This is the cleanup routine for the widget.

cgZPlot_Notify_Realize, id

This is the realize notify routine for the widget.

cgZPlot__Define [, class]

The object class definition.

Routine details

top cgZPlot::INIT

result = cgZPlot::INIT(x [, y] [, ASPECT=float], DRAWID=DRAWID [, /ERR_CLIP] [, ERR_COLOR=varies] [, ERR_THICK=integer] [, ERR_WIDTH=float] [, ERR_XHIGH=ERR_XHIGH] [, ERR_XLOW=ERR_XLOW] [, ERR_YHIGH=ERR_YHIGH] [, ERR_YLOW=ERR_YLOW] [, LABEL=string] [, LEGENDS=object] [, MAX_VALUE=float] [, MIN_VALUE=float] [, OPLOTS=object] [, PARENT=long] [, SYMCOLOR=string/integer] [, /XLOG] [, XRANGE=double] [, XSIZE=int] [, /YLOG] [, YRANGE=double] [, /YNOZERO] [, YSIZE=int] [, ZOOMFACTOR=float] [, _REF_EXTRA=any])

This is the initialization method of the cgZPlot object. In general, any keyword appropriate for the cgPlot command can be used with this program.

Parameters

x in required type=any

If X is provided without Y, a vector representing the dependent values to be plotted If both X and Y are provided, X is the independent parameter and Y is the dependent parameter to be plotted.

y in optional type=any

A vector representing the dependent values to be plotted.

Keywords

ASPECT in optional type=float default=none

Set this keyword to a floating point ratio that represents the aspect ratio (ysize/xsize) of the resulting plot. The plot position may change as a result of setting this keyword.

DRAWID
ERR_CLIP in optional type=boolean default=1

Set this keyword to cause error bars to be clipped to the borders of the plot. The default is to clip the error bars to the extent of the zoomed plot.

ERR_COLOR in optional type=varies

The color error bars should be drawn in. The default is to use the Color keyword.

ERR_THICK in optional type=integer

The thickness of the line for drawing the error bars. By default, !P.Thick.

ERR_WIDTH in optional type=float

The width of the end lines on error bars in normalized coordinates. By default, the width is one percent of the width of the axes length in the appropriate dimension.

ERR_XHIGH in optional

he high error values that should be added to the independent or X data values.

ERR_XLOW in optional

The low error values that should be subtracted from the independent or X data values.

ERR_YHIGH in optional

The high error values that should be added to the dependent or Y data values.

ERR_YLOW in optional

The low error values that should be subtracted from the dependent or Y data values.

LABEL in optional type=string

A label is similar to a plot title, but it is aligned to the left edge of the plot and is written in hardware fonts. Use of the label keyword will suppress the plot title.

LEGENDS in optional type=object

A single cgLegendItem object, or an array of cgLegendItem objects that will be drawn on the plot as a legend.

MAX_VALUE in optional type=float

Set this keyword to the maximum value to plot. Any values greater than this value are treated as missing.

MIN_VALUE in optional type=float

Set this keyword to the minimu value to plot. Any values smaller than this value are treated as missing.

OPLOTS in optional type=object

A single cgOverPlot object, or an array of cgOverPlot objects that will be overplot on the axes set up by the original data.

PARENT in optional type=long

The identifer of the parent widget for this program's draw widget. If not provided, the program will create it's own top-level base widget as a parent.

SYMCOLOR in optional type=string/integer default=black

If this keyword is a string, the name of the symbol color. By default, 'black'. Otherwise, the keyword is assumed to be a color index into the current color table.

XLOG in optional type=boolean default=0

Set this keyword to use a logarithmic X axis

XRANGE in optional type=double

Set this keyword to a two-element array giving the X data range of the plot.

XSIZE in optional type=int default=640

The X size of the program's draw widget.

YLOG in optional type=boolean default=0

Set this keyword to use a logarithmic Y axis

YRANGE in optional type=double

Set this keyword to a two-element array giving the Y data range of the plot.

YNOZERO in optional type=boolean default=0

Set this keyword to use allow the Y axis to start at a value other than zero.

YSIZE in optional type=int default=512

The Y size of the program's draw widget.

ZOOMFACTOR in optional type=float

Set this keyword to a number between 0.01 and 0.25. This affects the amount of zooming when the X axis and Y axis are zoomed with the LEFT mouse button. The default value is 0.05 or five percent of the current axis range on each end of the axis, resulting in a 10 percent change in the axis length.

_REF_EXTRA in optional type=any

Any keyword appropriate for the IDL Plot or Coyote Graphic cgPlot command is allowed in the program. Note that this is not the same as saying it is a good idea to use every one of the these keywords. Use good judgment.

top cgZPlot::CLEANUP

cgZPlot::CLEANUP

The clean-up method for the object. When the object is destroyed, this method will free the object's pointers.

top cgZPlot::AddLegends

cgZPlot::AddLegends [, legendObject] [, /CLEAR] [, /DRAW] [, INDEX=integer] [, /REPLACE]

This method adds a cgLegendItem object or array of objects to the plot. The legend objects are drawn on the plot after the orginal plot is drawn.

Parameters

legendObject in optional type=object

A cgLegendItem object, or an array of cgLegendItem objects that should be drawn when the Draw method is called. The legend objects will be destroyed when this object is destroyed.

Keywords

CLEAR in optional type=boolean default=0

If this keyword is set, the overplot list is cleared before the new overplot objects are added. Otherwise, the overplot object or objects is added to the end of the list already present.

DRAW in optional type=boolean default=0

If this keyword is set, the object calls its Draw method after the overplot objects are added.

INDEX in optional type=integer default=0

Used only if the REPLACE keyword is set. Specifies the replacement index.

REPLACE in optional type=boolean default=0

If this keyword is set, the new object replaces a current object, in the object array at the INDEX location.

top cgZPlot::AddOverplots

cgZPlot::AddOverplots [, oplotObject] [, /CLEAR] [, /DRAW] [, INDEX=integer] [, /REPLACE]

This method adds a cgOverplot object or array of objects to the plot. The overplot objects are drawn on the plot after the orginal plot is drawn.

Parameters

oplotObject in optional type=object

A cgOverPlot object, or an array of cgOverplot objects that should be overplot when the Draw method is called. The overplot objects will be destroyed when this object is destroyed.

Keywords

CLEAR in optional type=boolean default=0

If this keyword is set, the overplot list is cleared before the new overplot objects are added. Otherwise, the overplot object or objects is added to the end of the list already present.

DRAW in optional type=boolean default=0

If this keyword is set, the object calls its Draw method after the overplot objects are added.

INDEX in optional type=integer default=0

Used only if the REPLACE keyword is set. Specifies the replacement index.

REPLACE in optional type=boolean default=0

If this keyword is set, the new object replaces a current object, in the object array at the INDEX location.

top cgZPlot::AdjustRange

cgZPlot::AdjustRange [, event]

This event handler will adjust the data Y range of the line plot to include all of the data in the current data X range, even if that data is currently not being displayed.

Parameters

event in optional type=structure

The event structure passed by the window manager. Not used in this event handler.

top cgZPlot::Button_Events

cgZPlot::Button_Events, event

Button down events are processed in this event handler method. Depending on which button is pressed and where the button is pressed in the graphics window, this method will either handle or dispatch the event to the appropriate event handler.

Parameters

event in required type=structure

The event structure passed by the window manager.

top cgZPlot::CopyPixmap

cgZPlot::CopyPixmap

This method copies the contents of the pixmap into the display window.

top cgZplot::Destroy

cgZplot::Destroy

This method destroys the object and the GUI, if it still exists.

top cgZPlot::Draw

cgZPlot::Draw

This is the standard drawing method for the object. For smooth operation, the graphics are pixmap buffered. The plot is drawn into the pixmap, then copied to the draw widget window.

top cgZPlot::DrawPlot

cgZPlot::DrawPlot [, OUTPUT=string]

This method simply gets the keywords it needs and draws the line plot. It was created primarily so the OUTPUT keyword could be used with the cgPlot command, since all the file output infrastruction has been built into that command.

Keywords

OUTPUT in optional type=string

The name of the output file. File type is determined by the file extension.

top cgZPlot::Erase

cgZPlot::Erase

This method simply erases the display.

top cgZPlot::FileOutput

cgZPlot::FileOutput, event

This event handler method allows the plot in the graphics window to be output to a file.

Parameters

event in required type=structure

The event structure passed by the window manager.

top cgZPlot::GetProperty

cgZPlot::GetProperty, DATA_X=DATA_X, DATA_Y=DATA_Y [, ASPECT=float] [, LABEL=string] [, LEGENDS=object] [, MAX_VALUE=float] [, MIN_VALUE=float] [, OPLOTS=object] [, UNDOLIST=objref] [, /XLOG] [, /YLOG] [, /YNOZERO] [, ZOOMFACTOR=float] [, _REF_EXTRA=any]

The properties of the object (keywords) are retrieved with this method.

Keywords

DATA_X
DATA_Y
ASPECT out optional type=float

A value that represents the aspect ratio (ysize/xsize) of the resulting plot.

LABEL out optional type=string

The label that is used for the zoom plot.

LEGENDS out optional type=object

The current legend objects, if there are any. If not, a null object.

MAX_VALUE out optional type=float

The maximum value to plot.

MIN_VALUE out optional type=float

The minimum value to plot.

OPLOTS out optional type=object

The current overplot objects, if there are any. If not, a null object.

UNDOLIST out optional type=objref

The LinkedList object that maintains the undo list.

XLOG out optional type=boolean

Set if a logarithmic X axis is used in the plot.

YLOG out optional type=boolean

Set if a logarithmic Y axis is used in the plot.

YNOZERO out optional type=boolean

Set if this property of the plot is set.

ZOOMFACTOR out optional type=float

Set to the current zoom factor.

_REF_EXTRA out optional type=any

Any keyword appropriate for the IDL Plot or Coyote Graphic cgPlot command is allowed in the program.

top cgZPlot::InsidePlot

result = cgZPlot::InsidePlot(x, y)

This method simply determines if a button click is inside (returns 1) or outside (returns 0) the plot boundaries, determined by the plot axes.

Parameters

x in required type=int

The X location of the button click in device coordinates.

y in required type=int

The Y location of the button click in device coordinates.

top cgZPlot::Notify_Realize

cgZPlot::Notify_Realize

The purpose of this method is to draw the initial line plot in the draw widget.

top cgZPlot::Pan_Events

cgZPlot::Pan_Events, event

This event handler method responds to panning events until it gets a button UP event.

Parameters

event in required type=structure

The event structure passed by the window manager.

top cgZPlot::ResizeDrawWidget

cgZPlot::ResizeDrawWidget, xsize, ysize [, /DRAW]

This method resizes the draw widget.

Parameters

xsize in required type=integer

The requested X size of the draw widget.

ysize in required type=integer

The requested Y size of the draw widget.

Keywords

DRAW in optional type=boolean default=0

If this keyword is set, the DRAW method is called after the widget is resized.

top cgZPlot::SetProperty

cgZPlot::SetProperty [, ASPECT=float] [, DEP=any] [, /DRAW] [, /ERR_CLIP] [, ERR_COLOR=varies] [, ERR_THICK=integer] [, ERR_WIDTH=float] [, ERR_XHIGH=ERR_XHIGH] [, ERR_XLOW=ERR_XLOW] [, ERR_YHIGH=ERR_YHIGH] [, ERR_YLOW=ERR_YLOW] [, INDEP=any] [, LABEL=string] [, LEGENDS=object] [, MAX_VALUE=float] [, MIN_VALUE=float] [, OPLOTS=object] [, SYMCOLOR=string/integer] [, /XLOG] [, /YLOG] [, /YNOZERO] [, ZOOMFACTOR=float] [, _EXTRA=any]

This method allow plot keywords to be set to appropriate values.

Keywords

ASPECT in optional type=float default=none

Set this keyword to a floating point ratio that represents the aspect ratio (ysize/xsize) of the resulting plot. The plot position may change as a result of setting this keyword. Note that Aspect cannot be used when plotting with !P.MULTI.

DEP in optional type=any

The dependent data to plot.

DRAW in optional type=boolean default=0

Set this keyword if you would like to immediately draw the plot after properties are set.

ERR_CLIP in optional type=boolean default=0

Set this keyword to cause error bars to be clipped to the borders of the plot. The default is to draw error bars, even if outside the plot.

ERR_COLOR in optional type=varies

The color error bars should be drawn in. The default is to use the Color keyword.

ERR_THICK in optional type=integer

The thickness of the line for drawing the error bars. By default, !P.Thick.

ERR_WIDTH in optional type=float

The width of the end lines on error bars in normalized coordinates. By default, the width is one percent of the width of the axes length in the appropriate dimension.

ERR_XHIGH in optional

he high error values that should be added to the independent or X data values.

ERR_XLOW in optional

The low error values that should be subtracted from the independent or X data values.

ERR_YHIGH in optional

The high error values that should be added to the dependent or Y data values.

ERR_YLOW in optional

The low error values that should be subtracted from the dependent or Y data values.

INDEP in optional type=any

The independent data to plot.

LABEL in optional type=string

A label is similar to a plot title, but it is aligned to the left edge of the plot and is written in hardware fonts. Use of the label keyword will suppress the plot title.

LEGENDS in optional type=object

A single cgLegendItem object, or an array of cgLegendItem objects that will be drawn on the plot as a legend.

MAX_VALUE in optional type=float

Set this keyword to the maximum value to plot. Any values greater than this value are treated as missing.

MIN_VALUE in optional type=float

Set this keyword to the minimu value to plot. Any values smaller than this value are treated as missing.

OPLOTS in optional type=object

A single cgOverPlot object, or an array of cgOverPlot objects that will be overplot on the axes set up by the original data.

SYMCOLOR in optional type=string/integer default=black

If this keyword is a string, the name of the symbol color. By default, 'black'. Otherwise, the keyword is assumed to be a color index into the current color table.

XLOG in optional type=boolean default=0

Set this keyword to use a logarithmic X axis

YLOG in optional type=boolean default=0

Set this keyword to use a logarithmic Y axis

YNOZERO in optional type=boolean default=0

Set this keyword to use allow the Y axis to start at a value other than zero.

ZOOMFACTOR in optional type=float

Set this keyword to a number between 0.01 and 0.25. This affects the amount of zooming when the X axis and Y axis are zoomed with the LEFT mouse button. The default value is 0.05 or five percent of the current axis range on each end of the axis, resulting in a 10 percent change in the axis length.

_EXTRA in optional type=any

Any keyword appropriate for the IDL Plot or Coyote Graphic cgPlot command is allowed in the program.

top cgZPlot::Quit

cgZPlot::Quit, event

This event handler method destroys the widget program.

Parameters

event in required type=structure

The event structure passed by the window manager.

top cgZPlot::Redo

cgZPlot::Redo [, event]

This method performs the REDO action and restores the plot to it's previous condition.

Parameters

event in optional type=structure

The event structure passed by the window manager. Not used in this method.

top cgZPlot::TLB_Resize_Events

cgZPlot::TLB_Resize_Events, event

This event handler method resizes the graphics window.

Parameters

event in required type=structure

The event structure passed by the window manager.

top cgZPlot::Undo

cgZPlot::Undo [, event]

This method performs the UNDO action and restores the plot to it's previous condition.

Parameters

event in optional type=structure

The event structure passed by the window manager. Not used in this method.

top cgZPlot::UndoList

cgZPlot::UndoList

This method maintains the UNDO list. The list has a maximum undo capacity of 50.

top cgZPlot::Zoom_Events

cgZPlot::Zoom_Events, event

This event handler method allows the user to create a rubber-band box for zooming into the line plot.

Parameters

event in required type=structure

The event structure passed by the window manager.

top cgZPlot_Events

cgZPlot_Events, event

This is the main event handler for the program. All events come here to be distributed to the appropriate event handler method according to instructions packed into the UVALUE of any widget generating an event.

Parameters

event in required type=structure

The event structure passed by the window manager.

top cgZPlot_Cleanup

cgZPlot_Cleanup, tlb

This is the cleanup routine for the widget. Its function is to destroy the underlying program object.

Parameters

tlb in required type=int

The widget identifier of the top-level base widget that just died.

top cgZPlot_Notify_Realize

cgZPlot_Notify_Realize, id

This is the realize notify routine for the widget. Its function call the Realize_Notify method to draw the initial plot in the display window.

Parameters

id in required type=int

The widget identifier of the widget that has been realized.

top cgZPlot__Define

cgZPlot__Define [, class]

The object class definition.

Parameters

class out optional type=struct

The class definition object. Often helpful for obtaining fields of the object structure.

File attributes

Modification date: Fri Mar 27 11:07:36 2015
Lines: 1,867
Docformat: rst rst