BookmarkSubscribeRSS Feed
ari
Quartz | Level 8 ari
Quartz | Level 8

I am trying to make  time series plot of few subjects grouped by dose.

The subejcts are colored according to the group but the line connecting the data points looks strange as shown in graph below.

Ideally I want the data points for each subjects connected per subject (but colored per the grouping variable) rather than the grouping variable.

Any solution to this issue ?

 

 

code:


proc sgplot data = data1;
series x = time y = value/
markers
markerattrs = (symbol = circlefilled)
group = dosec
lineattrs = (thickness = 2);
run;

2 REPLIES 2
ballardw
Super User

Try sorting the data by the Group variable and then the xaxis variable.

Series plots often try to connect points by order in the data set which often is not the order you want the graph to be drawn.

ari
Quartz | Level 8 ari
Quartz | Level 8

Thanks but its still doesnt solve the grouping issue. the data points are not connected per subject. 

SAS Innovate 2025: Call for Content

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!

Submit your idea!

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
  • 669 views
  • 0 likes
  • 2 in conversation