Re: [R] How to change the axis labels of a wind rose plot?

From: David Winsemius <dwinsemius_at_comcast.net>
Date: Mon, 18 Feb 2008 16:53:05 +0000 (UTC)

Huilin Chen <hchen_at_bgc-jena.mpg.de> wrote in news:47B9A6C0.6090502_at_bgc-jena.mpg.de:

> I am make plots using the function windrose() from the package
> "circular". I would like to have the north on the top instead of
> having 0 degree on the right side.
> Does anybody know how to change the labels in a windrose plot?

There are probably better ways, but this is the record of my experiments starting with the help file example:

set.seed(1)
dir <- circular(runif(100, 0, 360), units="degrees") mag <- rgamma(100, 15)
sample <- data.frame(dir=dir, mag=mag)  

par(mfrow=c(2,2))
res <- windrose(sample)
#Rotates the data
sample$dir<-sample$dir+90
res <- windrose(sample)
axis.circular(labels=c("E","N","W","S")) #Overlayed the letter labels but leaves the degree labels

#Read the help file again and now suppress the axes res <- windrose(sample,axes=FALSE)
# and correctly(?) position labels
axis.circular(labels=c("E","N","W","S"),tcl.text = -0.1)

-- 
David Winsemius

______________________________________________
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 Mon 18 Feb 2008 - 16:56:38 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 18 Feb 2008 - 17:30:15 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