## change the Y axis interval and max number on a SGPLOT

Solved
Frequent Contributor
Posts: 108

# change the Y axis interval and max number on a SGPLOT

Hi All,

I'm using Proc SGPLOT to create several VBAR graphs. I want to have consistency between them all and to show a 500 interval on the Y axis and a max interval of 4,000.

Apologies for the test data - I can't get the dates to go in properly - any help to get this right would be appreciated.

``````data test;
Input WEEK_END_DT   \$ Count;
Datalines;
2017-07-09 2738
2017-07-16 3361
2017-07-23 3567
2017-07-30 3421
2017-08-06 3382
2017-08-13 3216
2017-08-20 2697
2017-08-27 2475
2017-09-03 2327
2017-09-10 2434
2017-09-17 2497
2017-09-24 2455
2017-10-01 2510
2017-10-08 1814
2017-10-15 2106
2017-10-22 2456
2017-10-29 1932
2017-11-05 1986
2017-11-12 1754
2017-11-19 1635
2017-11-26 1597
2017-12-03 1708
2017-12-10 1439
2017-12-17 1379
2017-12-24 1399
2017-12-31 611
2018-01-07 1376
2018-01-14 1640
2018-01-21 1745
2018-01-28 1422
2018-02-04 1872
2018-02-11 1996
2018-02-18 1456
2018-02-25 1007
2018-03-04 965
2018-03-11 992
2018-03-18 906
;
Run;``````

``````Proc SGPlot data=Test;
Title "AAA Count";
VBar WEEK_END_DT / response=COUNT;
Run;``````

Any help appreciated.

Cheers

Dean

Accepted Solutions
Solution
‎03-21-2018 08:01 PM
Super User
Posts: 13,084

## Re: change the Y axis interval and max number on a SGPLOT

YAXIS or XAXIS statements control the appearance of the axis.

Try

Yaxis values=(0 to 4000 by 500);

All Replies
Solution
‎03-21-2018 08:01 PM
Super User
Posts: 13,084

## Re: change the Y axis interval and max number on a SGPLOT

YAXIS or XAXIS statements control the appearance of the axis.

Try

Yaxis values=(0 to 4000 by 500);

Frequent Contributor
Posts: 108

## Re: change the Y axis interval and max number on a SGPLOT

@ballardw thanks heaps

☑ This topic is solved.