Broken x-axis?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Broken x-axis?

Brett Ginsburg
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!

Thanks,

Dr. Brett C. Ginsburg
Division of Alcohol and Drug Addiction
Department of Psychiatry
The University of Texas Health Science Center at San Antonio
7703 Floyd Curl Dr.
San Antonio, TX 78229

Phone: 210-567-0871
FAX:   210-567-5381

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Reply | Threaded
Open this post in threaded view
|

Re: Broken x-axis?

Peter Dalgaard
Brett Ginsburg <[hidden email]> 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
~~~~~~~~~~ - ([hidden email])                  FAX: (+45) 35327907

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html