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

Home » Public Forums » archive » Re: extra margin on ps plots
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: extra margin on ps plots [message #83572] Wed, 20 March 2013 09:47 Go to previous message
Russell Ryan is currently offline  Russell Ryan
Messages: 122
Registered: May 2012
Senior Member
On Wednesday, March 20, 2013 11:43:22 AM UTC-5, rr...@stsci.edu wrote:
> Well, as with many things, there are many ways to skin this cat --- and they largely depend on how you're currently doing things.
>
>
>
> If you are using multiplot, then I recommend throwing that code out the window. Multiplot is awful and should be removed entirely from the IDL distro. It was a good idea, but horrible implementation. If you want a self-contained version of multiplot, and frankly what multiplot should have been, look at Fanning's Coyote Graphics library (I think he has something for this, and I figure it's a matter of time before he chimes in). Personally, I don't use Fanning's implementation (not a commentary on him, but I wrote my own library of graphics things before the cg* utilities, and though my stuff is inferior, I'm used to it). Truth be told, much of his stuff is now incorporated to the Astronomy Libraries, so i suppose I use them in some ways.
>
>
>
> All that said, to zeroth level what you want to do, is use the position keyword to plot. This means you'll need to calculate the "NORMAL" coordinates of each plot window and set them "by hand" and use the /noerase feature to plot. This isn't as bad as it sounds, but if it's your first foray, it might be tedious. To the best of my knowledge, this is what Fanning's libraries will do for you --- certainly it is what my stuff does. Now, you have complete control of the left/right, top/bottom margins (both internal to the plot and the external ones). Heck, you can even embed one figure inside the other!
>
>
>
> If this isn't clear let me know, I'll give you a real-world example.
>
>
>
> Good Luck,
>
> Russell
>
>
>
>
>
> On Wednesday, March 20, 2013 8:58:42 AM UTC-5, Zhang Bo wrote:
>
>> Hi all,
>
>>
>
>>
>
>>
>
>> I am aware of that the xmargin/ymargin or position parameters can set margins for individual plots. but if I have multiple plots/panels on a single ps file, how can I get extra margin area for the entire plot region and still make the plots/panels align well. (more space at the four edges of the ps file/entire figure) I have a lot information on both the lower and higher x axis for each individual plots, so if I make the plots in the first row fit, the information on the lower x axis for the plot in the last row would go out the ps file. and I don't want to change the plots size in the last row.
>
>>
>
>>
>
>>
>
>> Thanks.
>
>>
>
>> Bo

Oh, one more thing. You can access/alter some of this stuff in the !p system variable. So, once you have your normal coordinates, you can set them to !p.position --- and not need to pass them to plot. This might seem like a trivial distinction, but has big importance if you want to overplot. Suppose you create 5 plot windows, but want to overplot data onto the first. Then you need a way of restoring that position for the first plot. In principle, you can use the same code you used the first time, but in practice you can't set a position keyword to oplot. Therefore to do this, you *MUST* set the !p.position variable... Again, it's a trivial distinction, but worth mentioning...

Russell
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: Re: stop on arithmetic error
Next Topic: extra margin on ps plots

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

Current Time: Wed Oct 08 15:56:36 PDT 2025

Total time taken to generate the page: 0.00426 seconds