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

Home » Public Forums » archive » Re: Reverse engineering the new graphics PLOT() margin property?
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: Reverse engineering the new graphics PLOT() margin property? [message #79902 is a reply to message #79874] Mon, 16 April 2012 18:54 Go to previous messageGo to previous message
Mark Piper is currently offline  Mark Piper
Messages: 198
Registered: December 2009
Senior Member
On Thursday, April 12, 2012 11:37:45 AM UTC-6, Sean Davis wrote:
> I was wondering if anyone has figured out how the default margins are determined in new graphics?
>
> On a related note, it is infuriating that there is no way to return the values of INIT properties like margin, position, etc. (unless I'm missing something!)
>
> What I'd really like to be able to do is the following --
>
> p = plot(findgen(20))
>
> print, p.margin

Hi Sean,

I agree, we should be able to get these plot properties that we can set on init. I'll enter a bug report.

In the meantime, I think this works (though I haven't tested it thoroughly):

IDL> p = plot(findgen(10)^2)
IDL> r = transpose([[p.xrange], [p.yrange]])
IDL> m = p.convertcoord(r, /data, /to_normal)
IDL> print, m
0.13000000 0.13000000 0.00000000
0.92000000 0.89000000 0.00000000

Check:

IDL> print, p.convertcoord(m, /normal, /to_data)
8.8817842e-016 0.00000000 0.00000000
10.000000 100.00000 0.00000000

mp
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Map Function Question
Next Topic: Re: speed-up computation of kernel-based "statistics"

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

Current Time: Fri Oct 10 15:28:38 PDT 2025

Total time taken to generate the page: 0.95833 seconds