plot (cox)

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

plot (cox)

New
In this code:

plot (cox, col=1:2, xscale=1, xlab="OS",  ylab="Probability")

the X scale is divided (by default) as:

 0 ... 50 ... 100 ... 150 ... 200

And I would like so:

0 ... 12 ... 24 ... 36 ... 48.

I looked ?plot(cox), but did not understand what argument is
responsible for this.

Pls, help me!

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
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.
Reply | Threaded
Open this post in threaded view
|

Re: plot (cox)

Sarah Goslee
You can presumably use xaxt="n" in your plot() statement (see ?par for
details), and then use axis() to make anything you'd like (see ?axis
for details).

Sarah

On Mon, Apr 15, 2019 at 12:51 PM Medic <[hidden email]> wrote:

>
> In this code:
>
> plot (cox, col=1:2, xscale=1, xlab="OS",  ylab="Probability")
>
> the X scale is divided (by default) as:
>
>  0 ... 50 ... 100 ... 150 ... 200
>
> And I would like so:
>
> 0 ... 12 ... 24 ... 36 ... 48.
>
> I looked ?plot(cox), but did not understand what argument is
> responsible for this.
>
> Pls, help me!
>
> ______________________________________________
> [hidden email] mailing list -- To UNSUBSCRIBE and more, see
> 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.



--
Sarah Goslee (she/her)
http://www.numberwright.com

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
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.
New
Reply | Threaded
Open this post in threaded view
|

Re: plot (cox)

New
Thanks, but too hard for me

Sarah Goslee <[hidden email]>:
> You can presumably use xaxt="n" in your plot() statement (see ?par for
> details), and then use axis() to make anything you'd like (see ?axis
> for details).
----------------------------------
>> Medic <[hidden email]> wrote:
>> In this code:
>> plot (cox, col=1:2, xscale=1, xlab="OS",  ylab="Probability")
>> the X scale is divided (by default) as:
>>  0 ... 50 ... 100 ... 150 ... 200
>> And I would like so:
>> 0 ... 12 ... 24 ... 36 ... 48.
>> I looked ?plot(cox), but did not understand what argument is
>> responsible for this.

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
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.
Reply | Threaded
Open this post in threaded view
|

Re: plot (cox)

Sarah Goslee
Well, you don't provide a reproducible example, so there's only so
much we can do. The help for par is a lot, but I told you which option
to use.
Did you try reading the examples for ?axis at all?


plot (cox, col=1:2, xscale=1, xlab="OS",  ylab="Probability", xaxt="n")
axis(1, at=seq(0, 48, by=12))

Or whatever axis values you actually want.

Sarah

On Mon, Apr 15, 2019 at 3:02 PM Medic <[hidden email]> wrote:

>
> Thanks, but too hard for me
>
> Sarah Goslee <[hidden email]>:
> > You can presumably use xaxt="n" in your plot() statement (see ?par for
> > details), and then use axis() to make anything you'd like (see ?axis
> > for details).
> ----------------------------------
> >> Medic <[hidden email]> wrote:
> >> In this code:
> >> plot (cox, col=1:2, xscale=1, xlab="OS",  ylab="Probability")
> >> the X scale is divided (by default) as:
> >>  0 ... 50 ... 100 ... 150 ... 200
> >> And I would like so:
> >> 0 ... 12 ... 24 ... 36 ... 48.
> >> I looked ?plot(cox), but did not understand what argument is
> >> responsible for this.



--
Sarah Goslee (she/her)
http://www.numberwright.com

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
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.
New
Reply | Threaded
Open this post in threaded view
|

Re: plot (cox)

New
Dear Sarah,
everything worked out! Thank You!!!
----------------------------------
Sarah Goslee <[hidden email]>:
> Well, you don't provide a reproducible example, so there's only so
> much we can do. The help for par is a lot, but I told you which option
> to use. Did you try reading the examples for ?axis at all?
> plot (cox, col=1:2, xscale=1, xlab="OS",  ylab="Probability", xaxt="n")
> axis(1, at=seq(0, 48, by=12))
> Or whatever axis values you actually want.

> > Sarah Goslee <[hidden email]>:
> > > You can presumably use xaxt="n" in your plot() statement (see ?par for
> > > details), and then use axis() to make anything you'd like (see ?axis
> > > for details).
> > ----------------------------------
> > >> Medic <[hidden email]> wrote:
> > >> In this code:
> > >> plot (cox, col=1:2, xscale=1, xlab="OS",  ylab="Probability")
> > >> the X scale is divided (by default) as:
> > >>  0 ... 50 ... 100 ... 150 ... 200
> > >> And I would like so:
> > >> 0 ... 12 ... 24 ... 36 ... 48.
> > >> I looked ?plot(cox), but did not understand what argument is
> > >> responsible for this.

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
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.