Re: [R] Greyed text in the background of a plot

2008-09-14 Thread Yihui Xie
Hi Agus, Yes you are absolutely right about the awkward jumps in the animations and this has also been my big problem for a long time. To solve this problem, I think I need a third-party software, as I don't know any solutions merely using R. Maybe the "swfc" utility in the SWF Tools or the Proces

Re: [R] Greyed text in the background of a plot

2008-09-14 Thread Agustin Lobo
Yes, it's easy but you get a significant "jump" between a time step and the next one, which makes the animation unpleasant and difficult to follow. I think that this problem is because of the use of plot(), which redraws everything, and that there is no way around within R (is it?). I also unde

Re: [R] Greyed text in the background of a plot

2008-09-13 Thread Yihui Xie
Hi Mark, Actually I have been considering for a long time to include such kinds of animations in the package 'animation'. In the next release (1.0-2), you will see a new function 'Rosling.bubbles()', which can generate animations like: http://animation.yihui.name/da:ts:hans_rosling_s_talk Of cou

Re: [R] Greyed text in the background of a plot

2008-09-12 Thread Mark Difford
Hi Yihui, That's good, I like it! Very nice site. Regards, Mark. Yihui Xie wrote: > > Well, his talk seems to have attracted a lot of people... You may > simply use gray text in your plot. Here is an example: > > ## > x = runif(10) > y = runif(

Re: [R] Greyed text in the background of a plot

2008-09-12 Thread Prof Brian Ripley
An alternative is to use semi-transparency, which can be helpful if you want to do more than one such annoation. E.g. add text(1, 1, "More", col=rgb(0,0,0,0.2), cex=3) to this example. (I'd say it was closer to what "ghosted" might mean.) On Fri, 12 Sep 2008, Mark Difford wrote: Hi Agust

Re: [R] Greyed text in the background of a plot

2008-09-12 Thread Yihui Xie
Well, his talk seems to have attracted a lot of people... You may simply use gray text in your plot. Here is an example: ## x = runif(10) y = runif(10) z = runif(10, 0.1, 0.3) cl = rgb(runif(10), runif(10), runif(10), 0.5) # transparent colors! par(m

Re: [R] Greyed text in the background of a plot

2008-09-12 Thread Mark Difford
Hi Agustin, >> Is there any way of having a greyed ("ghosted") text... Yes! ## plot(1, type="n") text(1, "Old Grey Whistle Test", col="slategray4", cex=2) text(1, y=1.2, "OH!", col="grey95", cex=4) Then plot what you want on top. If you export or plot to a PDF/ps device the last-plotted items

[R] Greyed text in the background of a plot

2008-09-12 Thread Agustin Lobo
Hi! Is there any way of having a greyed ("ghosted") text (i.e, 2006) in the background of a plot? I'm making a dynamic plot and would like to show the year of each time step as a big greyed text in the background. (the idea comes from Hans Rosling video: http://video.google.com/videoplay?docid=4