BookmarkSubscribeRSS Feed
VCM
Obsidian | Level 7 VCM
Obsidian | Level 7

Asking for a co-worker (no, really I am!) Smiley Wink so I don't have specific code (I'm not on his project...)

 

He is making a swimlane plot with subject ID on the y-axis and timepoint on the x-axis.  There are only a few subjects, so the bars are "thick" to fill up some space.

 

On these bars he is placing 2 symbols--X and a square--representing events that are not necessarily related, using scatterplot.  However, we have subjects for whom these 2 events happened at the same timepoint:

 

barchart.jpg

 

Subject #2 shows how these symbols actually print--the two of them overlay each other.  However, the client wants it displayed like subject #1, with the symbols stacked. 

 

 

Any ideas?

 

 

Many thanks!

VCM

2 REPLIES 2
Jay54
Meteorite | Level 14

Try using the JITTER option on the SCATTER statement.

Ksharp
Super User
data x;
 x='x';y=1;a=1.2;b=1.2;
 run;
 
 proc sgplot data=x;
 vbarparm category=x response=y  ;
 scatter x=x y=a/ discreteoffset=-0.4 markerattrs=(symbol=X size=14);
 scatter x=x y=b/ discreteoffset=0.4 markerattrs=(symbol=square size=14);
 run;

SAS INNOVATE 2024

Innovate_SAS_Blue.png

Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.

If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website. 

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.

Get the $99 certification deal.jpg

 

 

Back in the Classroom!

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

View all other training opportunities.

Discussion stats
  • 2 replies
  • 794 views
  • 0 likes
  • 3 in conversation