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;
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?
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?
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!!
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.
This has been very beneficial. Thank you.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 16. Read more here about why you should contribute and what is in it for you!
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.
Select SAS Training centers are offering in-person courses. View upcoming courses for: