Data visualization with SAS programming

change individual color in proc template

Posts: 56

change individual color in proc template

I use the following codes to generate the similar plot for the meta analysis

Now What if I only want to change "Overall" to bold ?

the "Overall" is in the statement of

scatterplot x=overallvalue y=overall / .....
So the overall in that plot seems a tick value. however there is no option such as textattrs ...

Any help? Thank you very much
Posts: 1,213

Re: change individual color in proc template

Posted in reply to Fred_Gavin
This graph is a LAYOUT LATTICE of 5 columns.
- The first column is a SCATTERPLOT showing just the axis.,
- The second column contains the BOXPLOT
- Last three columns are scatter plots with MARKERCHAR

You cannot change just one tick value of the axis, to make it bold. However, you could replace the first column with a SCATTERPLOT using MARKERCHAR to simulate the axis. You can split the column "Study2" in to two columns, 'A' having the observation "Overall" only, other being missing. The other column 'B' will have all other observations. Now, use two separeate SCATTERPLOT statements in first column, one each with these new columns 'A' & 'B'. For the scatter plot with column 'A', set the MARKERCHARACTERATTRS=(size=10, weight=bold) to just make that one value stand out.

Here is the template code for the first column. The original scatterplot statement is commented out. You have to build the new columns study2a and study2b.:

layout overlay / walldisplay=none border=false
y2axisopts=(reverse=true type=discrete display=none)
xaxisopts=(display=none offsetmin=0 offsetmax=0);
entry halign=left " Study" / textattrs=GraphLabelText location=outside valign=top;
scatterplot y=Study2 x=constant / markercharacter=study2b yaxis=y2;
scatterplot y=Study2 x=constant / markercharacter=study2a yaxis=y2
markercharacterattrs=(size=10pt weight=bold);
/* scatterplot y=Study2 x=constant / markercharacter=study2 yaxis=y2;*/
Ask a Question
Discussion stats
  • 1 reply
  • 2 in conversation