Quantcast
Channel: Recent Questions - Stack Overflow
Viewing all articles
Browse latest Browse all 11631

Adjusting the plot axis range and intervals

$
0
0

I am new to 'R' but have started to produce some useful plots. My query is how do I adjust the range and intervals on both axes?

In the example shown, the first issue is the X axis is showing test number values that are not integers; so test value 2.5 does not make any sense and instead, I need to have say 2,4,6,8,10,12, or a grid line at each value from 1 to 12.

For the Y axis, if I wanted a bit more space above and below the points, how can I adjust the scale range from say 0.5 - 2.0 instead of 1.2 - 1.8?

I'm finding the vast array of possible coding a bit dizzying.

enter image description here

Here is the code :

SOH1 %>% ggplot(aes(Test.No.,MJ, color = MJ))+geom_point(size=3,alpha=0.7)+ geom_smooth(method=lm,se=F) 

Thanks

Julian


Viewing all articles
Browse latest Browse all 11631

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>