06-01-2016 12:12 PM
I'm working with some code that produces the graph below and the program is ugly (proc template). I seem to recall something similar in a SAS presentation or Training email in the last few years but can't put my finger on it. Does anyone recognize this type of graph with differing size circles representing relative percentages? Is this a custom graph or is there a SAS Proc that can generate them (other than proc template)?
06-01-2016 12:34 PM - edited 06-01-2016 12:37 PM
This appears to be a custom graph, not from any SAS procedure I know of. Probably uses a BUBBLE plot, available in both GTL and SGPLOT.
Generally, Usage of area for magnitude comparisons is not effective. Without the value labels, it would be hard to see which was higher. it woudl be preferable to use a clustered bar chart to represent this data that would deliver the data in a way that allows for better comparisons (below). But, often customers will ask for unique and different representation.
Code attached below. Some appearance options can be skipped.
ods html close;
ods listing image_dpi=&dpi gpath=&gpath;
format Value percent8.0;
input Group $1-25 Category $26-50 Value;
Your Sales Figures Western States Region 0.68
Your Sales Figures Mountain States Region 0.49
Your Sales Figures Central States Region 0.77
Your Sales Figures Eastern States Region 0.06
Your Peer's Sales Figures Western States Region 0.70
Your Peer's Sales Figures Mountain States Region 0.46
Your Peer's Sales Figures Central States Region 0.73
Your Peer's Sales Figures Eastern States Region 0.10
ods graphics / reset width=4in height=2.5in imagename='Sales';
title 'Sales by Region';
proc sgplot data=sales noborder;
vbarparm category=Category response=value / group=Group
groupdisplay=cluster dataskin=pressed datalabel;
keylegend / title='';
yaxis display=(noline noticks nolabel) grid;
xaxis display=(nolabel noticks);
Need further help from the community? Please ask a new question.