BookmarkSubscribeRSS Feed
SAS_AMUH
Obsidian | Level 7

 

proc sgplot data=didi noautolegend;
title1 "Trial";
styleattrs datacolors=(grey grey grey) backcolor=wh wallcolor=gwh;
vbox IPtotal / category=type group=type;
run;

 

The above programming worked fine, but I would like to know the coding technique for

 

1. setting range for X-axis

I want to set a higher maximum.

 

2. changing color of the line

This programming produced 3 box plots in one graph.

I was able to change the color that fills the box plots to all grey.

But I would like to change the line color of the box plots to all black. 

At the moment it came out in blue, green and red. 

I didn't set it so I assume SAS has automatically done it. 

 

If possible could you also please tell me, where to look at in the SAS guide for this kind of questions. 

Thank you for your help in advance. 

 

3 REPLIES 3
Karen_Horton
Obsidian | Level 7
To set the range for the XAXIS - use the XAXIS statement as displayed in the PROC SGPLOT section of SAS help. https://documentation.sas.com/?docsetId=grstatproc&docsetTarget=p07m2vpyq75fgan14m6g5pphnwlr.htm&doc...

Similarly, use the LINEATTRS option to change the colour of the line.

SAS Innovate 2025: Call for Content

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!

Submit your idea!

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

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

View all other training opportunities.

Discussion stats
  • 3 replies
  • 557 views
  • 0 likes
  • 2 in conversation