I have a dataset which has GROUP | TIMESTAMP | VALUE.
Note: the groups does not overlap in time. For instance, group 'A' has timestamps from jan18 to jun18, while group 'B' has timestamps from nov19 to dec19.
I want to plot with sgplot these two time series aside, in "the same row", one on the left one on the right. I tried with sgpanel, but since with sgpanel the time axis is in common it spans from jan18 to dic19, so there is a huge hole in the middle. Instead, I just need to have the first graph on the left with the series 'A' centered in jan18-jun18, and a second graph on the right with the series 'B' centered in nov19-dec19 (so larger, since the timespan is smaller), and with the Y axis "the value" in common.
How can I do that?
I hope I made myself clear.
Thanks
Regards
T
You can plot both of these on one PROC SGPLOT and use the RANGES= option of the XAXIS statement to eliminate the "hole" between the two series. https://documentation.sas.com/?cdcId=pgmsascdc&cdcVersion=9.4_3.4&docsetId=grstatproc&docsetTarget=p...
You can plot both of these on one PROC SGPLOT and use the RANGES= option of the XAXIS statement to eliminate the "hole" between the two series. https://documentation.sas.com/?cdcId=pgmsascdc&cdcVersion=9.4_3.4&docsetId=grstatproc&docsetTarget=p...
Don’t miss the livestream kicking off May 7. It’s free. It’s easy. And it’s the best seat in the house.
Join us virtually with our complimentary SAS Innovate Digital Pass. Watch live or on-demand in multiple languages, with translations available to help you get the most out of every session.
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.