[R] unexpected plot behavior
Uwe Ligges
ligges at statistik.tu-dortmund.de
Sat Apr 21 18:07:47 CEST 2012
On 21.04.2012 16:49, Martin Renner wrote:
> When plotting a numerical vector against a factor, 'type="n"' seems to have no affect, e.g.
>> plot (1:10~factor (1:10), type = "n")
>
> looks just like
>> plot (1:10~factor (1:10))
This plots 10 boxplots and the data are passed from plot.formula.
plot.formula does not accept a "type" argument. plot.default() does, but
that is not used once your use a formula.
Uwe Ligges
>
> Plotting a numerical against itself works as expected:
>> plot (1:10, type = "n")
>
> I see the same behavior under debian gnu/linux, Mac OS X, and Win7 (all current versions, see below). Is this a bug?
>
> Regards,
> Martin
>
>
>
> Martin Renner
> Post-doctoral Fellow phone: 907-226 4672
> University of Washington or: 907-235 0728
> School of Aquatic and Fishery Sciences Seattle, USA
>
>
>
>> sessionInfo()
> R version 2.15.0 (2012-03-30)
> Platform: x86_64-unknown-linux-gnu (64-bit)
>
> locale:
> [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C
> [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8
> [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8
> [7] LC_PAPER=C LC_NAME=C
> [9] LC_ADDRESS=C LC_TELEPHONE=C
> [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
>
> attached base packages:
> [1] stats graphics grDevices utils datasets methods base
> ______________________________________________
> 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.
More information about the R-help
mailing list