BookmarkSubscribeRSS Feed
Calcite | Level 5

I have been struggling with 3d histograms using proc template and sgrender.  I have 2 problems:

1) I can't seem to save the graph in true vector format (it will save with a .wmf extension but when opened, it is actually a bitmap)

2) I can't change the tick marks on the z axis. The higher tick marks are outside the data range, but I found documentation that said this wasn't a problem for linear axes only for time axes

here is my code:

proc template;

define statgraph bihistogram1;


      entrytitle " ";

      layout overlay3d / cube=false  tilt=55

            zaxisopts=(griddisplay=on linearopts=(tickvaluelist=(0 10 20 30 40 50 60 70 80 90 100)))


            yaxisopts=(linearopts=(tickvalueformat=yval.)) ;

      bihistogram3dparm x=value1 y=value2 z=percent/ display=all;





ods graphics on / imagefmt=wmf;

ods listing;

proc sgrender data=kdeplasma2 template=bihistogram1;

      label value1="x" value2="y" percent="Percent";

      title '3d plot of x vs y';


ods graphics off;

ods listing close;



Meteorite | Level 14

You are absolutely right on both counts. 

With SAS 9.2, all graphs are images embedded into EMF or PDF files.

With SAS 9.3, you will get scalable vector graphics output when you request a EMF or PDF output EXCEPT for cases where the graph cannot be rendered by simple vector graphics. This includes 3D graphs and graphs with color gradients and (for emf) transparencies. So in these cases you will get an embedded image. I don't know if we have a way around this yet even for future releases. You should also get a log message.

For 3D axes, you may have found a doc error.  For zaxisopts, we do not support TICKVALUEPRIORITY or VIEWMIN and VIEWMAX (like we do for 2D linear axes).  You can specify the tick values you want, but only the ones that are in the data range will be shown.  We do have plans to add these features in the next release.  The only way I can think you may be able to work around this would be to somehow overlay another fully transparent BiHistogram3DParm (or SurfacePlotParm) with data values up to the range you want. 

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 1 reply
  • 2 in conversation