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

Home » Public Forums » archive » !p.multi , colorbar&set_viewport ?
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: !p.multi , colorbar&set_viewport ? [message #86572 is a reply to message #86568] Wed, 20 November 2013 05:33 Go to previous messageGo to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
anil writes:

> I'm trying to plot many figures with multi-plots in each of them.
> I use !p.multi. The problem is I plot my colorbar using set_viewport,as below:
>
> b=clevels
> r=size(b)
> aa = dblarr(r(1),2)
> aa = [[b], [b]]
> cc = dblarr(1, 2)
> cc = [0, 1]
> cc=transpose(cc)
> set_viewport, 0.05,0.55,0.55,0.57
>
> contour,aa, b ,cc,/cell_fill, levels = b, /noer,$
> ytickinterval = 1, ycharsize = 1, ys =4,xs = 1,charthick=1,charsize=0.4 ,$
> c_colors=indgen(269)+1,/overplot
>
> My code works fine until this point. I plot map projections with contour on top of them. Then I want to add my colorbar beneath this figure but what happens is starting from the 2nd file, it only plots the frame (from set_viewport command) and plots everythin else inside this frame. How can I fix this? I use /advance and /noerase keywords in the map projection and contour routines but it gets stuck in this viewport. When i just do set_viewport,device. I can see the map
projection and contour on top of it. So I am sure it is plotting, just not where i want it. Any help is appreciated
>

Hard to know what "Set_Viewport" command you are using, but the one I
found on my machine (in the "obsolete" directory, unfortunately) simply
sets the !P.Position system variable. If you try to set both the
position *and* use !P.Multi, chaos always ensues.

I think I would have a look at the Coyote Plot Gallery for an example of
how to do multiple contour plots on map projections. Adding a color bar
to each of the plots in the Small Contour Multiples plot is trivial. The
example uses cgLayout (rather than !P.Multi) so that you can adjust the
"gap" between plots to give yourself some room for adding the color bar.

http://www.idlcoyote.com/gallery/index.html

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thue. ("Perhaps thou speakest truth.")
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: Using thick=2 increases FG plot time by 25x?!?!
Next Topic: mathematical symbols

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

Current Time: Wed Oct 08 13:36:06 PDT 2025

Total time taken to generate the page: 0.00615 seconds