BookmarkSubscribeRSS Feed
Abdu
Calcite | Level 5

Hi All,

Here is my issue:

I have a LB test dataset, some of the test value is not in a standard way.   We want to create a speghetti plot, with just these data point in different color.  I am using SAS 9.2 SGplot.  The data looks like this:

Subjid  Value testDay standard

001     2.3     -6          Y

001     3.2     1          Y

001     4.8     7          N

001     5.6     14          Y

001     4.5     21          Y

......

How do I show the Standard=N as different color?

Thanks,

Abdu.

2 REPLIES 2
GraphGuy
Meteorite | Level 14

Here's an example showing how to color one line separately from the others using Proc Gplot:

 

http://robslink.com/SAS/democd89/healthcare_spending.htm

http://robslink.com/SAS/democd89/healthcare_spending_info.htm

 

healthcare_spending.png

Jay54
Meteorite | Level 14

Separate out the curve data you want to show in red into a new column.  Keep all the other curve data the same.  Then use one SERIES with GROUP and color set to grey to display all the curves.  Use another SERIES plot overlay (after the first) with this new column, color it red.

 

 

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!

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.

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
  • 920 views
  • 1 like
  • 3 in conversation