BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
BLarson
Obsidian | Level 7

Hello

Is there a way to set the begining Y axis value in PROC SGPLOT. My minimum value is 1200 in the below and as a result my Y Axis begins with the number 1200, however the ask from the client is to set the Y axis point lower, realizing this will generate more white space.  Thank you.

 

PROC SGPLOT DATA=WORK.HEAPPS_6;
SERIES X=AppMonth_BusDay Y=App5dayAvg / LINEATTRS=(COLOR=BLUE PATTERN=SOLID) LEGENDLABEL='Total 5/Day Avg';
SERIES X=AppMonth_BusDay Y=Forecast / LINEATTRS=(COLOR=BLUE PATTERN=SHORTDASH) LEGENDLABEL='Total FC';
KEYLEGEND / ACROSS=1 DOWN=1 LOCATION=INSIDE POSITION=TOP;
XAXIS LABEL='Month And Business Day' LABELATTRS=(WEIGHT=BOLD FAMILY=Courier);
YAXIS TYPE=LINEAR;
YAXIS LABEL='5 Day Application Avg' LABELATTRS=(WEIGHT=BOLD FAMILY=Courier);
TITLE BOLD 'HE Application Inflow' FONT=Courier;
WHERE (APP_MO >= month(&M1EDTE)) AND (APP_MO <= month(&AODTE)) ;
RUN;

 

1 ACCEPTED SOLUTION

Accepted Solutions
Reeza
Super User

Try either the MIN= or VALUES options available on the YAXIS statement.

 

http://support.sas.com/documentation/cdl/en/grstatproc/62603/HTML/default/viewer.htm#xaxis-stmt.htm

 

You also have multiple YAXIS statements, I'm not sure how SAS will handle that, usually you only have 1. Does the log mention anything with respect to that?

View solution in original post

4 REPLIES 4
Reeza
Super User

Try either the MIN= or VALUES options available on the YAXIS statement.

 

http://support.sas.com/documentation/cdl/en/grstatproc/62603/HTML/default/viewer.htm#xaxis-stmt.htm

 

You also have multiple YAXIS statements, I'm not sure how SAS will handle that, usually you only have 1. Does the log mention anything with respect to that?

BLarson
Obsidian | Level 7

I had attempted the MIN= option however that did not work.  But thanks to the insight you gave regarding the multiple Y axis, I eliminated the multiple entires for 1 YAXIS entry and then the MIN= option worked.  I had no log issues or notations prior so I did not realize this was the cause for the issue.  Thank you again!!

ballardw
Super User

Many procedures will have a behavior of "use last entered option". This corresponds to a not terribly common use of the "interactive mode" which allows a user to submit a few lines, and then a few more and repeat until a "run" or "proc" end of block causes the code to be submitted. In that mode you might realize that you made a mistake and correct the statement before submission. So SAS doesn't create warnings or errors for the re-use of a statement that may only be used once per procedure call.

BLarson
Obsidian | Level 7

This has been very beneficial.  Thank you.

SAS INNOVATE 2024

Innovate_SAS_Blue.png

Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.

If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website. 

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.

Get the $99 certification deal.jpg

 

 

Back in the Classroom!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 4 replies
  • 3392 views
  • 1 like
  • 3 in conversation