Hi Graph Extperts,
I am trying to plot the below graph using PROC TEMPLATE.
So till now I have achived to plot the main body and only one table below the plot. But the problem is that I am unable to fit 2 tables under the plot as I have 6 treatments hence each table is taking 6 lines. Kindly help me. I have used below code .
proc template;
define statgraph stepplot;
begingraph / designwidth=800px designheight=465px border=false.......
.......................
layout lattice / rows=3 columns=1 ......................;
<main plot>;
endlayout;
layout overlay / ;
<table 1 with all required syntax >
AxisTable ..................... / poistion =0 ;
endlayout;
endgraph;
run;
Thanks in Advance.
If you provide some example data will likely have a better chance of getting a working solution.
And then populate the graph with some examples for that data set. For example, since you are showing a requirement for a "change" we can't tell if the template is supposed to calculated that change, and from what.
Also if this is supposed to be an axis table then generally the columns of the table correspond to the X axis values. From what you show I am not sure, because there are no values anywhere, that this is true for your want.
https://blogs.sas.com/content/graphicallyspeaking/2012/07/15/risk-tables-annotated-or-not/
proc summary data=sashelp.heart nway;
class smoking_status sex;
var weight;
output out=want mean=mean lclm=lclm uclm=uclm median=median n=n;
run;
ods graphics/reset=all;
proc sgplot data=want;
scatter x=smoking_status y=mean/yerrorlower=lclm yerrorupper=uclm group=sex;
/*xaxis colorbands=even;*/
xaxistable n/x=smoking_status class=sex colorgroup=sex title='Count N';
xaxistable median/x=smoking_status class=sex colorgroup=sex title='Median Value';
run;
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.