BookmarkSubscribeRSS Feed
NeilH
Obsidian | Level 7

Hello -

 

Is there a way that I can control the formatting of how the percentages are displayed ('pct') to the right of each horizontal bar? It defaults to two decimal places and I would prefer it shows just one.

 

Thank you.

 

Neil

 

goptions border xpixels=1000 ypixels=200;
axis1 label=("Frequency");
axis2 label=("Student Location");

proc gchart data=ips.allvars1;
hbar Q7770 /
pct
descending
axis=axis1 maxis=axis2;
run;

2 REPLIES 2
PaigeMiller
Diamond | Level 26

In the very old PROC CHART, you should be able to add a format in the AXIS1 statement using the FORMAT= option.

 

You would be wise to start moving your work to the much newer (and feature packed) PROC SGPLOT.

--
Paige Miller
NeilH
Obsidian | Level 7

Thank you. The specifics of the syntax of these graph options gets tricky.

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

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
  • 2 replies
  • 192 views
  • 0 likes
  • 2 in conversation