[R] How to Break Axis in Lattice Plot

Deepayan Sarkar deepayan.sarkar at gmail.com
Wed Dec 10 21:44:27 CET 2008


On Tue, Dec 9, 2008 at 8:04 PM, Larry Ma <larry_ma at verizon.net> wrote:
> Dear All,
>
> I have searched the following problem in the R help achives, and there did
> not seem to be solutio for it.
>
> The problem is how to break the axis in the xyplot (lattice plot).  I read
> the posts using the package plotrix, buy it doesn't work with the xyplot,
> which is lattice based.
>
> A simple example is attached below:
>
> xyplot(c(1:10,100)~c(1:10,100))
>
> What I would like to do is break the axis from 10 to 100 so that the scale
> from 1:10 still intact, but I can show the data at 100 as well.  It has to
> be based on xyplot as I have conditions in my data.

You can use shingles: see (compare to Figure 10.15)

http://lmdvr.r-forge.r-project.org/figures/figures.html?chapter=10;figure=10_16;theme=stdBW;code=right

-Deepayan



More information about the R-help mailing list