BookmarkSubscribeRSS Feed
gx2144
Calcite | Level 5
proc sgpanel data = work2;
  format y1_race_eth race.;
  title "Distribution of VT by Race"; 
  panelby y1_race_eth / columns = 3;
  histogram y1pi_VT;
  density y1pi_VT / type =normal;
run;

Hi, I have a problem building plot using sas.

When adding "density y1pi_VT / type =normal" into the codes, the scale of Y changed. How can I keep the yaxis unchanged?

And why would the percent turns into 800 in scale?

Appreciated!

PLOTS WITHOUT KERNEL

 

gx2144_1-1596900708250.pnggx2144_0-1596900689071.png

2 REPLIES 2
PGStats
Opal | Level 21

Try adding option SCALE=PROPORTION to the histogram statement.

PG
gx2144
Calcite | Level 5

The proportion option cannot keep the yaxis unchanged. Seems like the codes below works. Thanks anyway.

rowaxis integer min=0 max=100 ;

sas-innovate-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!

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