I am trying to create a Dot Plot to show comparisons from a pre-test to a post-test. Similar to what I copied below.
I want to have a categorical Y axis, and a numeric X axis, with two dots showing the values for the pre- and post-test for each category. Ideally they could be connected with a line in between. It would also be ideal to include data labels for each dot, either inside the dot or to the left/right. These are easy to do in R and Tableau, and can be made with some wrangelling in Excel/Powerpoint, but I have not been able to find a way to create what I want in Visual Analytics.
I have tried creating this using the graph builder in SAS VA 8.3 on VIYA by combining different chart types, but have not had any luck getting what I want. Both the Dot Plot chart and the Vector Chart require you to have a numeric Y axis. I can't seem to get them to communicate with a chart that has a Categorical Y axis.
Any ideas would be great!
You can try to create a custom graph:
Add a schedule plot for the lines and set the start and end value as a measure. Set the bar width to a smaller value to get a 'line'.
Add two scatter plots with a shared categorical role and let one represent the min and the other the max value.
Of course you need to prepare your data as well.
I'm not able to share a example now, but give it a try.
it is how @DMenkveld has proposed.
"All Metro Areas",0.11,0.14
FILENAME REFFILE FILESRVC FOLDERPATH='/Public' FILENAME='health.txt'; PROC IMPORT DATAFILE=REFFILE DBMS=DLM OUT=WORK.IMPORT; delimiter=","; GETNAMES=YES; RUN; PROC CONTENTS DATA=WORK.IMPORT; RUN; data mkt.hh(promote=yes); set import; format pct_2013 pct_2014 miny maxy; miny=min(pct_2013, pct_2014); maxy=max(pct_2013, pct_2014); run;
See how to use one filter for multiple data sources by mapping your data from SAS’ Alexandria McCall.
Find more tutorials on the SAS Users YouTube channel.