If you are using ODS RTF, the default output type is EMF. Let's take EMF out of equation. Add this statement before your PROC SGPLOT run;
ODS GRAPHICS / outputfmt=png;
Let me know if that works better.
And the question is???
Is there a way to increase the width for lines and keep their style, I have multiple lines and used "lineattrs = (thickness=2px)" and it works only for first line. Is there another way to increase the line size?
Is this a grouped SERIES plot, or multiple SERIES statements?
Provide a working example. Either share some simple data or use one of the SASHELP datasets to demonstrate what you are doing.
Without seeing your code, let me make a few suggestions:
Hope this helps!
Dan
proc sgplot data=final(where=(paramcd="TEST")) noautolegend ;
by lbnam paramcd paramtxt lbtest2;
ods output sgplot=sg;
Title7 justify=left "#BYVAL4";
series X=X_ Y=cMean / group = TRT01A markers groupdisplay=cluster /*overlay*/ clusterwidth=0.15 name="T10" lineattrs=(thickness=2px);
scatter X=X_ Y=cMean / group = TRT01A yerrorlower=Lower yerrorupper=Upper groupdisplay=cluster /*overlay */ clusterwidth=0.15 markerattrs=(size=11px) errorbarattrs=(thickness=2px);
keylegend 'T10' / noborder down=1;
yaxis min=&minl max=&maxu valueattrs=(size=10) valueshint label=/*"&ytitle."*/ "Mean Change from Baseline (+/-SE)" labelattrs=(size=10);
xaxis min=1 max=2 values=(1 to 2 by 1) valueattrs=(size=10) valuesdisplay=('Baseline' 'Week X') valueshint label="Visit" labelattrs=(size=10);
run;
This is a code example which works in my end and it is getting me this result(picture below), If I will add "pattern=solid" it will remove all line attribute and type. Error bars worked correctly.
You might consider showing the code with the "pattern=solid". There a different places that could be used and results would vary.
Just to have a data point, please try the code below and tell me if you see the correct thicknesses:
data test;
do g=1 to 5;
x=0;
y=0;
output;
x=ranuni(123);
y=ranuni(321);
output;
end;
run;
ods graphics / attrpriority=none;
proc sgplot data=test;
series x=x y=y / group=g lineattrs=(thickness=2px);
run;
Yep man it is correct and lines size is changing for all of them.
Is this PNG or SVG output? What is the output type? HTML? PDF?
In my end it is RTF and I need to have that and not changing STYLE part
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.