BookmarkSubscribeRSS Feed
timothymbanks
Calcite | Level 5

How do I get rid of circles on my line graph in SGPLOT?

6 REPLIES 6
PaigeMiller
Diamond | Level 26

Show us a screen capture of this plot. Use the "Insert Photos" icon; do not attach files.

 

Show us your code. Copy the code as text and paste it into the window that appears when you click on the "little running man" icon.

--
Paige Miller
SASJedi
SAS Super FREQ

This code for a simple line chart:

proc sgplot data=sashelp.stocks;
   where stock = "IBM" and year(date)=2000;
   vline date / response=close y2axis;
run;

Does not produce circles in the graphic output:

SASJedi_0-1661174839002.png

When you post a question, it is helpful to include the code you are using so we can help diagnose the problem more effectively.

 

Check out my Jedi SAS Tricks for SAS Users
ballardw
Super User

Do you have something related to MARKERS?

Or a DATTRMAP optional data set?

A Bubble Statement?

 

Please do not make us guess what your code is.

Copy the code involved from your SAS editor. On the forum open a text box using the </> icon that appears above the message window. Paste the code.

timothymbanks
Calcite | Level 5

Here is my code.

 

ods graphics on;
proc sgplot data = s1 noautolegend;
reg y = LOGIT x = XXXX/
lineattrs =(color = ligr);
series y = LOGIT x = XXXXXX;
yaxis label = 'LOGIT';
xaxis lable = 'XXXXX';
run;
ods graphics off;

PaigeMiller
Diamond | Level 26

It's always best to provide the information we asked for, like a screen capture of your plot. That way we don't have to guess at what you are seeing that you don't like, and possibly guess wrong (which wastes everyone's time).

 

Nevertheless, here is my guess.

 

Try the NOMARKERS option of the REG statement.

 

--
Paige Miller
ballardw
Super User

Proc SGPLOT REG statement by default includes markers for the individual points in the data. So very likely @PaigeMiller's suggestion will remove the markers.

The appearance of the markers, whether filled or open, circles, squares, diamonds or stars will depend on the ODS style and any overrides you might provide.

 

The Series will likely seem to connect those markers placed by REG but unless you request markers from the series plot it will not make markers.

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
  • 6 replies
  • 942 views
  • 7 likes
  • 4 in conversation