BookmarkSubscribeRSS Feed
mmohotsi
Quartz | Level 8

Hi

 

I am trying to use proc sgplot to draw an overlay two graphs using the group option and also draw a refline using the the date xaxis. The output does not show the refline and the xaxis values are too clustered

The data set is attached and the SAS-Code used is as follows:

proc sgplot data=help.help ;
vline Date / response=Numeric_entry group=area groupdisplay=cluster;
xaxis interval=month label='Expected_Date' LABELATTRS=(weight=bold size=12)
VALUEATTRS=(family=arial size=10 style=normal weight=normal );
refline '31mar2024'd / axis=x label=('Expected_Date') lineattrs=(color=red pattern=dash)
labelattrs=(size=12) labelloc=inside;

title1 j=c "Comparison " bold;

run;

1 REPLY 1
Ksharp
Super User
proc sgplot data=x.help ;
vline Date / response=Numeric_entry group=area groupdisplay=cluster;
xaxis interval=month type=time label='Expected_Date' LABELATTRS=(weight=bold size=12)
VALUEATTRS=(family=arial size=10 style=normal weight=normal );
refline '31mar2024'd / axis=x label=('Expected_Date') lineattrs=(color=red pattern=dash)
labelattrs=(size=12) labelloc=inside;

title1 j=c "Comparison " bold;

run;

Ksharp_0-1777024509809.png

 

Catch up on SAS Innovate 2026

Dive into keynotes, announcements and breakthroughs on demand.

Explore 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
  • 211 views
  • 3 likes
  • 2 in conversation