Hello,
I would like to create boxplots for 2 variables (distance and time) compared between two types of transport (air and ground).
All variables are numeric with the transport variable having 2 values (1 for air & 0 for ground).
Is there a way to produce such boxplots in one graph?
Thank you!
As ballardw said post an example picture would better illustrate your question.
data have;
set sashelp.class;
label='Weight';value=weight;output;
label='Height';value=height;output;
keep sex label value;
run;
proc sgpanel data=have;
panelby sex label/layout=lattice novarname uniscale=column spacing=0;
vbox value;
run;
Short answer: Yes it is possible.
Longer, provide some example data in the form of a working data step as data structures often matter when attempting to plot values and some concrete example data we can write code and see how close we get to what you want.
As ballardw said post an example picture would better illustrate your question.
data have;
set sashelp.class;
label='Weight';value=weight;output;
label='Height';value=height;output;
keep sex label value;
run;
proc sgpanel data=have;
panelby sex label/layout=lattice novarname uniscale=column spacing=0;
vbox value;
run;
This code actually worked beautifully! Thank you 🙂
Don’t miss the livestream kicking off May 7. It’s free. It’s easy. And it’s the best seat in the house.
Join us virtually with our complimentary SAS Innovate Digital Pass. Watch live or on-demand in multiple languages, with translations available to help you get the most out of every session.
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.
Ready to level-up your skills? Choose your own adventure.