- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
I'm using proc sgplot and I would like a dark solid line over a fairly transparent scatter plot. Can I adjust the transparency for the line/markers individually?
It seems you that you can't put 'transparency' inside either set of parentheses.
proc sgplot data=mydata; reg y=hrs x=days / lineattrs=(thickness=4 color=red) markerattrs=(symbol=circlefilled size=6) transparency=0.85; yaxis grid values=(0 to 1800 by 100) label="ylabel"; xaxis label="xlabel"; run;
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
I might suggest two REG statements. One with the markers and transparency you want , the second with the line attributes you want and the NOMARKERS option.
The order of the REG statements will have some impact so I suspect the first should be the one with markers and the second the one without markers so the line draws over the previous line.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
I might suggest two REG statements. One with the markers and transparency you want , the second with the line attributes you want and the NOMARKERS option.
The order of the REG statements will have some impact so I suspect the first should be the one with markers and the second the one without markers so the line draws over the previous line.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
You could overlap scatter points or line to make it happen.
proc sgplot data=sashelp.heart;
scatter y=height x=weight/markerattrs=(symbol=circlefilled size=6) transparency=0.85;
reg y=height x=weight / lineattrs=(thickness=4 color=red ) nomarkers;
yaxis grid label="ylabel";
xaxis label="xlabel";
run;