Hi,
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)?
Thanks!
--Ben
It sounds like a BUBBLE plot to me but I may be missing something
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.
%let gpath='.';
%let dpi=150;
ods html close;
ods listing image_dpi=&dpi gpath=&gpath;
data sales;
format Value percent8.0;
input Group $1-25 Category $26-50 Value;
datalines;
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
;
run;
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);
run;
It sounds like a BUBBLE plot to me but I may be missing something
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!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.
Select SAS Training centers are offering in-person courses. View upcoming courses for: