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

I'm trying to color three areas on a map with different shades of orange but the colors seem to be different shades of brown, doesn't matter if I use the color name (for example BIO for brilliant orange) or the Hex code CXD9892B, it looks like light brown to me.

Thanks,

Brian

1 ACCEPTED SOLUTION

Accepted Solutions
GraphGuy
Meteorite | Level 14

Hmm ... looking at the code, looks like it will use the colors from the first 10 pattern statements.

You might want to add "goptions reset=pattern;" just before the pattern statements.

Also, if you change a few of the colors to ones like yellow, green, red, do they show up in the map?

View solution in original post

4 REPLIES 4
GraphGuy
Meteorite | Level 14

Are you using Proc Gmap, and pattern statements? (or are you relying on a Goptions color list, or ODS Styles to control the colors?)

If you change the colors in your pattern statements to other colors (other than shades of orange), does that work (such as yellow, pink, green)? If this does not work, then perhaps there's somehting about your code (possibly the order of statements, etc?) or maybe something about the way you're running it (maybe in a Stored Process, or from EG?) that migth be affecting things.

More details, and an example of the code you're using, will help us help you better! Smiley Happy

BTAinRVA
Quartz | Level 8

Robert,

Thanks again for responding. The code I'm using is pasted below (P.S. What is the best way to copy/paste code in here?. Do I have toggle HTML mode?)


goptions reset=all;

/*goptions colors=(CXFF0000 CX00FF00 CX0000FF);*/

ods graphics on / reset=all;

ODS HTML style=Default;

pattern1 v=s c=cxFFFFFF; pattern2 v=s c=cx0000FF; pattern3 v=s c=CXD9892B; pattern4 v=s c=cxFF6600; pattern5 v=s c=cx0000FF; pattern6 v=s c=cx0000FF; pattern7 v=s c=cx008000; pattern8 v=s c=cx008000; pattern9 v=s c=cx9999FF; pattern10 v=s c=cxFF9900; pattern11 v=s c=cx800080; pattern12 v=s c=cx993300; pattern13 v=s c=cxffdd00; pattern14 v=s c=cxffdc00; pattern15 v=s c=cxffd800; pattern16 v=s c=cxffd100; pattern17 v=s c=cxffcd00; pattern18 v=s c=cxffc000; pattern19 v=s c=cxffb700; pattern20 v=s c=cxff9a00; pattern21 v=s c=cxff8700; pattern22 v=s c=cxff7700; pattern23 v=s c=cxff5400; pattern24 v=s c=cxff3400; pattern25 v=s c=cxff0000;

proc gmap data=gazetteer5 map=vazip3 anno=anno_county2;

    id zcta; /* matches values between response and map dataset */

    choro VaComm /* response variable */ / levels=10 /* pattern/color levels */

    nolegend coutline=same  /*turn off boundary lines*/;

run;quit;

ODS HTML close;

ods graphics off;

GraphGuy
Meteorite | Level 14

Hmm ... looking at the code, looks like it will use the colors from the first 10 pattern statements.

You might want to add "goptions reset=pattern;" just before the pattern statements.

Also, if you change a few of the colors to ones like yellow, green, red, do they show up in the map?

BTAinRVA
Quartz | Level 8

Robert,

Yes, I have 9 communities that I'm color-coding and all the rest are white (pattern1). I just tried using some of the color codes from ColorBrewer and it seems to be working as I want it to.

Thanks again for your help!

Brian

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

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