[R] About radial.labels in plotrix

Hugues François hugues.francois at irstea.fr
Mon Aug 18 18:25:37 CEST 2014


Hello,

Thanks for your answer. Of course I read the help but I didn't understand how to retrieve data from radial.lim. Maybe it is trivial for you but not for me.

Attached to this message you will find some test data but you will need to cast them using reshape and this line (assuming you import the test data as "data"):

data2 <- cast(data, gid ~ azimut, value = "angle")

Regards,

Hugues.


-----Message d'origine-----
De : Duncan Murdoch [mailto:murdoch.duncan at gmail.com] 
Envoyé : lundi 18 août 2014 16:45
À : Hugues François; r-help at r-project.org
Objet : Re: [R] About radial.labels in plotrix

On 18/08/2014 9:35 AM, Hugues François wrote:
> Hello,
>
>   
>
> As you can read in the small code below, I do not represent directly my data but its inverse in the limits of my radial plot and I would like to reorder grid labelling from the upper value at the center and the lower one at the graph's border. In my example I would like to have 40 at the center and 0 on the border.
>
>   
>
> http://oi62.tinypic.com/9zrntv.jpg
>
>   
>
> I tried to find examples of radial.labels parameter on the web but I didn't find any.
>
>   
>
> Here is my code :
>
>   
>
> radial.plot(
>
>                  mylim-data2[data2[,1]==sta,2:length(data2)],
>
>                  labels=c("N","NE","E","SE","S","SW","W","NW"),
>
>                  rp.type="p",
>
>                  radial.lim=c(0,mylim),
>
>                  line.col="#648bda",
>
>                  lwd = 2,
>
>                  start=1.56,
>
>                  clockwise = T)
>
>   
>

 From the help page, it looks as though radial.labels should allow you to set that.  You didn't post any data to demonstrate with, but I would assume it's a character vector (or numeric that will be coerced to
character) of the same length as radial.lim.

Duncan Murdoch


More information about the R-help mailing list