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 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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