BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
romangelzhaeuse
Fluorite | Level 6

Hello,

I am trying to customize colors in my Boxplots the following way:

proc boxplot data=Simon_f3r;
    plot q_TNF_alphaD_TNF_alphaC*Gruppe/
        boxstyle=SCHEMATICID cboxfill=big cboxes=big;
    where Gruppe in (1 2);
run;

 

But I only get results in the standard colors. Can anyone tell me what I am doing wrong? (I am using SAS Studio. I don't know wether this could be part of the problem.)

1 ACCEPTED SOLUTION

Accepted Solutions
PaigeMiller
Diamond | Level 26

I think for that to work, you need this command before you run the code.

 

ods graphics off;
--
Paige Miller

View solution in original post

7 REPLIES 7
PaigeMiller
Diamond | Level 26

I think for that to work, you need this command before you run the code.

 

ods graphics off;
--
Paige Miller
ballardw
Super User

@romangelzhaeuse wrote:

Hello,

I am trying to customize colors in my Boxplots the following way:

proc boxplot data=Simon_f3r;
    plot q_TNF_alphaD_TNF_alphaC*Gruppe/
        boxstyle=SCHEMATICID cboxfill=big cboxes=big;
    where Gruppe in (1 2);
run;

 

But I only get results in the standard colors. Can anyone tell me what I am doing wrong? (I am using SAS Studio. I don't know wether this could be part of the problem.)


Can you provide examples of the values of your variable BIG? Also did you set ODS Graphics on prior? That would interfere with use of the CBOXFILL and other options. From the documentation:

Global graphics statements (GOPTIONS, AXIS, and SYMBOL, for example) and PLOT statement options that specify details of graph appearance (such as CBOXFILL= and FONT= ) are ignored when ODS Graphics is enabled.

 

 

PaigeMiller
Diamond | Level 26

In this case, BIG is the name of a color.

--
Paige Miller
FreelanceReinh
Jade | Level 19

@PaigeMiller wrote:

In this case, BIG is the name of a color.


Indeed, "brilliant green." I was a bit surprised to see that SAS recognized it. It's contained in a list of (what seem to be legacy) "Predefined SAS Colors" which is easily available from the SAS v8 Online Doc (http://v8doc.sas.com/sashtml/gref/zgscheme.htm), but surprisingly hard to find in more recent documentation (in particular not at all in the built-in help files of SAS 9.4). Two of the rare sources:

PaigeMiller
Diamond | Level 26

It's also listed here:

http://support.sas.com/publishing/authors/extras/62007_Appendix.pdf

 

Except this document actually shows what color BIG should be, and I think it is wrong, I think the color shown on the line above is the actual BIG color.

 

Not to be confused with B1G, which is the Big Ten Conference logo.

--
Paige Miller
FreelanceReinh
Jade | Level 19

Thanks for the link. The visual color samples are very helpful. On my monitor the sample in the book (for "BIG") looks perfectly correct.

PaigeMiller
Diamond | Level 26

I keep forgetting that my PC has limited graphics capability, so maybe that's why I'm not seeing what I think is Brilliant Green next to BIG.

--
Paige Miller

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
  • 7 replies
  • 1590 views
  • 3 likes
  • 4 in conversation