./
pp_plot.pro
Author information
- Author
Paulo Penteado (pp.penteado@gmail.com), May/2010
- History
Improved on algorithm to decide on tick locations (created pp_plot_decideintervals). Jul/2011
- Version
20110722
Routines
Routines from pp_plot.pro
pp_plot_decideintervals, dprange, dticks, dint, decide=decide, newrange=newrange, dminor=dminor, newdticks=newdticks
pp_plot, x [, y] [, xendticks=xendticks] [, yendticks=yendticks] [, _extra=_extra] [, xrange=xrange] [, xtickv=xtickv] [, xticks=xticks] [, xtickinterval=xtickinterval] [, xstyle=xstyle] [, xtick_get=xtick_get], xminor=xminor [, yrange=yrange] [, ytickv=ytickv] [, yticks=yticks] [, ytickinterval=ytickinterval] [, ystyle=ystyle] [, ytick_get=ytick_get], yminor=yminor [, use_multiplot=use_multiplot] [, calculate_ticks=calculate_ticks]
Wrapper to IDL's plot procedure, to allow supressing the first and/or last tick values, so that they do not overlap with neighbouring plots (particularly if using multiplot_pp).
Routine details
top source pp_plot_decideintervals
pp_plot_decideintervals, dprange, dticks, dint, decide=decide, newrange=newrange, dminor=dminor, newdticks=newdticks
Parameters
- dprange
- dticks
- dint
Keywords
- decide
- newrange
- dminor
- newdticks
Statistics
Lines: | 26 lines |
Cyclomatic complexity: | 3 |
Modified cyclomatic complexity: | 3 |
top source pp_plot
pp_plot, x [, y] [, xendticks=xendticks] [, yendticks=yendticks] [, _extra=_extra] [, xrange=xrange] [, xtickv=xtickv] [, xticks=xticks] [, xtickinterval=xtickinterval] [, xstyle=xstyle] [, xtick_get=xtick_get], xminor=xminor [, yrange=yrange] [, ytickv=ytickv] [, yticks=yticks] [, ytickinterval=ytickinterval] [, ystyle=ystyle] [, ytick_get=ytick_get], yminor=yminor [, use_multiplot=use_multiplot] [, calculate_ticks=calculate_ticks]
Wrapper to IDL's plot procedure, to allow supressing the first and/or last tick values, so
that they do not overlap with neighbouring plots (particularly if using multiplot_pp
).
Parameters
- x in required
Passed to IDL's plot, see its help. Used to determine the x range if xrange is not provided (or the y range if y is not provided).
- y in optional
Passed to IDL's plot, see its help. Used to determine the y range if yrange is not provided.
Keywords
- xendticks in optional default=3
Its value determines the kind of supression of the end ticks for the x axis:
0 - No end ticks are printed (both the first and last are supressed).
1 - Only the last is supressed, the first tick is left untouched.
2 - Only the first is supressed, the last tick is left untouched.
3 - No supression, this routine just passes its arguments to plot, with no changes.
- yendticks in optional default=3
Its value determines the kind of supression of the end ticks for the y axis:
0 - No end ticks are printed (both the first and last are supressed).
1 - Only the last is supressed, the first tick is left untouched.
2 - Only the first is supressed, the last tick is left untouched.
3 - No supression, this routine just passes its arguments to plot, with no changes.
- _extra in optional
Any other keywords are just passed to plot, unaltered.
- xrange in optional
Passed to IDL's plot, see its help.
- xtickv in optional
Passed to IDL's plot, see its help.
- xticks in optional
Passed to IDL's plot, see its help.
- xtickinterval in optional
Passed to IDL's plot, see its help.
- xstyle in optional
Passed to IDL's plot, see its help.
- xtick_get out optional
Passed to IDL's plot, see its help.
- xminor
- yrange in optional
Passed to IDL's plot, see its help.
- ytickv in optional
Passed to IDL's plot, see its help.
- yticks in optional
Passed to IDL's plot, see its help.
- ytickinterval in optional
Passed to IDL's plot, see its help.
- ystyle in optional
Passed to IDL's plot, see its help.
- ytick_get out optional
Passed to IDL's plot, see its help.
- yminor
- use_multiplot in optional default=0
If set,
xendticks
andyendticks
are determined by the plot's position in the grid set bymultiplot_pp
: Plots not on the top row get the top y tick suppressed (yendticks
=1), plots not on the right column get the right x tick suppressed (xendticks
=1).- calculate_ticks in optional default=0
If set and tick values are not provided, the tick values are defined here, instead of letting IDL's plot do it. Useful to keep plots with ticks suppressed (in which case auto tick locations are calculated here) consistent with those made with no suppresion (which otherwise would have their ticks determined by IDL's plot).
Examples
To make a plot supressing both end marks on x, but supress only the bottom mark on y:
pp_plot,dindgen(10),dindgen(10)*2,xendticks=0,yendticks=2,xstyle=1,ystyle=1,xticks=5,xminor=4
;pp_plot: setting tick locations (with pp_plot_maketicks), instead of using plot's default
;pp_plot: setting tick locations (with pp_plot_maketicks), instead of using plot's default
multiplot_pp
, a variation of IDLastro's multiplot) where the end marks do not overlap:
multiplot_pp,[2,2]
pp_plot,[0,1],[0,1],xstyle=1,ystyle=1,/use_multiplot,/calculate_ticks
;pp_plot: setting xendticks to 1 and yendticks to 3
;pp_plot: setting tick locations (with pp_plot_maketicks), instead of using plot's default
;pp_plot: setting tick locations (with pp_plot_maketicks), instead of using plot's default
multiplot_pp
pp_plot,[0,1],[0,1],xstyle=1,ystyle=1,/use_multiplot,/calculate_ticks
;pp_plot: setting xendticks to 3 and yendticks to 3
;pp_plot: setting tick locations (with pp_plot_maketicks), instead of using plot's default
;pp_plot: setting tick locations (with pp_plot_maketicks), instead of using plot's default
multiplot_pp
pp_plot,[0,1],[0,1],xstyle=1,ystyle=1,/use_multiplot,/calculate_ticks
;pp_plot: setting xendticks to 1 and yendticks to 1
;pp_plot: setting tick locations (with pp_plot_maketicks), instead of using plot's default
;pp_plot: setting tick locations (with pp_plot_maketicks), instead of using plot's default
multiplot_pp
pp_plot,[0,1],[0,1],xstyle=1,ystyle=1,/use_multiplot,/calculate_ticks
;pp_plot: setting xendticks to 3 and yendticks to 1
;pp_plot: setting tick locations (with pp_plot_maketicks), instead of using plot's default
;pp_plot: setting tick locations (with pp_plot_maketicks), instead of using plot's default
Author information
- Author:
Paulo Penteado (pp.penteado@gmail.com), May/2010
- History:
Added the keywords
use_multiplot
andcalculate_ticks
. Apr/2011.
Statistics
Lines: | 60 lines |
Cyclomatic complexity: | 32 |
Modified cyclomatic complexity: | 32 |
File attributes
Modification date: | Wed Jun 29 22:15:28 2016 |
Lines: | 150 |
Docformat: | rst rst |