Hi. I'm running a multiple line plot with SGPLOT and I get 12 lines of basically the same color. All kinds of beiges or blues. Any way to make it have more vibrant colors? Here's my code and styleattrs does not work for me.
proc sort data=dataname; by Month hour; run; proc means data=dataname noprint; by Month hour; var Load temp dew win cc; output out=Meanz mean=; run; proc print data=Meanz; run; proc sgplot data=Meanz; series x=Hour y=Load / group=Month lineattrs=(thickness=2 pattern=solid); xaxis values=(0 to 23 by 1); run;
Something like this:
proc sgplot data=Meanz;
styleattrs datacontrastcolors=(red green blue cyan orange);
series x=Hour y=Load / group=Month lineattrs=(thickness=2 pattern=solid);
xaxis values=(0 to 23 by 1);
run;
What version of SAS is that?
What is the ERROR message? Show us the relevant parts of the SASLOG.
Please show us the relevant parts of the SASLOG. This would be the SASLOG for the entire PROC SGPLOT code from start to end of PROC SGPLOT, including warnings and errors.
proc product_status;
run;
This will give you the SAS version. That’s a really, really old EG version as well. I think current one is 7.3
Did the DataAttr map not work? If not, trying changing your overall style. Not sure what your destination is, but if it was PDF it would be like:
ods pdf file='path to file.pdf' <other options> style=seaside;
@matt23 wrote:
styleattrs does not work on my version of SAS. Any way around it ?
I'll just use gplot in this case. But can you help me make these lines thicker and delete the symbols?
symbol1 i = j value = W font = marker c = vivb h = 1 line = 1 width = 1; symbol2 i = j value = W font = marker c = bigb h = 1 line = 1 width = 1; symbol3 i = j value = W font = marker c = liolbr h = 1 line = 1 width = 1; symbol4 i = j value = W font = marker c = lilg h = 1 line = 1 width = 1;
@matt23 wrote:
I'll just use gplot in this case. But can you help me make these lines thicker and delete the symbols?
symbol1 i = j value = W font = marker c = vivb h = 1 line = 1 width = 1; symbol2 i = j value = W font = marker c = bigb h = 1 line = 1 width = 1; symbol3 i = j value = W font = marker c = liolbr h = 1 line = 1 width = 1; symbol4 i = j value = W font = marker c = lilg h = 1 line = 1 width = 1;
It seems relatively obvious how to make the lines thicker and delete the symbols. You ought to be able to figure this out yourself.
data meanz;
set sashelp.air;
group=year(date);
run;
proc sgplot data=Meanz NOCYCLEATTRS;
series x=date y=air / group=group lineattrs=(thickness=2 pattern=solid);
run;
OR try:
ods graphics/ ATTRPRIORITY=color;
proc sgplot ............
@Ksharp I think he's on SAS 9.2 which doesn't have a lot of the SGplot features.
Don't miss out on SAS Innovate - Register now for the FREE Livestream!
Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.
What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.
Find more tutorials on the SAS Users YouTube channel.