BookmarkSubscribeRSS Feed
Uriel26
Calcite | Level 5
Alguien podría ayudarme, quiero hacer una gráfica horizontal que me permita manejar dos conjuntos de datos en la misma gráfica,por ejemplo quiero tener alturas, diámetros y que estén en función de número de sitio
1 REPLY 1
Rick_SAS
SAS Super FREQ

You need to merge the data and convert it to "long" format:

data Heights;
input site height;
datalines;
1 10
2 12
3 17
4 6
;

data Diameters;
input site diameter;
datalines;
1 3.4
2 5.6
3 12.1
4 8.3
;

/* merge data and convert from wide to long format */
data Want;
merge Heights Diameters;
by site;
Group = "Height  "; Value = Height;   output;
Group = "Diameter"; Value = Diameter; output;
run;

proc sgplot data=Want;
hbarparm category=site response=Value / group=Group groupdisplay=cluster;
run;

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
  • 1 reply
  • 685 views
  • 0 likes
  • 2 in conversation