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

Hello,

 

I am having an issue getting rid of the grey line that's coming up in the middle of my plot.  It comes up every time I make a graph with sgplot and I would like to get rid of it.  Any help is appreciated!  The code and plot are located below.

 

proc means data=all mean median max min std;
var LAI_mean;
class trt cult week;
output out=meandat mean=averageLAI stderr=stderr;

data reshape(drop=stderr);
set meandat;
lower = averageLAI - stderr;
upper = averageLAI + stderr;

proc sgplot data=reshape;
scatter x=week y=averageLAI /yerrorlower=lower yerrorupper=upper;
series x=week y=averageLAI /group=trt
lineattrs=(pattern=solid thickness=2);
where cult=1;
title1 'LAI cult 1';

run;

 

Joe_NMSU_0-1599667240852.png

 

1 ACCEPTED SOLUTION

Accepted Solutions
ballardw
Super User

The legend is telling you that you have missing values for your group variable TRT.

 

It may be that your Proc Means wants the option NWAY set so that the summaries don't create the groups you are getting. Or maybe you only want to plot or keep some of the _TYPE_ levels.

 

YOU have to look at the result of your Proc means data to decide which records you want to plot/ keep.

View solution in original post

2 REPLIES 2
ballardw
Super User

The legend is telling you that you have missing values for your group variable TRT.

 

It may be that your Proc Means wants the option NWAY set so that the summaries don't create the groups you are getting. Or maybe you only want to plot or keep some of the _TYPE_ levels.

 

YOU have to look at the result of your Proc means data to decide which records you want to plot/ keep.

Joe_NMSU
Calcite | Level 5
Awesome! Exactly what I needed to know, thanks for the help.

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

Mastering the WHERE Clause in PROC SQL

SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 2 replies
  • 595 views
  • 1 like
  • 2 in conversation