Question

how do you make a vertical bar chart on sas 9.4 with hours per week on...

how do you make a vertical bar chart on sas 9.4 with hours per week on the y axis and education on the x-axis?

a vertical BOX chart im sorry
0 0
Add a comment Improve this question Transcribed image text
Answer #1

Hello! Since both bar chart and vertical box are mentioned giving the base code declaration for both , followed by the code to create the box chart. Use the appropriate one.

Below are the type of declarations used to create a CHART on SAS

GCHART bar, pie, block, donut, star charts
GPLOT scatter, bubble, line, area, box, regression plots
G3D 3-D scatter and surface plots
GCONTOUR contour plots
GMAP maps with user-defined data

Below is the code for creating the Box chart

/* Open the LISTING destination and assign the LISTING style to the graph */
ods listing style=listing;
ods graphics / width=5in height=2.81in;
title 'Education Analysis';

/* Run PROC SGPLOT on data STUDENT.EDUCATION, selecting for type of subject */
proc sgplot data=student.education(where=(type in ('Maths' 'Chemistry'))) ;
/* generate a vertical box plot that groups by education type
* and shows hours per week */
vbox Hours_per_week / category=origin group=type groupdisplay=cluster
lineattrs=(pattern=solid) whiskerattrs=(pattern=solid);
xaxis display=(nolabel);
yaxis grid;
keylegend / location=inside position=topright across=1;
run;

Table name : student

Column name : education,Hours_per_week

Hope your question is resolved. Cheers :)

Add a comment
Know the answer?
Add Answer to:
how do you make a vertical bar chart on sas 9.4 with hours per week on...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT