[R] How to get bubbles on times series plot

David Winsemius dwinsemius at comcast.net
Thu Jan 7 03:06:49 CET 2010


On Jan 6, 2010, at 12:40 PM, cirtey wrote:

>
> Hi;
> lissage<-function(variable)
> {
>    library(pastecs)
>    ENTREE.ts <- ts(projet$ENTREE)
>    ENTREE.dec <- decaverage(ENTREE.ts, order=variable,  sides=2,
> ends="fill")
>    plot(ENTREE.dec, col=c(1, 4), xlab="temps",ylab="Nombre
> d'entrées",main=paste("Moyenne mobile d'ordre ",variable," sous R"),
> stack=FALSE, resid=FALSE,
>    lpos=c(50, 12.3))
> }
> lissage(100)

?plot.ts
?plot

I suspect you will get what you desire by adding ... ,type= "p", ...  
in the plot call. The default point plotting symbol, an open circle,   
is very similar to what you are calling "bubbles". You can control the  
size of those circles with cex= <some_numeric_magnification_factor>

-- 
David


> My code gives this:
> http://n4.nabble.com/file/n1008225/mb.png
> but i want that:
> http://n4.nabble.com/file/n1008225/mboriginal.png
> I can't find the option to change into bubbles.
> Can you help me? Thanks.
> -- 
> View this message in context: http://n4.nabble.com/How-to-get-bubbles-on-times-series-plot-tp1008225p1008225.html
> Sent from the R help mailing list archive at Nabble.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.

David Winsemius, MD
Heritage Laboratories
West Hartford, CT



More information about the R-help mailing list