comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: How does IDL calculate the graph axis values?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: How does IDL calculate the graph axis values? [message #18702] Wed, 02 February 2000 00:00 Go to previous message
mallors is currently offline  mallors
Messages: 76
Registered: November 1997
Member
In article <38986E90.5B2D58C8@ssec.wisc.edu>,
"Liam E. Gumley" <Liam.Gumley@ssec.wisc.edu> writes:
> Declan Vogt wrote:
>
>> I'd like to find out what IDL will use as the max and min values for a
>> graph axis before it actually plots the axis. I've been doing this by
>> creating a window, drawing the axis, and reading !x.crange, then erasing
>> the window, but it's not very elegant, and it doesn't work for
>> postscript.
>>
>> Does anyone know if there is an IDL routine I can call?
>
> I don't think there's a built-in routine for this purpose. However you can
> always use the Z buffer as a temporary graphics device:
>
> Say your data is defined as follows:
>
> x = findgen(200) * 0.1
> y = sin(x)
>
> First you save the current graphics setup:
>
> entry_device = !d.name
> entry_window = !d.window
> entry_config = {x:!x, y:!y, z:!z, map:!map}
>
> Then you create a temporary plot in the Z buffer:
>
> set_plot, 'Z'
> device, z_buffer=0
> plot, x, y, /nodata, xstyle=4, ystyle=4, /noerase, /ynozero
> xrange = !x.crange
> yrange = !y.crange

There is also the 'NULL' device to suppress
graphics output entirely:


dSave = !D.NAME
SET_PLOT, 'NULL'
.
.
.
SET_PLOT, dSave

Regards,

-bob mallozzi




--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~
Robert S. Mallozzi 256-544-0887
Mail Code SD 50
http://gammaray.msfc.nasa.gov/ Marshall Space Flight Center
http://cspar.uah.edu/~mallozzir/ Huntsville, AL 35812
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: data interpolation
Next Topic: mapping data & grid (MAP_SET MAP_GRID)

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 18:17:05 PDT 2025

Total time taken to generate the page: 0.00451 seconds