Univeristy of Alabama in Huntsville

UAH LTG IDL Library

IDL Routines from Phillip Bitzer and UAH Lightning Group

summary     class     fields     routine details     file attributes

misc/plotting/

pmb_swap_plot_parameters.pro

Plot


When dealing with programs (GUI's, usually) with a lot of plot windows, it's useful to be able to quickly swap the plot parameters. That's what this routine does :-)

Either load or save (but not both) must be set. Depending on which is used, the keywords behave as both input and output

Examples

Make one plot:

a= FINDGEN(100) b = FINDGEN(100)*2. PLOT, a, b this_win = !D.WINDOW pmb_swap_plot_parameters, P=p1, X=x1, Y=y1, /SAVE
Now, make another plot:
WINDOW, /FREE c = FINDGEN(100)+100. d = FINDGEN(100)^2.0 PLOT, c, d pmb_swap_plot_parameters, P=p2, X=x2, Y=y2, /SAVE
Go back to the first plot:
WSET, this_win PLOTS, 50, 100, PSYM=2 ;won't work pmb_swap_plot_parameters, P=p1, X=x1, Y=y1, /LOAD PLOTS, 50, 100, PSYM=2 ;now it will

Author information

Author

Phillip M. Bitzer, University of Alabama in Huntsville, pm.bitzer "AT" uah.edu

History

Modification History:

First written: Sometime in 2012 PMB Added error catcher 20121016 PMB Added z plot parameter 20130213 PMB

Routines

top pmb_swap_plot_parameters

pmb_swap_plot_parameters, P=Main plotting system variable structure, X=Structure of type Axis, Y=Structure of type Axis [, Z=Structure of type Axis] [, /Load] [, /Save]

Swap the plot parameters of the system variables !P, !X, !Y

Keywords

P in out required type=Main plotting system variable structure

If load is set, then this is an input keyword. If save is set, then it is an output keyword.

X in out required type=Structure of type Axis

If load is set, then this is an input keyword. If save is set, then it is an output keyword.

Y in out required type=Structure of type Axis

If load is set, then this is an input keyword. If save is set, then it is an output keyword.

Z in out optional type=Structure of type Axis

If load is set, then this is an input keyword. If save is set, then it is an output keyword.

Load in optional type=boolean

This will load in new system variables from the appropriate keywords. Either load or save is required (but not both)

Save in optional type=boolean

This will save new system variables in the appropriate keywords. Either load or save is required (but not both)

Other attributes

Uses:

None

File attributes

Modification date: Tue Apr 4 15:07:29 2017
Lines: 40
Docformat: rst rst