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

Home » Public Forums » archive » cgimage not generating output with cgps_open and cgps_close (fine in X window) .
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
cgimage not generating output with cgps_open and cgps_close (fine in X window) . [message #89471] Mon, 20 October 2014 09:50 Go to previous message
JTMHD is currently offline  JTMHD
Messages: 9
Registered: October 2014
Junior Member
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
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: File time issue
Next Topic: cgWindRose has error producing legend?

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

Current Time: Wed Oct 08 11:54:06 PDT 2025

Total time taken to generate the page: 0.00368 seconds