Hi
I generate this template that shows a boxplot on SASHELP.STOCKS and a seriesplot on SASHELP.CARS on the same graphic.
The tool indicates that SGRENDER cannot be used for that but SGDESIGN. I don't find how to call my two tables in the proc SGDESIGN. Could you help me ?
proc template;
define statgraph Graphique;
dynamic _ORIGIN _INVOICE _DATE _VOLUME;
begingraph;
layout lattice / rowdatarange=data columndatarange=data rows=2
rowgutter=10 columngutter=10;
layout overlay;
boxplot x=_ORIGIN y=_INVOICE / name='box' boxwidth=0.4
groupdisplay=Cluster clusterwidth=1.0;
endlayout;
layout overlay;
seriesplot x=_DATE y=_VOLUME / name='series' connectorder=xaxis;
endlayout;
endlayout;
endgraph;
end;
run;
/* The graph uses multiple datasets. This is not supported by PROC SGRENDER.
You need to run PROC SGDESIGN to generate the graph. */
The data references are maintained in the SGD file. So, if your data changes, the new proc run with pick up the new data. If the data files are in a new libname location, you can override the original libname in the SGD file with the LIBNAME option.
Hey Stephane,
That comment means you cannot run that example by using the template with SGRENDER. You have to run the SGD file with PROC SGDESIGN. The SGD file is the save format for the Designer application. You can still use dynamic substitution with SGDESIGN. Let me know if you have any more questions.
Thanks!
Dan
Hi Dan
Thank you.
But how do you call the proc SGDESIGN with two tables ?
The data references are maintained in the SGD file. So, if your data changes, the new proc run with pick up the new data. If the data files are in a new libname location, you can override the original libname in the SGD file with the LIBNAME option.
Oh I generate the SGD file with the DESIGNER and then I call it with proc SGDESIGN ?!
Yes. That way, you can run the graph you designed in batch. In most cases, you can either run the SGD file or grab the GTL template and use it with SGRENDER. However, in this case, you must use SGDESIGN.
Oh great I did not see that. Great Dan. Thank you.
Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.
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.
Ready to level-up your skills? Choose your own adventure.