BookmarkSubscribeRSS Feed
smorkoc
Fluorite | Level 6

hi,

how can I change the color of box plots that I get after running proc univariate procedure?

here is my code;

 

ods graphics on;
proc univariate plot normal data=mydata.butner_new1;
by spacing;
var t5 t10 moisture log_flux1 log_flux2 ratio;
run;
ods graphics off;

3 REPLIES 3
Reeza
Super User

You can change the STYLE, which is the easiest method. 

 

If you want more control try using PROC SGPLOT with VBOX or HBOX. Then you can customize a lot more, but more code of course. 

 


@smorkoc wrote:

hi,

how can I change the color of box plots that I get after running proc univariate procedure?

here is my code;

 

ods graphics on;
proc univariate plot normal data=mydata.butner_new1;
by spacing;
var t5 t10 moisture log_flux1 log_flux2 ratio;
run;
ods graphics off;


 

Reeza
Super User
I didn't actually show you how to change style.

ODS <destination> style=seaside;

Eg.

ODS HTML file = '/folders/myfolders/demo.html' style=meadow;

ballardw
Super User

After they are created? If you have the SAS ODS Graphics Editor installed, start it. Then navigate to the location the graphic image was saved using the File menu selection box, select the image. (The name of the file should be in the log).

Depending on the type of edit you want you can edit and insert stuff. Read the documentation.

 

Or modify the code to use the colors you want as @Reeza suggests and recreate the graph. That may be faster in the long run.

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

Creating Custom Steps in SAS Studio

Check out this tutorial series to learn how to build your own steps in SAS Studio.

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
  • 1058 views
  • 0 likes
  • 3 in conversation