BookmarkSubscribeRSS Feed
PrinceAde
Obsidian | Level 7

Hi!

 

I'm trying to create a plot where BMI is the vaxis and Age_grp is the horinzontal axis.

I'm getting an error message in the log: Error: At least one PLOT or BUBBLE statement must be given.

 

What can I do, please?

This is my program below:

 

proc gplot data=mclib.bmi;
plot bmi*age_gp
vaxis=axis2 haxis= axis1;
symbol1 v=dot cv=red w=0.1;
axis1 order=('Middle' 'Old' 'Young')
label=(font="arial" "Age group");
axis2 order=(15,20,25,30,35,40)
label=(font="arial" angle=90 "Body Mass Index");
run;
quit;

2 REPLIES 2
PaigeMiller
Diamond | Level 26

Please examine your code very very carefully. You are missing a semi-colon in a key place.

 

By the way, @PrinceAde , from now on, please show us the ENTIRE log for a given PROC if there is an error message. Do not show us just the error messages. Please copy the log as text and click on the </> icon and paste the log into the window that appears.

PaigeMiller_0-1663012019648.png

--
Paige Miller
ballardw
Super User

@PrinceAde wrote:

Hi!

 

I'm trying to create a plot where BMI is the vaxis and Age_grp is the horinzontal axis.

I'm getting an error message in the log: Error: At least one PLOT or BUBBLE statement must be given.

 

What can I do, please?

This is my program below:

 

proc gplot data=mclib.bmi;
plot bmi*age_gp
vaxis=axis2 haxis= axis1;
symbol1 v=dot cv=red w=0.1;
axis1 order=('Middle' 'Old' 'Young')
label=(font="arial" "Age group");
axis2 order=(15,20,25,30,35,40)
label=(font="arial" angle=90 "Body Mass Index");
run;
quit;


My guess. Look at the highlighted text above.

 

But I think this is not the first time it has been recommended to provide the LOG and all the notes, messages and warnings.

SAS Innovate 2025: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!

How to Concatenate Values

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 2 replies
  • 569 views
  • 0 likes
  • 3 in conversation