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

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 4 replies
  • 1137 views
  • 0 likes
  • 3 in conversation