BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. 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

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

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
  • 667 views
  • 5 likes
  • 3 in conversation