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-white.png

Special offer for SAS Communities members

Save $250 on SAS Innovate and get a free advance copy of the new SAS For Dummies book! Use the code "SASforDummies" to register. Don't miss out, May 6-9, in Orlando, Florida.

 

View the full agenda.

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