## proc sgplot - axis scale and tick marks

Solved
Occasional Contributor
Posts: 14

# proc sgplot - axis scale and tick marks

How do I keep the scale of y-axis from 0 to 10 but only display tick values at 2 4 6 8. Essentially, I want to have 5 intervals (from 0 to 10) instead of 3, so my scatter plot is placed in the middle of the graph instead of being more spread out.

My dataset has only 4 observations at (2 4 6 8). Please find an attachment with display of plots.

Accepted Solutions
Solution
‎10-15-2015 03:47 PM
Super Contributor
Posts: 261

## Re: proc sgplot - axis scale and tick marks

Hi,

Try adding offsetmix = 1 and offsetmax = 1 into the yaxis statement along with values = (2 4 6 8).

Thanks.

All Replies
Posts: 1,147

## Re: proc sgplot - axis scale and tick marks

Hi,

In the sgplot you could use statement as below

yaxis min=0 max=10 values=( 2 4 6 8 );

Thanks
Jag
Thanks,
Jag
Occasional Contributor
Posts: 14

## Re: proc sgplot - axis scale and tick marks

I did run this code below with no luck.

Solution
‎10-15-2015 03:47 PM
Super Contributor
Posts: 261

## Re: proc sgplot - axis scale and tick marks

Hi,

Try adding offsetmix = 1 and offsetmax = 1 into the yaxis statement along with values = (2 4 6 8).

Thanks.

Occasional Contributor
Posts: 14

## Re: proc sgplot - axis scale and tick marks

Worked perfectly, thanks!
Super Contributor
Posts: 261

## Re: proc sgplot - axis scale and tick marks

You're welcome.
🔒 This topic is solved and locked.