BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Edoedoedo
Pyrite | Level 9

I have a dataset which has GROUP | TIMESTAMP | VALUE.

  • GROUP can be 'A' or 'B'
  • TIMESTAMP is a timestamp
  • VALUE is a number

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

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
PaigeMiller
Diamond | Level 26

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...

--
Paige Miller

View solution in original post

1 REPLY 1
PaigeMiller
Diamond | Level 26

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...

--
Paige Miller

sas-innovate-white.png

Our biggest data and AI event of the year.

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.

 

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 1 reply
  • 731 views
  • 2 likes
  • 2 in conversation