BookmarkSubscribeRSS Feed
deleted_user
Not applicable
Hi All,

I am trying to plot a graph using gplot with area vs date. And I have two categories in area, they being ‘Inside Range’ and ‘Outside Range’.

I have got two symbol statement like the following:
symbol1 v=dot h=0.75 c=green; symbol2 v=dot h=0.75 c=red;

Now my data is a mix of area and sorted according to date. The x axis represents the date in the ascending order. But I want my data to be joined like the run chart but have different colours for Inside & Outside Range.

IF I individually add the i=join statement in both symbols, it connects all the data that are inside range separately to all the data which belong to the category of outside range.

Is there anyway where I can have one continous connection of all the points, regardless if it belongs to the category of inside range or outside range. The only way I want to differentiate the above categories is by colour?
2 REPLIES 2
Paige
Quartz | Level 8
It would help if you show the code you are using.

Assuming I understand your words properly, I think what you want is:

plot area*date=category;
deleted_user
Not applicable
yes sorry that's exactly what I want.

Here is my code so far:

Goptions ftitle = swiss ftext = zapf ;
symbol1 v=dot h=0.75 c=green; symbol2 v=dot h=0.75 c=red;
proc gplot data = data;
plot area*printdate = range /vaxis=axis1 haxis = axis2
href='25Nov10'd chref=lightblue lh=4;
axis1 label=(a=90 'Mean Area');
axis2 label=('Print Date');
title2 h=1.5 c=blue 'Area Vs Date (All Data)';
run;
quit;

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 2 replies
  • 1170 views
  • 0 likes
  • 2 in conversation