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
|