Data visualization with SAS programming

Y Axis Beginning Point in PROC SGPLOT

Accepted Solution Solved
Reply
Contributor
Posts: 30
Accepted Solution

Y Axis Beginning Point in PROC SGPLOT

[ Edited ]

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;

 


Accepted Solutions
Solution
‎04-11-2016 03:31 PM
Super User
Posts: 19,789

Re: Y Axis Beginning Point in PROC SGPLOT

[ Edited ]

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


All Replies
Solution
‎04-11-2016 03:31 PM
Super User
Posts: 19,789

Re: Y Axis Beginning Point in PROC SGPLOT

[ Edited ]

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?

Contributor
Posts: 30

Re: Y Axis Beginning Point in PROC SGPLOT

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!!

Super User
Posts: 11,343

Re: Y Axis Beginning Point in PROC SGPLOT

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.

Contributor
Posts: 30

Re: Y Axis Beginning Point in PROC SGPLOT

This has been very beneficial.  Thank you.

☑ This topic is solved.

Need further help from the community? Please ask a new question.

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