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-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!

Register now

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

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