BookmarkSubscribeRSS Feed
Tiny_Kane
Obsidian | Level 7

Hi there,

 

I have the SGPLOT code below. However, the datalinepatterns option could not work. The output plot lines are still all solid. Does any one know how to change the line style? I want two solid lines and two dot lines.

 

Thank you!

 

proc sgplot data=forplotfinal;
styleattrs datacontrastcolors=(blue red blue red) datalinepatterns=(solid dot solid dot);
series x=index_time y=stat/lineattrs=(thickness=4)group=group2;
scatter x=index_time y=cohort/ markerchar=remaining2 markercharattrs=(size=8 weight=bold) y2axis group=cohort;
where cancern=1;
xaxis values=(-12 to 12 by 2 );
yaxis values=(0 to 22500 by 2500) offsetmin=0.2 min=0;
y2axis offsetmax=0.9 display=none min=1 max=2;
run;


plot output example.PNG
4 REPLIES 4
data_null__
Jade | Level 19

Does this option have any effect?

 

ods graphics / attrpriority=none;
Tiny_Kane
Obsidian | Level 7

YES!!!! It works!! Thank you very much!!!

Jay54
Meteorite | Level 14

That implies that (somehow) you were using HTMLBlue as your style.  HTMLBlue uses AttrPriority=Color, which favors color change over patterns.

pmbrown
Quartz | Level 8

this solved it for me also, thanks. I guess it should be marked as the solution

SAS INNOVATE 2024

Innovate_SAS_Blue.png

Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.

If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website. 

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.

Get the $99 certification deal.jpg

 

 

Back in the Classroom!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 4 replies
  • 2161 views
  • 9 likes
  • 4 in conversation