[R] Colours in plot.circular

Rui Barradas ru|pb@rr@d@@ @end|ng |rom @@po@pt
Wed Aug 31 15:46:47 CEST 2022


Hello,

You can add points with ?points.circular
circular(1) and circular(2) prevent the warnings.


library(circular)

plot.circular(circular(1))
points.circular(circular(2), col = "red")


Hope this helps,

Rui Barradas

Às 14:36 de 31/08/2022, Nick Wray escreveu:
> I have some data - time in the year of maximum streamflow, and I can plot
> them easily enough using plot.circular.  But what i would like to do is to
> colour code the points through time using rainbow so that any trend in the
> distribution of the times of occurrence is more obvious.
> 
> Essentially this:
>   plot.circular(1)
>   plot.circular(2,add=T,col="red")
> 
> but the second line plots a new plot just with the red point.  Is there a
> way, either specific to plot.circular or possibly more generally whereby
> one can suppress the new plot from being drawn?  I can't find an example of
> this or an obvious way to do it if add=T doesn't work
> 
> I know that I could in theory do a whole routine using sine and cosine to
> plot but it seems a pointless to reinvent the wheel if I don't need to
> Thanks, Nick Wray
> 
> 	[[alternative HTML version deleted]]
> 
> ______________________________________________
> R-help using r-project.org mailing list -- To UNSUBSCRIBE and more, see
> 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