BookmarkSubscribeRSS Feed
SChander1
Calcite | Level 5

Hi everyone,

 

I am trying to make histogram or barchart and want to see the incidence of hypertension in each group. Please guide me for code.

 

thanks

4 REPLIES 4
PeterClemmensen
Tourmaline | Level 20
SChander1
Calcite | Level 5

Thanks,

 

i am struggling to set y axis (Hypertension incidence (%) as incidence and x axis as my age and its categories.

 

 

PeterClemmensen
Tourmaline | Level 20

Post your code please?

Reeza
Super User

Are you using SAS VA, EG or Studio? Are you programming or using the GUI?

How is your data structured? Are values pre-calculated or do you need to calculate statistics? Which chart do you want, a histogram or bar chart? They are slightly different. How many groups do you have? Do you want the bars clustered or stacked for groups?

 

We don't have enough information to help you unless you provide more information. 

A vague question, gets vague answers. 

 

If you can't share your data, make fake data or use one of the data sets in SASHELP as a starting point. 

 

I highly recommend sticking with SGPLOT. 

The graphics gallery here has a bunch of examples you can use as a starting point.

 


@SChander1 wrote:

Hi everyone,

 

I am trying to make histogram or barchart and want to see the incidence of hypertension in each group. Please guide me for code.

 

thanks


 

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

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