SAS Proc SGplot scatter with percents on xaxis

Accepted Solution Solved
Reply
Contributor
Posts: 23
Accepted Solution

SAS Proc SGplot scatter with percents on xaxis

I have the following and would like to make the x-axis have percents, what code do I need?:

proc sgplot data=b ;

yaxis label='Temperature';

xaxis label='Ratio of EtOH in Extraction';

STYLEATTRS datacontrastcolors=(orange purple green) datalinepatterns=(1) datasymbols=(circlefilled trianglefilled circle);

scatter y=Y x=Percent / group=Zein ;

series y=low x=Percent / group=Zein; */lineattrs=(color=green pattern=dash);

series y=up x=Percent /  group=Zein; */lineattrs=(color=red);

run;


Accepted Solutions
Solution
‎11-08-2014 07:50 AM
SAS Super FREQ
Posts: 3,637

Re: SAS Proc SGplot scatter with percents on xaxis

You can just add the line

format x percent8.2;

directly after the PROC SGPLOT statement.

View solution in original post


All Replies
Contributor
Posts: 23

Re: SAS Proc SGplot scatter with percents on xaxis

I think I figured it out.  Just add an additional column as a character that has the x in the percent format if you can do that.

Solution
‎11-08-2014 07:50 AM
SAS Super FREQ
Posts: 3,637

Re: SAS Proc SGplot scatter with percents on xaxis

You can just add the line

format x percent8.2;

directly after the PROC SGPLOT statement.

🔒 This topic is solved and locked.

Need further help from the community? Please ask a new question.

Discussion stats
  • 2 replies
  • 172 views
  • 3 likes
  • 2 in conversation