[R] Broken x-axis?

Peter Dalgaard p.dalgaard at biostat.ku.dk
Wed Feb 1 18:12:50 CET 2006


Brett Ginsburg <ginsburg at uthscsa.edu> writes:

> Hello, 
> Sorry for the double post, but I just subscribed....
> 
> Does anyone have experience creating a graph with a segmented x-axis?
> 
> Specifically, as a pharmacologist, I frequently need to create a graph with
> 2 segments, one for vehicle, and one for active doses.
> 
> Here is an example...
> 
> |
> |
> |
> |
>  |----|   |----------------|
>  Vehicle    1  3  10  30  etc..
>               Doses
> 
> Any help is appreciated!

axis.break() in the plotrix package springs to mind. Or, simply use
plot(....axes=F) followed by axis() multiple times with labels= and
at= to get override the default numeric labels (some assembly may be
required if you need to "cheat" the coordinate system).

-- 
   O__  ---- Peter Dalgaard             Øster Farimagsgade 5, Entr.B
  c/ /'_ --- Dept. of Biostatistics     PO Box 2099, 1014 Cph. K
 (*) \(*) -- University of Copenhagen   Denmark          Ph:  (+45) 35327918
~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk)                  FAX: (+45) 35327907




More information about the R-help mailing list