[R] Breaks in y-axis of histogram using lattice

Jim Lemon jim at bitwrit.com.au
Sun Mar 29 11:33:11 CEST 2009


John Poulsen wrote:
> Hello R-Users,
>
> I am plotting several histograms to demonstrate zero-inflated data 
> using lattice.  Because there are so many zeros, it is difficult to 
> see the observations of non-zeros on the graph (i.e. the y-axis scale 
> is too large).  I would like to break the y-scale so that the 
> non-zeros at least show up on the graph.  Below is an example of the 
> code for the histogram (e.g. I have several panels), how could I 
> include breaks in the y-axis for some panels and not others?
>
Hi John,
gap.barplot in the plotrix package may do what you want.

Jim




More information about the R-help mailing list