0

Given the simple plot below, is there a way to adjust the y axis such that the range 0-6 takes 75% of the axis, while the rest (7-15) is shrunk into the last 25% of the y axis? I've looked at gap.barplot, but it doesn't let you specify the proportion of the axis for each section.

 counts <- table(mtcars$gear)
    barplot(counts, main="Car Distribution", 
        xlab="Number of Gears")
skellpco
  • 119
  • 6
  • Are you able to use ggplot? If so, have a look at [this](http://stackoverflow.com/questions/36027532/break-y-axis-in-ggplot2/36027879#36027879) answer, it should help. – Mist Dec 07 '16 at 02:03
  • @Mist The OP asked to change proportion of the axis, not to put a break in it and make it discontinous. After the break the steps still continue with the same distance – Daidon Dec 07 '16 at 02:07
  • @Daidon I realise that but the link I gave is essentially about showing that the values on the Y axis can be independent of the labels on the axis. Sorry, that wan't very clear. I'll put together an answer going into more detail - if the OP is OK with ggplot. – Mist Dec 07 '16 at 02:10
  • basically I need a version of gap.barplot that lets me specify the ylim for each section and where the break should be as a percentatage of the axis size – skellpco Dec 07 '16 at 02:17
  • You may need to offer a more convincing justification for this effort. For some of us. our plotting education suggests that this is a type of "plotting-fraud" or "plotting-distortion" and therefore is statistically immoral. – IRTFM Dec 07 '16 at 04:41
  • gah... If you don't know how to do it just don't answer. No need to accuse me of fraud. I trust my intended audience to look at the plot carefully. – skellpco Dec 07 '16 at 16:27

0 Answers0