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...
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.