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.")
|