Hello all!
would very much appreciate your help with SGPLOT and HIGHCAP statement.
I have monthly usage data for 2 patients:
I created a horizontal plot using SGPLOT, with colors marking the usage categories (red=low, orange=medium/low, yellow=medium, green=high) and I would like an arrow to mark the ongoing patient. I use the following code:
proc sgplot data=usage dattrmap=attrmap ;
highlow y=Ptid low=start high=end / type=bar group=Usage
lineattrs=(color=black pattern=solid) barwidth=1
lowlabel=idname highcap=highcap attrid=Usage_Rang labelattrs=(color=black size=8) ;
keylegend / title='Usage ' valueattrs=(size=8pt) titleattrs=(size=8pt);
scatter y=Ptid x=start / markerattrs=(size=0) ;
xaxis grid label = 'Treatment duration (Months)' offsetmax=0.02 values=(0 to 36 by 3);
yaxis grid display=(noticks novalues nolabel) discreteorder=data;
footnote1 j=c HEIGHT=10pt FONT='Arial' '"Arrow-heads" denote Patient On Therapy';
run;
but in output it seems like the arrow is at the beginning of the line, not at the end of it.
any thoughts about why is this happening and how to fix it?
any advice would be highly appreciated!
This is an exact duplicate of you other post. I'm going to lock this one and leave the other open so that the answers will all be in one place. https://communities.sas.com/t5/SAS-Programming/Arrow-in-not-at-the-end-of-the-bar-with-SPGLOT-and-HI...
Available on demand!
Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.
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.