Hi, I am working on R plot but i need to write some text for the bars where the value is = 0> counts3 4 5 0 12 * 0* 4 1 3 *0* 1 http://r.789695.n4.nabble.com/file/n4633189/Screenshot-2.png My aim is to write some comment in plot. http://r.789695.n4.nabble.com/file/n4633189/Screenshot-2.png How can we implement it? -- View this message in context: http://r.789695.n4.nabble.com/How-to-write-text-in-bar-plot-in-R-tp4633189.html Sent from the R help mailing list archive at Nabble.com.
Hi, I am working on R plot but i need to write some text for the bars where the value is = 0> counts3 4 5 0 12 0 4 1 3 0 1 http://r.789695.n4.nabble.com/file/n4633190/1.png My aim is to write some comment in plot. http://r.789695.n4.nabble.com/file/n4633190/2.png How can i implement this? Regards -- View this message in context: http://r.789695.n4.nabble.com/How-to-write-text-in-bar-plot-in-R-tp4633190.html Sent from the R help mailing list archive at Nabble.com.
? text Michael On Tue, Jun 12, 2012 at 8:49 PM, Manish Gupta <mandecent.gupta at gmail.com> wrote:> Hi, > > I am working on R plot but i need to write some text for the bars where the > value is = 0 > >> counts > > ? ? 3 ?4 ?5 > ?0 12 ?0 ?4 > ?1 ?3 ?0 ?1 > http://r.789695.n4.nabble.com/file/n4633190/1.png > > My aim is to write some comment in plot. > > http://r.789695.n4.nabble.com/file/n4633190/2.png > > How can i implement this? > > Regards > > > > -- > View this message in context: http://r.789695.n4.nabble.com/How-to-write-text-in-bar-plot-in-R-tp4633190.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.
Hi,
Try the format from this example:
mp <- barplot(VADeaths)
?tot <- colSums(VADeaths)
??? text(mp, tot+6, format(tot), xpd = TRUE, col = "red")
?text(mp, c("A","B","C","D"), xpd =
TRUE, col = "blue")
I hope it helps.
A.K.
----- Original Message -----
From: Manish Gupta <mandecent.gupta at gmail.com>
To: r-help at r-project.org
Cc:
Sent: Tuesday, June 12, 2012 9:49 PM
Subject: [R] How to write text in bar plot in R?
Hi,
I am working on R plot but i need to write some text for the bars where the
value is = 0
> counts
?
? ? 3? 4? 5
? 0 12? 0? 4
? 1? 3? 0? 1
http://r.789695.n4.nabble.com/file/n4633190/1.png
My aim is to write some comment in plot.
http://r.789695.n4.nabble.com/file/n4633190/2.png
How can i implement this?
Regards
--
View this message in context:
http://r.789695.n4.nabble.com/How-to-write-text-in-bar-plot-in-R-tp4633190.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.
This does not meet my need as i need to write text as well. On Wed, Jun 13, 2012 at 9:41 AM, Manish Gupta <mandecent.gupta@gmail.com>wrote:> Hi, > > I am working on R plot but i need to write some text for the bars where the > value is = 0 > > > counts > > 3 4 5 > 0 12 * 0* 4 > 1 3 *0* 1 > > http://r.789695.n4.nabble.com/file/n4633189/Screenshot-2.png > > My aim is to write some comment in plot. > > http://r.789695.n4.nabble.com/file/n4633189/Screenshot-2.png > > > How can we implement it? > > > > > -- > View this message in context: > http://r.789695.n4.nabble.com/How-to-write-text-in-bar-plot-in-R-tp4633189.html > Sent from the R help mailing list archive at Nabble.com. > > ______________________________________________ > R-help@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. >-- Manish Gupta (M.Sc Bioinformatics) Bioinformatics Software Developer (Scientist) MSC Status company KL-59200 Malaysia [[alternative HTML version deleted]]
Here Text message is kind of error message for no data available. regards -- View this message in context: http://r.789695.n4.nabble.com/How-to-write-text-in-bar-plot-in-R-tp4633190p4633211.html Sent from the R help mailing list archive at Nabble.com.