I am trying to show the data points for the longitudinal data plots.
proc sgplot data=test_series;
series y=glucose x=time /group=subject;
xaxis values=(0, 6, 12, 24);
run;
I can only generate the following plots (first plot) using the above code.
I tried
symbol interpol=join value=dot;
and it is not working.
The second plot showed an example of data points. I only need black dots for my plots.
Any suggestions?
Thank you so much!
Thank you so much for your kind reply.
But markerattrs doesn't work with series statement.
proc sgplot data=test_series;
series y=glucose x=time /group=subject;
xaxis values=(0, 6, 12, 24);
markerattrs=(symbol=circlefilled size=25
color=black);
run;
Markerattrs does work with scatter statement. But how can I connect the data points if I use scatter statement with markerattrs?
proc sgplot data=test_series;
scatter x=time y=glucose / filledoutlinedmarkers
markeroutlineattrs=(color=red thickness=2)
markerattrs=(symbol=circlefilled size=25
color=black);
run;
Any other suggestions?
Thank you so much!
@jeniffer_jacob wrote:
I am trying to show the data points for the longitudinal data plots.
proc sgplot data=test_series;
series y=glucose x=time /group=subject;
xaxis values=(0, 6, 12, 24);
run;
I can only generate the following plots (first plot) using the above code.
I tried
symbol interpol=join value=dot;
and it is not working.
The second plot showed an example of data points. I only need black dots for my plots.
The SYMBOL command only works on old style graphics procedures, such as PROC GPLOT. It does not work in PROC SGPLOT.
You can add dots for the markers on the SGPLOT by adding the MARKERS option to the SCATTER statement, along with any or all of the options MARKERATTRS= MARKERFILLATTRS= MARKEROUTLINEATTRS= as described in the documentation at https://documentation.sas.com/?docsetId=grstatproc&docsetTarget=n1jkqnmk6y6ms9n1b2vvubyzqd4a.htm&doc...
Thank you so much for your kind reply.
But markerattrs doesn't work with series statement.
proc sgplot data=test_series;
series y=glucose x=time /group=subject;
xaxis values=(0, 6, 12, 24);
markerattrs=(symbol=circlefilled size=25
color=black);
run;
Markerattrs does work with scatter statement. But how can I connect the data points if I use scatter statement with markerattrs?
proc sgplot data=test_series;
scatter x=time y=glucose / filledoutlinedmarkers
markeroutlineattrs=(color=red thickness=2)
markerattrs=(symbol=circlefilled size=25
color=black);
run;
Any other suggestions?
Thank you so much!
I figured it out! Markerattrs needs markers in front of it for series statement.
Thanks again for your help!
Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!
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.
Ready to level-up your skills? Choose your own adventure.