[R] Greyed text in the background of a plot

Mark Difford mark_difford at yahoo.co.uk
Fri Sep 12 16:32:37 CEST 2008


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 will overlie the first-plotted items. I think this is
generally true.

See:
?colors
colors()
?text
?par

Regards, Mark.


Agustin Lobo-4 wrote:
> 
> 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=4237353244338529080&sourceid=searchfeed
> )
> 
> Thanks
> 
> Agus
> -- 
> Dr. Agustin Lobo
> Institut de Ciencies de la Terra "Jaume Almera" (CSIC)
> LLuis Sole Sabaris s/n
> 08028 Barcelona
> Spain
> Tel. 34 934095410
> Fax. 34 934110012
> email: Agustin.Lobo at ija.csic.es
> http://www.ija.csic.es/gt/obster
> 
> ______________________________________________
> 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.
> 
> 

-- 
View this message in context: http://www.nabble.com/Greyed-text-in-the-background-of-a-plot-tp19456533p19457146.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list