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

Home » Public Forums » archive » Re: !x.region,!y.region
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: !x.region,!y.region [message #19793] Tue, 25 April 2000 00:00
Craig Markwardt is currently offline  Craig Markwardt
Messages: 1869
Registered: November 1996
Senior Member
"R.Bauer" <R.Bauer@fz-juelich.de> writes:
>
> this is my next question about the secrets of the plotarea
> (Direct Graphics)!
>
> How are !x.region,!y.region are calculated?
>
> It seems to me that's they are only define the plotregion if
> !P.charsize eq 1.0.
>
> If !p.charsize changes the region is not changing.
>
> How did I calculate the region which my plot is using
> from Y-Title to X-Title?

I have not had much use for !x.region and !y.region -- I can't recall
when they have worked for me.

I use !x.window and !y.window instead. These change when you change
the character size.

Example:

IDL> plot, findgen(10)
IDL> print, !x.window, !y.window
0.0937550 0.971880
0.0781300 0.960943
IDL> !p.charsize=2
IDL> plot, findgen(10)
IDL> print, !x.window, !y.window
0.187505 0.943755
0.156255 0.921880

However, I should make it clear that changing the character size alone
does not update ![xy].window. These values are only reset when you
make a PLOT command. If you do indeed need to know the plot
dimensions before making output, then you can use

PLOT, XSTYLE=(xstyle OR 4), YSTYLE=(ystyle OR 4), /NODATA, ...

which doesn't make any output but does establish the new coordinate
system.

Cheers,
Craig


--
------------------------------------------------------------ --------------
Craig B. Markwardt, Ph.D. EMAIL: craigmnet@cow.physics.wisc.edu
Astrophysics, IDL, Finance, Derivatives | Remove "net" for better response
------------------------------------------------------------ --------------
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Color Questions
Next Topic: !x.region,!y.region

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

Current Time: Sat Oct 11 16:46:55 PDT 2025

Total time taken to generate the page: 0.01156 seconds