BookmarkSubscribeRSS Feed
Jaime
Fluorite | Level 6
Is there a way to sort by record count when using a dot plot.
It defaults to sorting by category var name.
4 REPLIES 4
GraphGuy
Meteorite | Level 14
Elaborate on what "dot plot" you're using?...
(a 'proc gchart' scatter plot? something with 'proc sgplot'? other?)
DanH_sas
SAS Super FREQ
For the SAS 9.2 release, we do not have a "sort by response" option for dot plots. However, you can work around this by presummarizing your data, sorting it by the response value, and plotting it in sgplot using a a scatter plot to simulate a dot plot by using options like the following:

proc sgplot data=sorted;
yaxis grid;
scatter x=freqcount y=category / markerattrs=(symbol=circlefilled);
run;

Let me know if this works for you.

Thanks!
Dan
Jaime
Fluorite | Level 6
I am using
proc sgplot data=Current_Pipeline_ByName;
dot Name/ response=Recs markerattrs=(symbol=circlefilled color=cxA6D96A size=12) NOSTATLABEL ;
yaxis display=(nolabel);
xaxis display=(nolabel);
run;


I did sort the data with the order i needed. But the proc sorts on its own.
Jaime
Fluorite | Level 6
Oh. I see u are using scatter.
That worked. Thanks

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

How to Concatenate Values

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 4 replies
  • 2023 views
  • 0 likes
  • 3 in conversation