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.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

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

View all other training opportunities.

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