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

Home » Public Forums » archive » cgAxis labels in different orientation in PS than on screen
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
cgAxis labels in different orientation in PS than on screen [message #77621] Thu, 15 September 2011 14:00
Brian Daniel is currently offline  Brian Daniel
Messages: 80
Registered: July 2009
Member
David, you're code is too good. I've been lulled in to a false sense
of security that all of the cg tools will work perfectly every time,
and all my frustrations with dg will all fade away. I'm creating 3D
scatter plots in a cgWindow using cgSurf to create the 3D space,
cgAxis to create the axes where I want them, and cgPlotS to plot the
data. Using cgWindow, I programmatically save theses plots to image
files via ImageMagick. The resulting postscript features the axis
labels in either horizontal or vertical orientations, not the nice
orientations in the direct graphics output on my screen.

Via postscript w/ vertical and horizontal text orientations:
http://dl.dropbox.com/u/20212184/usenet_example.png

without using postscript with nice text orientations but blocky text:
http://dl.dropbox.com/u/20212184/usenet_example_dg.png

Is there a way to get the orientations to be "pretty" in postscript?
Thanks.

-Brian J. Daniel


Code to illustrate the example:
pro usenet_label_example

data = randomn(1L,3,50)

min1 = min(data[0,*],Max=max1)
min2 = min(data[1,*],Max=max2)
min3 = min(data[2,*],Max=max3)

cgWindow
cgSurf,intarr(2,2),[0],[0],XRange=[min1,max1],$
YRange=[min2,max2],ZRange=[min3,max3],$
XStyle=5,YStyle=5,ZStyle=5,$
/Save,/NoData,Rotx=45,Rotz=45,/AddCmd
cgWindow,'cgAxis',100,0,0,XAxis=0,/T3D,XTitle='X Label',/AddCmd
cgWindow,'cgAxis',0,100,0,YAxis=0,/T3D,Ytitle='Y Label',/AddCmd
cgWindow,'cgAxis',0,0,100,ZAxis=0,/T3D,ZTitle='Z Label',/AddCmd
suppress = replicate(' ',7)
cgWindow,'cgAxis',0,0,100,ZAxis=1,/T3D,/
AddCmd,Ztickname=suppress,color=black

cgWindow,'cgPlotS',data[0,*],data[1,*],data[2,*],psym=1,/T3D ,/
Data,Color='black',/AddCmd
cgControl,Create_PNG='usenet_example.png',IM_Raster=1
cgControl,Create_PNG='usenet_example_dg.png',IM_Raster=0

END
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: Save/Restore Function Graphics
Next Topic: truncation when reading variables from netcdf file?

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

Current Time: Wed Oct 08 17:33:11 PDT 2025

Total time taken to generate the page: 0.01084 seconds