similar to: Putting value labels inside the bars of a bar plot

Displaying 20 results from an estimated 10000 matches similar to: "Putting value labels inside the bars of a bar plot"

2002 Nov 12
4
trouble positioning legends on barplot written to a file
I'm trying to generate some plots for print publication and I'm having trouble getting them the way I want. I get a plot with a legend that overlaps the bars and looks bad. Also, I'm saving this as PDF file (whatever happened to the "png" function to save as PNG format, in r 1.4.1?) I've tried a number of things, which produce a number of questions. 1) it seems that the
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
2003 Dec 23
1
How can I put error bars on a barplot() ?
Hi all, I am a relatively new R user... trying to put error bars (from SD values) on my data represented with barplot(). But I can't find any function or instruction to do so. Is there an easier way to do this than using segments() as I saw in an example in the R reference manual ? Then, can I define there graphical apparence ? Thanks for help. Regards Olivier BUHARD [[alternative HTML
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
1999 Aug 26
1
error bars on barplots
Hello again I'm trying to put error bars onto a barplot. I've tried something that Bill Simpson suggested a while ago, ie: x<-c(1,2,3,4,5) y<-c(1.1, 2.3, 3.0, 3.9, 5.1) ucl<-c(1.3, 2.4, 3.5, 4.1, 5.3) lcl<-c(.9, 1.8, 2.7, 3.8, 5.0) plot(x,y, ylim=range(c(lcl,ucl))) arrows(x,ucl,x,lcl,length=.05,angle=90,code=3) #or segments(x,ucl,x,lcl) but I can't get it to work on a
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
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 Jan 13
1
Space between bars in barplot
Hi I am trying to understand the "space" argument to barplot() and I think it is not working as stated. The docs say: space: the amount of space (as a fraction of the average bar width) left before each bar. Which means that I can pass a vector, the same length as the no. of bars, and the nth element of that vector will be the space left before the nth bar. This is
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
2011 Jul 06
4
Showing which bars in a bar chart are significantly different
Hello, a probably rather stupid question to which I can't find an answer: I have a bar chart, and I want to present which bars are significantly different by placing a line with an asterisk above then (similarly to fig. 3 in: http://jnm.snmjournals.org/content/46/4/574.figures-only). Does anyone have a reference where can I find some instructions how to learn this? Thanks a lot! Omer --
2007 Mar 13
3
Adding bars to the right of existing ones using barplot
I'm trying to create a barplot that has two sets of data next to each other. I'm using barplot with the add=TRUE option, but this simply adds the second dataset on top of the first, obscuring it. How do I add the new data to the right on the existing barplot so that both sets are visible? I've been playing with all sorts of option and reading the list archives with no
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]]
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
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
2007 Mar 20
2
Problem adjusting x-labels with bargraphCI
Hello: I'm having quite a bit of difficulty adjusting the x-labels using bargraphCI. I've tried using text and srt=45 to rotate the labels or mtext for 2 lines to break up the labels. However, using either method, I cannot line up the labels with the midpoints of the bars (they line up with some sort of tick mark that is off the midpoint of the bars). Any suggestions would be greatly
2003 Jul 18
1
confused about x-coordinates and bar charts
Thanks for all the help on my previous histogram problem. I intend to summarize the solutions back to the list Real Soon Now, but first, I've got another problem. I've made a bar chart that reports means. I'd like to put the number of observations on top of each bar. Here's what I've got: barplot((subset$x), col=grey(.5), ylab="Mean Engagement
2003 Nov 07
1
barplot(names.arg) versus axis(labels)
Should I be able to use axis() on a barplot? i have a data.frame, the first 3 values of which are: > c[1:3,] median mean A1 56.5 58.50000 A61 73.0 73.00000 A62 63.0 63.00000 > str(c) `data.frame': 19 obs. of 2 variables: $ median: num 56.5 73 63 161 51 55 44.5 22 54 49 ... $ mean : num 58.5 73.0 63.0 161.0 47.5 ... if I do barplot(median) and then try
2006 Feb 21
2
rotated labels in barplot with beside=T and multiple groups
I have a data set that I display using barplot. I don't know what you call it, but when I look at it, it looks like this: > lsu (0,0.1] (0.1,0.2] (0.2,0.3] (0.3,0.4] (0.4,0.5] (0.5,0.6] A 0.052631579 0.000000000 0.000000000 0.000000000 0.000000000 0.000000000 B 0.000000000 0.000000000 0.001007049 0.003021148 0.000000000 0.000000000 E 0.200000000 0.000000000
2009 Jan 07
1
Bar Plot with Connected Points on 1 Y-Axis
Hi Everyone, Have created a bar plot of the data below using the following code: barplot(TACC,space=0,names.arg=Year). I now want to add a series of connected points to represent the catch. I tried to do this using line(Catch) or points(Catch), however both of these commands result in each data point being aligned with the right edge of each bar. I need them to be solid points in the centre of
2003 Feb 03
4
Overlaying a moving average curve on top of a barplot
I''m using standard barplot (Windows version 1.6.2 of R) to represent a certain weekly metric "v" and I would like to properly overlay on top of it its moving average "mean.8" (window of 8 weeks). I must be doing something wrong since the moving average (using "lines") doesn''t overlay properly, i.e., both x-scales do not match! ...