BookmarkSubscribeRSS Feed
nbasnet
Fluorite | Level 6

While using PROC GMAP and device=javaimg, the PATTERN statement functionality seems to work partially. For missing values, I have defined the color to be white and when I use device=png,gif,... , it seems to work fine. But when I use device=javaimg, the missing values color changes to other colors. Is there a trick to get around this?

7 REPLIES 7
ballardw
Super User

Any chance you are using Options nogstyle? Javaimg doesn't honor that option.

Also are you using the CDEFAULT option if doing a choropleth map?

nbasnet
Fluorite | Level 6

No, I'm not using OPTIONS NOGSTYLE or CDEFAULT.

Here is the code I'm using:

pattern1 v=s c=white;

pattern2 v=s c=color2;

pattern3 v=s c=color3;

pattern4 v=s c=color4;

goptions hsize=12 vsize=9 device=javaimg;

Proc gmap data=zip map=map;

id zip;

choro rate/discrete missing

annotate=anno

coutline=black

legend=legend1

format rate g&form._as.;

run;

When I run the procedure, SAS ignores the pattern1 which is defined for missing values and puts a new color for missing values in the legends.

Darrell_sas
SAS Employee

Use CDEFAULT as an option to CHORO.

nbasnet
Fluorite | Level 6

CDEFAULT is not supported by java.

ballardw
Super User

White should be assigned to the first non-missing value, formatted value, level or midpoint option. What value does your format g&form._as assign to missing?

nbasnet
Fluorite | Level 6

For missing, the value assigned is "." .

ballardw
Super User

Since you don't appear to be requesting a statistic from the value I would try setting the missing to a value way outside your other data (-1e8 or similar) and include that value in your format.

With out seeing a map its hard to tell but I think your comment "missing values color changes to other colors" indicates that missing may be treated differently that an actual value.

SAS INNOVATE 2024

Innovate_SAS_Blue.png

Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.

If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website. 

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.

Get the $99 certification deal.jpg

 

 

Back in the Classroom!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 7 replies
  • 1136 views
  • 0 likes
  • 3 in conversation