how to add value on the bar ploted by barplot()? and the axis label is too big, anyone know how to change their font , thanks -- Xiaogang Yang Sensorweb Research Laboratory http://sensorweb.vancouver.wsu.edu/ Washington State University Vancouver [[alternative HTML version deleted]]
On Jun 1, 2009, at 11:21 PM, Xiaogang Yang wrote:> how to add value on the bar ploted by barplot()?Depending on what you really mean, possibly: ?barplot ?text # there _is_ a worked example on the barplot help page. # true, it does put the labels above the bars, but the modification would be trivial. # or ?addtable2plot {in package plotrix}> > and the axis label is too big, anyone know how to change their > font , thanks?barplot # again ... barplots help page seems quite clear cex.names = 0.5 # or a number less than one of your choice -- David Winsemius, MD Heritage Laboratories West Hartford, CT
Xiaogang Yang
2009-Jun-02 04:08 UTC
[R] Fwd: how to add value on the bar ploted by barplot()
---------- Forwarded message ---------- From: Xiaogang Yang <gavinxyang@gmail.com> Date: Mon, Jun 1, 2009 at 9:02 PM Subject: Re: [R] how to add value on the bar ploted by barplot() To: David Winsemius <dwinsemius@comcast.net> I mean I have bar in my plot graph, but I want add the bar real value at top of it. On Mon, Jun 1, 2009 at 8:46 PM, David Winsemius <dwinsemius@comcast.net>wrote:> > On Jun 1, 2009, at 11:21 PM, Xiaogang Yang wrote: > > how to add value on the bar ploted by barplot()? >> > > Depending on what you really mean, possibly: > > ?barplot > ?text # there _is_ a worked example on the barplot help page. > # true, it does put the labels above the bars, but the modification > would be trivial. > # or > ?addtable2plot {in package plotrix} > >> >> and the axis label is too big, anyone know how to change their font , >> thanks >> > > ?barplot # again ... barplots help page seems quite clear > > cex.names = 0.5 # or a number less than one of your choice > > -- > > David Winsemius, MD > Heritage Laboratories > West Hartford, CT > >-- Xiaogang Yang Sensorweb Research Laboratory http://sensorweb.vancouver.wsu.edu/ Washington State University Vancouver -- Xiaogang Yang Sensorweb Research Laboratory http://sensorweb.vancouver.wsu.edu/ Washington State University Vancouver [[alternative HTML version deleted]]
Xiaogang Yang wrote:> how to add value on the bar ploted by barplot()? > > and the axis label is too big, anyone know how to change their font , thanks > >Hi Xiaogang, Have a look at the second example for the "boxed.labels" function in the plotrix package. For the second question, look at par(cex.axis =) Jim
David Winsemius
2009-Jun-02 12:20 UTC
[R] Fwd: how to add value on the bar ploted by barplot()
This is the trivial modification to the example on the help page that I was thinking of. #the example code mp <- barplot(VADeaths) # default tot <- colMeans(VADeaths) text(mp, tot + 3, format(tot), xpd = TRUE, col = "blue") #the modification tot <- colSums(VADeaths) text(mp, tot + 3, format(tot), xpd = TRUE, col = "red") You can learn quite a bit by running the examples on graphics pages. -- David On Jun 2, 2009, at 12:08 AM, Xiaogang Yang wrote:> ---------- Forwarded message ---------- > From: Xiaogang Yang <gavinxyang at gmail.com> > Date: Mon, Jun 1, 2009 at 9:02 PM > Subject: Re: [R] how to add value on the bar ploted by barplot() > To: David Winsemius <dwinsemius at comcast.net> > > > I mean I have bar in my plot graph, but I want add the bar real > value at top > of it. > > On Mon, Jun 1, 2009 at 8:46 PM, David Winsemius <dwinsemius at comcast.net > >wrote: > >> >> On Jun 1, 2009, at 11:21 PM, Xiaogang Yang wrote: >> >> how to add value on the bar ploted by barplot()? >>> >> >> Depending on what you really mean, possibly: >> >> ?barplot >> ?text # there _is_ a worked example on the barplot help page. >> # true, it does put the labels above the bars, but the >> modification >> would be trivial. >> # or >> ?addtable2plot {in package plotrix} >> >>> >>> and the axis label is too big, anyone know how to change their >>> font , >>> thanks >>> >> >> ?barplot # again ... barplots help page seems quite clear >> >> cex.names = 0.5 # or a number less than one of your choice >> >> -- >> >> David Winsemius, MD >> Heritage Laboratories >> West Hartford, CT >> >> > > > -- > Xiaogang Yang > Sensorweb Research Laboratory > http://sensorweb.vancouver.wsu.edu/ > Washington State University Vancouver > > > > -- > Xiaogang Yang > Sensorweb Research Laboratory > http://sensorweb.vancouver.wsu.edu/ > Washington State University Vancouver > > [[alternative HTML version deleted]] > > ______________________________________________ > 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
I would suggest reading the discussion that follows the post at: http://tolstoy.newcastle.edu.au/R/e2/help/07/08/22858.html It includes the answer to your question as well as the answers to other questions that you did not ask, but probably should. Hope this helps, -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare greg.snow at imail.org 801.408.8111> -----Original Message----- > From: r-help-bounces at r-project.org [mailto:r-help-bounces at r- > project.org] On Behalf Of Xiaogang Yang > Sent: Monday, June 01, 2009 9:22 PM > To: r-help > Subject: [R] how to add value on the bar ploted by barplot() > > how to add value on the bar ploted by barplot()? > > and the axis label is too big, anyone know how to change their font , > thanks > > -- > Xiaogang Yang > Sensorweb Research Laboratory > http://sensorweb.vancouver.wsu.edu/ > Washington State University Vancouver > > [[alternative HTML version deleted]] > > ______________________________________________ > 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.