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

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 1 reply
  • 265 views
  • 0 likes
  • 2 in conversation