Re: [R] what's wrong with plot(..., type="p")?

From: Peter Ehlers <ehlers_at_ucalgary.ca>
Date: Tue, 26 Apr 2011 03:26:52 -0700

On 2011-04-26 03:08, Ivan Calandra wrote:
> Dear users,
>
> I'm trying to get a dot plot but always end up with a boxplot. Can
> someone please tell me what I am doing wrong?
>
> df<- structure(list(FACETTE = structure(c(1L, 1L, 1L, 1L, 2L, 2L,
> + 2L, 2L), .Label = c("base", "tip"), class = "factor"), Sq = c(274836,
> + 0.74182, 0.709205, 0.984552, 279869, 255712, 26566, 301464)), .Names =
> c("FACETTE",
> + "Sq"), class = "data.frame", row.names = c(1L, 2L, 3L, 4L, 6L,
> + 7L, 8L, 9L))
>
> with(df, plot(Sq~FACETTE, type="p"))
> with(df, plot(Sq~FACETTE, type="n"))
>
> I get boxplots in both cases. What should I do to get points instead of
> boxes?
>
> Thanks in advance for your help,
> Ivan
>

Are you looking for stripchart()?

Peter Ehlers



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 Tue 26 Apr 2011 - 10:29:35 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 Tue 26 Apr 2011 - 12:40:34 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