Hi All,
I'm not getting what I expect to get when I try to make postscript or PNG output by nestinng a cgimage command in cgps_open and cgps_close so was wondering if anyone could point me in the right direction.
Now, if I say run
testarray=dist(256)
title='E$\subx$'
xtitle = 'x [c$\omega$$\subpe$$\up-1$]'
ytitle = 't [$\omega$$\subpe$$\up-1$]'
ct=5
cgLOADCT, ct, NCOLORS=256
cgimage,testarray,/axes,$
xs=1,ys=1,xtitle=xtitle,ytitle=ytitle,title=title, $
POSITION=[0.15, 0.3, 0.95, 0.9]
cgCOLORBAR, NCOLORS=256, POSITION=[0.15, 0.13, 0.95, 0.18], $
RANGE=[min(testarray),max(testarray)],FORMAT='(e11.1)'
I see in the x-windows display exactly what I'd expect, the image itself surrounded by axes and the greek characters and super/subscripts work properly.
Now, when attempting to do the same nested in cgps_open / cgps_close, i.e.,
testarray=dist(256)
title='E$\subx$'
xtitle = 'x [c$\omega$$\subpe$$\up-1$]'
ytitle = 't [$\omega$$\subpe$$\up-1$]'
ct=5
cgLOADCT, ct, NCOLORS=256
cgPS_OPEN,'testout.ps'
cgimage,testarray,/axes,$
xs=1,ys=1,xtitle=xtitle,ytitle=ytitle,title=title, $
POSITION=[0.15, 0.3, 0.95, 0.9]
cgCOLORBAR, NCOLORS=256, POSITION=[0.15, 0.13, 0.95, 0.18], $
RANGE=[min(testarray),max(testarray)],FORMAT='(e11.1)'
cgPS_CLOSE
This does not generate an image, in that the axes and color bar draw correctly, but there is no image drawn within those axes.
If instead of an image I go for a contour plot, as such:
testarray=dist(256)
title='E$\subx$'
xtitle = 'x [c$\omega$$\subpe$$\up-1$]'
ytitle = 't [$\omega$$\subpe$$\up-1$]'
ct=5
cgLOADCT, ct, NCOLORS=256
cgPS_OPEN,'testout.ps'
cgcontour,testarray,/axes,$
xs=1,ys=1,xtitle=xtitle,ytitle=ytitle,title=title, $
POSITION=[0.15, 0.3, 0.95, 0.9],/FILL,NLEVELS=256
cgCOLORBAR, NCOLORS=256, POSITION=[0.15, 0.13, 0.95, 0.18], $
RANGE=[min(testarray),max(testarray)],FORMAT='(e11.1)'
cgPS_CLOSE
output is expected.
What is peculiar to cgimage and its operation with postscript output that I've missed? Furthermore, I am certain I've actually managed this before (but I'm on a new machine so perhaps some subtlety with setup I've missed) without issue.
Cheers,
Jonathan
|