similar to: add information above bars of a barplot()

Displaying 20 results from an estimated 20000 matches similar to: "add information above bars of a barplot()"

2018 May 21
3
draw borders of bars inside of the rectangles in a barplot
Dear R-users, I want to draw a barplot with beside=TRUE. One halve of the bars are drawn with a border, while the other halve are drawn without a border (i.e. filled bars vs. non-filled bars next to each other). Because borders are drawn around the bars, doing this leads to one halve of the bars being wider than the other halve, expanding across the 0-point of the y-axis. This problem emerges
2018 May 21
0
draw borders of bars inside of the rectangles in a barplot
I recommend instead of no border, that you use a border with the same color as the fill. I do this in the likert functions in the HH package. Rich On Mon, May 21, 2018 at 10:59 AM, Martin Batholdy via R-help <r-help at r-project.org> wrote: > Dear R-users, > > I want to draw a barplot with beside=TRUE. > One halve of the bars are drawn with a border, while the other halve are
2005 Feb 18
3
Barplot - Can't figure it out
Hi, I have two catagorical vectors like this; x = c(1, 2, 4, 2, 1) y = c(2, 4, 2 ,4, 1) I want to set up a barplot with the catagories 1-4 horizontally and number of occurances vertically for each vector x,y. I've tried boxplot(table(x,y), beside=T) and boxplot(c(x,y), beside=T) among others, but can't get it to work...Any ideas? I'd apppreciate any help
2012 Mar 02
2
Spacing of text does not match spacing of bars in barplot
I have a very standard barplot. My labels are too long to be printed horizontally under each bar, so I am using text to put the labels on a 45 degree slant. However, the labels are spaced more narrowly than the bars, so on an 8 vertical bar plot, the end of the eighth label is lined up with the seventh bar. Preferably I don't want to do every text label separately (I'm having this
2009 Dec 15
2
Diagonal Labels on "Beside" Bars in Barplot
My question is based on an example provided in the following: Referencing: Statistics with R Vincent Zoonekynd <zoonek at math.jussieu.fr> 6th January 2007 URL: http://zoonek2.free.fr/UNIX/48_R/all.html data(HairEyeColor) a <- as.table( apply(HairEyeColor, c(1,2), sum) ) # Provided Example barplot(a, beside = TRUE, legend.text = attr(a, "dimnames")$Hair) # I
2005 May 30
3
values of bars in barplot
Hi, I couldn't find how to have the values written on the top of each bar in a barplot. When using hist(), it is possible to use labels=T, but this option does not seem to exist for barplot(). Is there a trick I could use to do that ? Thanks to all Luc
2010 Sep 09
3
Alignment of lines within barplot bars
Dear all, I have a barplot upon which I hope to superimpose horizontal lines extending across the width of each bar. I am able to partly achieve this through the following set of commands: positions <- barplot(bar_values, col="grey") par(new=TRUE) plot(positions, horiz_values, col="red", pch="_", ylim=c(min(bar_values), max(bar_values))) ...however this results
2009 Feb 27
2
add absolute value to bars in barplot
Hello, r-help at r-project.orgbarplot(twcons.area, beside=T, col=c("green4", "blue", "red3", "gray"), xlab="estate", ylab="number of persons", ylim=c(0, 110), legend.text=c("treated", "mix", "untreated", "NA")) produces a barplot very fine. In addition, I'd like to get the
2005 Dec 13
2
Labeling a range of bars in barplot?
Hi, I am plotting a distribution of (ordered) values as a barplot. I would like to label groups of bars together to highlight aspects of the distribution. The label for the group should be the range of values in those bars. As this is hard to describe, here is an example; x <- rlnorm(50)*2 barplot(sort(x,decreasing=T)) y <- quantile(x, seq(0, 1, 0.2)) y plot(diff(y)) That last
2003 Nov 13
5
xlims of barplot
I would like to create a family of barplots with the same xlimits. Is there a way to "read" the xlimits from the first graph so I can apply it to the subsequent ones? I have tried just taking the min and max of the x data and the plot doesn't show. cheers [[alternative HTML version deleted]]
2003 Jan 17
2
barplot plotting problem
Hi, Is there any equivalent of type="n" when constructing barplots which will still construct the axes (plot=F, as it says doesn' plot anything at all). Alternatively I tried setting col="white" and border="white" but the border command does not seem to be operational. True?? Any other ideas? What I'm actually trying to do is construct vertical abline()'s
2010 Sep 10
1
adding labels above bars in a barplot
Hello, I want to make a general routine to draw barplots with numbers plotted above each bar. See the example below. I could not place the numbers on the middle of each bar because I could not calculate the right position of each x-axis tick. axTicks(1) indicated a unitary step, but it does not seem work. I appreciate any help or suggestions. Best regards, Antonio Olinto
2009 Jun 02
5
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]]
2010 Apr 24
2
barplot - offsetting individual bars
Hello, I'm trying currently using barplot to summarize precipitation data. So far I've compiled total annual snow and rain accumulation in a table (attached). I've been successful at plotting it using the following code: fig=barplot(t(Annual_Precip_table), horiz=TRUE, space=0, col=c("grey70", "white"), axes=FALSE) . . The result is a stacked barplot with total
2010 Sep 15
2
barplot: space between axis and bars
Hi all, I have a problem with a rather simple plot (which I have used several times) - barplot. I want to create a barplot, where no space is between the axis and the bars. Example: barplot(rnorm(10), space=0) creates a vertical axis at the left and bars. I want to skip the space between both. Thank you for your help. Daniel
2010 Jan 15
1
Possible to write text inside a bar of a barplot?
How can I write text inside a bar of a barplot? I tried using text(), but I am only able to specify the numeric y-coordinate. The different columns of my barplot correspond to factors and not numbers, so I don't know how to access the horizontal positions of the bars. I tried fiddling with different values of the "adj" argument, but this appears unreliable. Background: I have
2004 Dec 02
1
Gap between axis and bars in barplot()
Hi Windows XP, R 2.0.1. I am drawing a very large barplot using jpeg() - setting the width to 10,000 as there are over 5000 bars. This all works fine and I get exactly what I want - except there is a huge bit of white space between the Y-axis and the first bar - so much in fact that I have to scroll two screens from the Y-axis before I see the first bar. After that the bars are evenly spaced
2008 Oct 08
4
Space between bars in barplot
Hi, with the "space" parameter it is possible to change the gap / distance between the bars, but is it also possible to change the "space" after each 6th bar? So for example you have bars from 1 to 6 then a large gap and then the next six bars from 7 to 12 Thanks a lot! -- View this message in context:
2007 Aug 04
2
bars' values on barplot
Hi, I need bars' values on barplot, and I don't know how I can put it. I do my barplot as: data<-read.table("/my_path/file.dat",header=T, sep="\t") barplot(as.matrix(data),log="y",beside=TRUE,main="my_title", xlab="x name", ylab="y name"). How can I add the values on each bar? Thanks.. [[alternative HTML version deleted]]
2011 Jan 25
2
barplot with varaible-width bars
I would like to produce a bar plot with varying-width bars. Here is an example to illustrate: ww <- c(417,153,0.0216,0.0065,556,256,0.0162,0.0117, + 726,379,0.0358,0.0501,786,502,0.0496,0.0837, + 892,591,0.0785,0.0795) yy<-t(t(array(ww,c(2,10)))) barplot(yy[,2*1:5],las=1,space=c(.1,.5),beside=T) produces a barplot of 5 pairs of bars that are of equal width