BookmarkSubscribeRSS Feed
LindaH1120
Fluorite | Level 6

HELP!  :smileyconfused:

I have a proc gchart where I would LOVE to use the order=("value1" "value2") with my GROUP variable.  So far, I can switch the midpoints order, but I really need to order the GROUP variable.  I get error messages below with my failed code.

I understand that "Order value specified in the AXIS statement does not match a midpoint value".  But I don't want to order the midpoints variable!  I am able to order the midpoints with the variable &primary_var1 when I omit the order=("") in the axis statement.  But again, that does not switch up the order of the GROUP var.  Of course, I can code a dummy variable and then use it in a proc sort, but I was hoping not to do that.   Any ideas?

12873 axis1 label=none value=(font="arial" c=black angle=0)

12873! minor=none split='*' INTERVAL=EVEN order=(0 to 100 by 20)

12873! ;

12874 axis2 label=none value=(font="arial" c=black);

12875 axis3 label=none value=(height=3 angle=0) order=("Smith"

12875! "Jones" "Jackson" "Ford" "Anderson" "Cooper"

12876 "Long" "Torres" "Hughes" "All");

12877

12878 title1 "Ratings";

12879 *footnote1 j=L "Attorney Work Product"; *footnote2 j=L

12879! "Privleged and Confidential";

12880

12881 proc gchart data=gchart;

12882 format sortit subfmt.;

12883 label concat="00"x pct_col="00"x; /* takes away the titles */  !!!  Is this a crazy way to eliminate labels?

12884 vbar &primary_var1 /

12885 legend=legend1

12886 type=sum

12887 sumvar=PCT_COL

12888 subgroup=sortit

12889 raxis=axis1

12890 gaxis=axis2

12891 maxis=axis3

12892 space=.5

12893 width=2.25

12894 group=word

12895 midpoints= "Male" "Female";

12896 run;

WARNING: Order value specified in the AXIS statement does not

match a midpoint value.

WARNING: The bottom horizontal axis labeled word could not be

fit as specified. The axis values will overwrite.

WARNING: There was not enough room to use the specified width

of 2.25 and space of 0.5 for the bars.

WARNING: No bars were drawn. This could have been caused by

ORDER= on the AXIS statement. You may wish to use the

MIDPOINTS= option on the VBAR statement or make sure

the values of the GROUP=word variable match the ORDER=

values (if given) on axis statement 2.

WARNING: The specified/default value of VSIZE of 3.5000 inches

and VORIGIN of 0.0000 inches exceeds the maximum for

the PNG printer. VSIZE is changed to 2.4479 inches.

1 REPLY 1
LindaH1120
Fluorite | Level 6

OMG!  I just solved my own problem!  I had the axis2 and axis3 pointed incorrectly to the maxis and gaxis!

Problem resolved!

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

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
  • 1 reply
  • 2286 views
  • 0 likes
  • 1 in conversation