BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
lchristensen
Obsidian | Level 7

I have code creating a plot via SGPLOT. The output has vertical lines for each data point. I want a line graph with each series. How we I get rid of the vertical lines?

 

1 ACCEPTED SOLUTION

Accepted Solutions
ballardw
Super User

You need to include data as well.

 

XAXIS DISCRETE is intended for x values that aren't continuous, or nearly so.

Series plots generally assume that axis values will be continuous.

So it is unlikely that you actually want a DISCRETE axis for a SERIES plot. I sugges removing your XAXIS Discrete option and see if things make more sense.

View solution in original post

6 REPLIES 6
PaigeMiller
Diamond | Level 26

Code should be posted as text in the SAS code box (click on the "little running man" icon). Since I never download file attachments, I request you include a screen capture of your graph in your reply by clicking on the "Insert Photos" icon.

--
Paige Miller
lchristensen
Obsidian | Level 7

One person wants it imbedded as text, another as an attachment. 

lchristensen
Obsidian | Level 7

Proc Sort data=Work.Read_Port;
by SMFDTIME RRS5POID;
run;
ods pdf file = "z:\Mainframe\GPSE\MAR and HMAI\HMAI Samples\POID.pdf";
proc sgplot data=Work.Read_Port;
series y = RRS5ERCS x = SMFDTIME;
series y = RRS5EWCS x = SMFDTIME;
title1 'Hitachi Mainframe Analytic Interpreter: Subtype-5, RRS5ERCS, RRS5EWCS';
run;
ods pdf startpage=now;
ods pdf close;

ballardw
Super User

You need to include data as well.

 

XAXIS DISCRETE is intended for x values that aren't continuous, or nearly so.

Series plots generally assume that axis values will be continuous.

So it is unlikely that you actually want a DISCRETE axis for a SERIES plot. I sugges removing your XAXIS Discrete option and see if things make more sense.

lchristensen
Obsidian | Level 7

Removing XAXIS discrete made no difference, I actually put that in hoping it would.

 

lchristensen
Obsidian | Level 7

I printed the data and there were multiple values for the RRS5POID and it interleaved them since it was sorted by date/time/RRS5POID and some of the RRS5POID values were zeroes. Adding a 'by SMFRSSN RRS5POID' gave me the proper results.

 

Thank you

 

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 6 replies
  • 435 views
  • 0 likes
  • 3 in conversation