Function graphics /OVERPLOT redefines axis limits after plot with /NODATA [message #80723] |
Tue, 03 July 2012 08:33 |
Paul Van Delst[1]
Messages: 1157 Registered: April 2002
|
Senior Member |
|
|
Hello,
I've just "discovered" this weirdness:
IDL> x=plot(lindgen(100)-50,/nodata)
IDL> xi=plot(x.xrange,[0,0],linestyle='dash',/overplot)
On my system, the second command with the /OVERPLOT redefines the yrange of the resulting plot.
The documentation of PLOT, /NODATA states:
"Set this property to 1 to create the graphic, but without any data attached to it. The axes and title (if present) are
also created and displayed."
The documentation of PLOT, /OVERPLOT states:
"Set this property to 1 (one) to place the graphic on top of the existing graphic in the current window."
Now the /NODATA docs state there is no data attached to the plot... but there is some data/information attached to it
since the axis limits are defined and displayed correctly when the plot is initially created.
Note that if the initial /NODATA is not used,
IDL> x=plot(lindgen(100)-50)
IDL> xi=plot(x.xrange,[0,0],linestyle='dash',/overplot)
everything behaves as expected.
In what universe does /OVERPLOT mean:
/ONLY_OVERPLOT_DEPENDING_ON_HOW_THE_EXISTING_GRAPHIC_WAS_CRE ATED_OTHERWISE_REDEFINE_AXIS_LIMITS.
My IDL:
IDL> print, !version
{ x86 linux unix linux 8.1 Mar 9 2011 32 64}
Sigh. Anyone know if this has been fixed in v8.2? [*]
not-so-cheerily yours,
paulv
[*] With my luck it will have been fixed, but the undocumented /HISTOGRAM keyword to PLOT() will also have been removed
(see my thread from yesterday)
|
|
|