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

Home » Public Forums » archive » Re: Problem with titles on a multi plot ps file
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: Problem with titles on a multi plot ps file [message #60125] Tue, 29 April 2008 07:40
Justus Skorps is currently offline  Justus Skorps
Messages: 20
Registered: April 2007
Junior Member
thanks a lot David, looks perfect!
Re: Problem with titles on a multi plot ps file [message #60141 is a reply to message #60125] Mon, 28 April 2008 06:54 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Justus Skorps writes:

> I have a little problem with multiple plots on a ps file:
>
> In my program I am creating two multi plot ps files, both with 3
> columns and 5 rows. On the first ps file I am using the plot command
> for each subplot, on the second one the shade_surf command (with
> az=0,ax=90 for a top view). Both ps files are opened with the same
> parameters (despite the name of course) and I am using the !Y.OMargin
> to get some space above all plots for an overall title.
>
> For the first ps file everything works fine, I can set an individual
> title for each subplot and these titles are plotted correctly. But for
> the second file (with the shade_surf command) the titles are
> truncated, only the points in the bottom are printed, ob the exact
> same position as in the first file. And I cannot understand why the
> upper points are not printed, it looks like they are overpainted with
> a white box. It does not matter how many subplot I really plot, even
> if only one is printed the title is truncated.
>
> Anybody can give me a hint?

I think you are going to have to draw your own plot titles.
Here is a small modification of your program that works
for me:

PRO surf_title, data, TITLE=title, _EXTRA=extra

shade_surf,data,sh = bytscl(data,top=255,MIN=0,MAX=255,$
/nan),az=0,ax=90,ystyle=4,xstyle=4,zstyle=4
xyouts, (!X.window[1]-!X.window[0])/2+!X.window[0],$
!Y.window[1]+0.005, $
/Normal, title, Charsize=!P.charsize * 0.35, ALIGN=0.5
END



psfilename1 = 'testmax.ps'
psfilename2 = 'testsum.ps'

set_plot,'PS'

; first ps file

!Y.OMargin=[0,8.0]
device,filename=psfilename1,xsize=19.0,xoffset=1.0,yoffset=1 .0,$
ysize=27.7,inches=0, bits_per_pixel=8
xyouts,0.5,0.98,alignment=0.5,'main title',/normal

!p.multi[1]=3
!p.multi[2]=5

x=findgen(150)/10
y=x^2

for I=0,14 do begin
!P.multi[0]=15-i ;select subplot
plot,x,y,title='subtitle',yrange=[0,260],ystyle=1
endfor

device,/close

; second ps file

!Y.OMargin=[0,8.0] ;; Changed this to give more room.
device,filename=psfilename2,xsize=19.0,xoffset=1.0,yoffset=1 .0,$
ysize=27.7,inches=0,bits_per_pixel=8
xyouts,0.5,0.98,alignment=0.5,'main title',/normal

!p.multi[1]=3
!p.multi[2]=5

t=dist(300,400)

for I=0,14 do begin
!P.multi[0]=15-i
surf_title, t,sh = bytscl(t,top=255,MIN=0,MAX=255,$
/nan),az=0,ax=90,title='subtitle',ystyle=4,xstyle=4,zstyle=4
; shade_surf,t,sh = bytscl(t,top=255,MIN=0,MAX=255,$
; /nan),az=0,ax=90,title='subtitle',ystyle=4,xstyle=4,zstyle=4
endfor

device,/close

end

--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
Re: Problem with titles on a multi plot ps file [message #60147 is a reply to message #60141] Mon, 28 April 2008 01:59 Go to previous message
Justus Skorps is currently offline  Justus Skorps
Messages: 20
Registered: April 2007
Junior Member
Seems that the problem is not related to the multiple plot
staff...same happens with a "normal" shade_surf plot, with
IDL6.3@WinXP and IDL6.4@solaris...guess I have never seen that
behaviour before because I normally use the shade_surf only together
with setting the postion manually...but I do not want to do that for
all 15 subplot...
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: i need help in morphing....
Next Topic: Some AVI bother...

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

Current Time: Sat Oct 11 11:03:15 PDT 2025

Total time taken to generate the page: 0.72076 seconds