Re: [R] ggplot2 - two or more axis

From: David Hajage <dhajage.r_at_gmail.com>
Date: Sat, 15 Nov 2008 14:03:14 +0100

Thank you very much for the answer.

I have seen very often the number of subject at risk on survival graph (see my pdf file). It is very easy to plot the curve with geom_step(), but is there a better way to show the number of subjects at risk at each time ?

Thank you for your advice.

2008/11/14 hadley wickham <h.wickham_at_gmail.com>

> Hi David,
>
> > I'm trying to learn how to make a plot with the amazing package ggplot2.
> >
> > I was wondering if it was possible to draw 2 (or more) x (or y) axis in
> the
> > same graph. For example :
> > - I want to show two informations at each x coordinate : a survival
> curve,
> > I want to show the time (0, 12 and 24 months) and the number of subject
> at
> > risk at each time.
> > - I want to draw two curves that don't have the same unit
>
> Unfortunately, the capability is currently unavailable in ggplot2 and
> is unlikely to ever be available because I believe it is a
> fundamentally inaccurate means of presenting data. However, in the
> next version it will be much easier to created faceted displays with
> varying scales, which should be a better solution for many of these
> types of problems.
>
> Regards,
>
> Hadley
>
> --
> http://had.co.nz/
>



R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Received on Sat 15 Nov 2008 - 13:13:06 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Mon 17 Nov 2008 - 11:30:26 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive