BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
1 ACCEPTED SOLUTION

Accepted Solutions
PaigeMiller
Diamond | Level 26

On the left, it is under Tasks and Utilities

--
Paige Miller

View solution in original post

6 REPLIES 6
PaigeMiller
Diamond | Level 26

Tasks

     Graph

           Bar Chart

--
Paige Miller
zhawasli1
Obsidian | Level 7
data rel frequency;
input frelfreq mrelfreq;
datalines;
0.44444444 0.28571429
0.33333333 0.14285714
0.22222222 0.42857143
0 0.14285714;
run;

* Bar Charts;
PROC SGPLOT DATA = Rel frequency;
VBAR sex;
TITLE 'relative frequency';
RUN;


Do you mind pointing out to me why this command is not working?
PaigeMiller
Diamond | Level 26

@zhawasli1 wrote:
data rel frequency;
input frelfreq mrelfreq;
datalines;
0.44444444 0.28571429
0.33333333 0.14285714
0.22222222 0.42857143
0 0.14285714;
run;

* Bar Charts;
PROC SGPLOT DATA = Rel frequency;
VBAR sex;
TITLE 'relative frequency';
RUN;


Do you mind pointing out to me why this command is not working?
  1. Your data set name cannot have a space in it.
  2. There is no variable named SEX in this data set.

 

If you follow the method I provided earlier, going through the SAS Studio menus, you won't run into these problems.

--
Paige Miller
zhawasli1
Obsidian | Level 7
Thank you so much for your help, sorry if this sounds like a stupid question, where is the SAS Studio menu located? Thanks again,
PaigeMiller
Diamond | Level 26

On the left, it is under Tasks and Utilities

--
Paige Miller
jbilenas
Obsidian | Level 7
There are lots of examples using PROC SGPLOT. See the reference below. It can come in handy:

Slaughter, S.J. and Delwiche, L.D. (2010), “Using PROC SGPLOT for Quick High-Quality Graphs”. http://support.sas.com/resources/papers/proceedings10/154-2010.pdf

Jonas V. Bilenas

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

Mastering the WHERE Clause in PROC SQL

SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 6 replies
  • 578 views
  • 5 likes
  • 3 in conversation