John Beamer
2007-Dec-16 04:31 UTC
[R] Changing the origin in polar.plot in plotrix package
I am trying to draw a polar plot, which is easy enough to do in the plotrix package through the polar.plot function. However I would like to change the origin of the length vector. For instance all my length values are between 75 and 85, so instead of having the origin as 0 (the default) I'd like it to be, say, 50. Is there any way do to this in the polar.plot function, or if not is there an additional package that will accomplish this. I am running R 2.5 and the latest version of plotrix. Thanks for your help John Beamer (http://www.hardballtimes.com)
John Beamer
2007-Dec-16 04:54 UTC
[R] Changing the origin in polar.plot in plotrix package
I am trying to draw a polar plot, which is easy enough to do in the plotrix package through the polar.plot function. However I would like to change the origin of the length vector. For instance all my length values are between 75 and 85, so instead of having the origin as 0 (the default) I'd like it to be, say, 50. Is there any way do to this in the polar.plot function, or if not is there an additional package that will accomplish this. I am running R 2.5 and the latest version of plotrix. Thanks for your help John Beamer (http://www.hardballtimes.com)
hadley wickham
2007-Dec-16 05:37 UTC
[R] Changing the origin in polar.plot in plotrix package
Hi John, One alternative would be to use ggplot2 with a polar coordinate system: library(ggplot2) qplot(mpg, wt, data=mtcars) + coord_polar() qplot(mpg, wt, data=mtcars, ylim=c(3,4)) + coord_polar() etc. You can see more examples of polar coordinates at http://had.co.nz/ggplot2/coord_polar.html although I'm still working on good axes etc for plots in polar coordinates. Hadley On 12/15/07, John Beamer <jrbeamer at gmail.com> wrote:> I am trying to draw a polar plot, which is easy enough to do in the > plotrix package through the polar.plot function. > > However I would like to change the origin of the length vector. For > instance all my length values are between 75 and 85, so instead of > having the origin as 0 (the default) I'd like it to be, say, 50. > > Is there any way do to this in the polar.plot function, or if not is > there an additional package that will accomplish this. > > I am running R 2.5 and the latest version of plotrix. > > Thanks for your help > John Beamer > (http://www.hardballtimes.com) > > ______________________________________________ > 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. >-- http://had.co.nz/