For those reluctant to download the dataset, here's what it looks like:
In the simple case, you could create a box plot using code like this:
proc sgplot data=test7; vbox var1; run;
But the way the data is arranged in the dataset, you can't get the 3 boxplots (for var1, var2, and var3) plotted together using that simple case code.
Instead of var1, var2, and var3 being separate variables, you'll want them to be values of a single variable. Here's one way you could re-arrange the data using a simple data step:
data test7_mod (keep = x value); set test7; x='var1'; value=var1; output; x='var2'; value=var2; output; x='var3'; value=var3; output; run;
Which changes the way the data is structured to this:
And then, you can create a boxplot with the following code, using the group= option (note there are multiple ways to create a box plot in SAS - this is just one of them!)
proc sgplot data=test7_mod; vbox value / group=x; run;
... View more