I would like to change my Y axis of these histograms to start at 20 and end at 180 AND making it so there is always 20 between each number (20, 40, 80, ...). How should I do it?
I read about yaxis command, but I just dont know how to make it work as I am a total noob in coding (no education in that area).
This is the graph I am working on:
And this is the code I have:
orientation$head_linear <- ifelse(orientation$head > 180, 360 - orientation$head, orientation$head)
orientation$body_linear <- ifelse(orientation$body > 180, 360 - orientation$body, orientation$body)
par(mfrow = c(2,1))
hist(orientation$head_linear, main = NULL, ylim=c(20,180), ylab = NULL, xlab = NULL)
hist(orientation$body_linear, main = NULL, ylim=c(20, 180), ylab = NULL, xlab = " Odchylka od vletového otvoru ")
I have set the limit of Y axis with ylim code, but it doesnt seem to work (I have succesfully used it before in different work).