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-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

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.

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
  • 407 views
  • 0 likes
  • 2 in conversation