similar to: Gap between axis and bars in barplot()

Displaying 20 results from an estimated 10000 matches similar to: "Gap between axis and bars in barplot()"

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
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
2001 May 15
3
box around a barplot
Hi, is it possible to draw a box around the following barplot; using "box=TRUE" won't work. ---------- pc<-c(1,2,5,29,27) barplot(pc,ylim=c(0,30),yaxs="r",xaxs="r",ylab="Anzahl" ,names.arg=c("Mac","286er","386er","486er","Pentium I") ,axisnames=T,col="gray") ---------- Thanks in
2007 Jul 25
3
Constructing bar charts with standard error bars
I am new to R. I want to graph group data using a "Traditional Bar Chart with Standard Error Bar", like the kind shown here: http://samiam.colorado.edu/~mcclella/ftep/twoGroups/twoGroupGraphs.html Is there a simple way to do this? So far, I have only figured out how to plot the bars using barplot. testdata <- scan(, list(group=0,xbar=0,se=0)) 400 0.36038 0.02154 200 0.35927
2007 May 15
1
stacked barplot with positive and negatvie values
Hello I'm trying to create a barplot with a couple of stacked positive values and with one negative value for each group. example: trees<-c(20,30,10) shrubs<-c(12,23,9) veg<-c(2,3,4) soil<-c(-100,-123,-89) example1<-t(cbind(trees,shrubs,veg)) barplot(example1) #this works so far #but now: example2<-t(cbind(trees,shrubs,veg,soil)) barplot(example2) This shows no more
2011 Apr 04
2
gap.barplot doesn't support data arrays?
I am trying to make a barplot with a broken axis using gap.barplot (in the indispensable plotrix package). This works well when the data is a vector: > twogrp<-c(rnorm(10)+4,rnorm(10)+20) > gap.barplot(twogrp,gap=c(8,16),xlab="Index",ytics=c(3,6,17,20),ylab="Group values",main="Barplot with gap") But when the data is an array (for a bar plot with multiple
2011 Sep 12
1
Centering lines on barplot centers.
Hello, I am trying to port one of my plotting S+ functions to R and I am having difficulties!!! I am including here only the troublesome code! I first produce a barplot, saving the positions of the bar's centers. par(mar = c(6.1, 5.1, 4.1, 4.1), mgp = c(3, 3.0, 0)) ticks.loc <- barplot(sum.of.weights, col = 5, xlab = "", ylab = "", axes =
2007 Mar 01
2
barplot2, gap.barplot
Hello, I try to handle a simple bar-plot, but it turns out to be not as simple as I thought. 1) I have created a .dat-File, e.g. test.dat: DATA DATA-SEM 2.2 0.32 6.2 1.30 12.7 1.61 48.6 3.08 4.1 0.86 4.5 0.32 1.5 1.13 1.2 1.08 The first row is the data represented by bars. The second row deals with the Standard Error of Mean. The lines correspond to time-intervals of experiments. 2) I now
2000 Mar 21
1
barplot (PR#495)
Full_Name: Zdenek Skala Version: 1.0.0 OS: MS Windows 95 Submission from: (NULL) (194.108.127.14) Dear all, a problem with barplot() was already discussed on R-help for R 0.90.0 - sorry, if this is a known bug, but I was unable to find it in the bugs database. In: > barplot(c(.1,.5,1), ylim=(0:1)) or > barplot(c(.1,.5,1), ylim=c(0,1)) the y axis is drawn from 0.2 to 0.8, in: >
2010 Mar 22
3
add information above bars of a barplot()
hi, I have a barplot with six clusters of four bars each. Now I would like to add the exact value of each bar as a number above the bar. I hoped to get some tips here. I could simply add text at the different positions, but I don't understand how the margins on the x-axis are calculated (how can I get / calculate the x-ticks of a barplot?). Also I would like to code this flexible enough so
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
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 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
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 Dec 08
1
barplot
Dear all, do anybody know how to set ylim in barplot() correctly? When I write: > barplot(c(.1,.5,1.0)) the y-axis goes from 0.0 to 0.8. Wheny I type: > barplot(c(.1,.5,1.0,),ylim=range(0:1)) the y-axis goes from 0.0 to 0.8. Obviously I am doing something wrong. Are the ylim setting standards in barplot() other than in plot() or is this a bug? Thanks for any hints! Zdenek
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]]
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:
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
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
2002 Oct 14
2
barplot + plot
Dear all, I've got another question, By default barplot and plot seem to produce slightly different y-axis. The problem I've got is when using a mix figure with both, barplot and plot. For example: barplot(1:5, ylim=c(0, 6)) par(new= T) plot(1:5, 9:5, type="b", axes=FALSE, ylim=c(0,9)) axis(4) box() note that both plots (barplot and plot) should start at 0, but the exact