BookmarkSubscribeRSS Feed
crlevy13
Calcite | Level 5

Hi there,

I am looking to try to use the angle function when creating a chart in SAS. Here is my code, but the lables are still horizontal. Your advice is appreciated!

 

proc format;

value insure 1='Yes' 2='No';

value race 1='Mexican American' 2='Other Hispanic' 3='Non-Hispanic White' 4='Non-Hispanic Black' 6='Non-Hispanic Asian' 7='Other Race - Including Multi-Racial';

run;

proc gchart data=levy.nhanesdata;

vbar HIQ011/group=RIDRETH3 midpoints=1 to 2 by 1;

format HIQ011 insure.;

format RIDRETH3 race.;

*Axis and pattern control;

*horizontal axis;

axis3 value=(angle=55);

title1 'Figure 2. Number of people with & without health insurance compared by race and ethnicity';

run;

2 REPLIES 2
Reeza
Super User
I see you use axis3, but I don't see where you've assigned the axis, ie gaxis=axis3 or maxis=axis3.

Unless you're doing a 3d chart why would you have 3 axis?
ChrisNZ
Tourmaline | Level 20

Axis statements, like title statements, are global. This means they are not part of the procedure.

You could define your title and axis3 before the proc gchart line.

And you then have to use the axis3 definition in your vbar statement as explained above.

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
  • 792 views
  • 0 likes
  • 3 in conversation