BookmarkSubscribeRSS Feed
M0m007
Calcite | Level 5

Hey there, 

i get a warning that i reached the max amount of Observations for a series plot. The warning says i could change the linepattern to solid or change the LINEPATTERNOBSMAX to a higher value. I cant find the ODS GRAPHICS LINEPATTERNOBSMAX option. is it because my SAS Academic is only SAS 9.4? i found somewhere that i need 9.45. 

 

Can you help me to show more Datapoints (~100.000)?

 

Thank you in advance.

M0m007

7 REPLIES 7
ballardw
Super User

What line pattern are you using currently? I can't imagine anything with any of the dash/dot patterns being very informative with that many data points and would start with a solid line, and likely a very thin one at that, to plot that many points.

 

It is usually a good idea to include the code of your plot and ODS Graphic options in effect so we can see things that may be involved. For instance use of a DISCRETE axis might affect displayed points due to the DISCRETEMAX option setting.

 

Also if using other than the default ODS STYLE it should be mentioned. If you are using a custom ODS STYLE the definition may be important as well.

 

M0m007
Calcite | Level 5

This is my code for creating the plot:

call execute("proc sgplot data=all_pumps;");
call execute(cat("title ", '"', "Efficiency decrease over time ", '"', ";"));
call execute(cat("xaxis label=",'"', "Time", '"', ";"));
call execute(cat("yaxis label=", '"', "Efficiency", '"', ";"));

do l = 1 to files;
	series_string = cat("series x=time y=efficiency", l, ";");
	call execute(series_string);
end;
call execute("; run;");

 And i don´t have code for ODS GRAPHICS because i can´t see the option if i type in ODS GRAPHICS there isn´t suggestion called LINEPATTERNOBSMAX

 

 

 

Tom
Super User Tom
Super User

Note it would be clearer for this discussion if you just copied the lines from the SAS LOG that CALL EXECUTE() would have generated so we can more easily see what SAS code your data step program is generating.

 1         + proc sgplot data=all_pumps;
 2         + title "Efficiency decrease over time ";
 3         + xaxis label="Time";
 4         + yaxis label="Efficiency";

 

PS:  Use the QUOTE() function to add quotes around strings.  It will know when to double existing quotes so you don' accidentally generate code with unbalanced quotes.

call execute(cat("title ",quote("Efficiency decrease over time"),";"));

 

Ksharp
Super User

I think it is not a good idea to plot so many datapoint. And can you post your code ? I think the right code should look like :

ods graphics/LINEPATTERNOBSMAX=200;
proc sgplot data=sashelp.class ;
scatter x=weight y=height;
run;
M0m007
Calcite | Level 5

It would also be possible to just use every 4th Value or so but it is still too much and im not sure if i want to use every 10th value.  Is there an easier option than creating a new table and only pick every nth row? I didn't found an option in SGLPLOT to select every nth row.

Ksharp
Super User
You can use heatmap to visualize so many line/points .
And Rick wrote a excellent blog about it:
https://blogs.sas.com/content/iml/2016/06/08/lasagna-plot-in-sas.html
M0m007
Calcite | Level 5

I just realized that this worked. I thought i didn't because the plot looked strange but that's because the INPUT statement messed it up.... Thanks 😄 

sas-innovate-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and save with the early bird rate—just $795!

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 7 replies
  • 164 views
  • 1 like
  • 4 in conversation