similar to: xlims of barplot

Displaying 20 results from an estimated 10000 matches similar to: "xlims of barplot"

2003 Oct 30
1
legend over-prints barplot bar
When I create a bar plot, the legend is obscuring the rightmost bar. I haven't found a setting that appears to affect the positioning of the legend - any tips re moving the legend would be most appreciated. paul sorenson
2003 Nov 04
2
more barplot presentation questions
Thanks to those who pointed me at the solutions to the legend overprinting the bars. I took the "easy" way of rescaling the y axis, picking the scaling factor for stacked bars is somewhat problematic but sufficient for my application. I have another couple of barplot questions: - Can I extend the major ticks on the Y axis across the page? Or both axes to form a grid? - A really
2006 Jan 05
4
ylim problem in barplot
R Version 2.2.0 Platform: Windows When I use barplot but select a ylim value greater than zero, the graph is distorted. The bars extend below the bottom of the graph. For instance the command produces a problematic graph. barplot(c(200,300,250,350),ylim=c(150,400)) Any help would be appreciated. Paul [[alternative HTML version deleted]]
2003 Dec 18
2
barplot & plot together
Dear colleges, I'm trying to combine a barplot and a plot in a single figure as follows: data <- 1:6 t <- barplot(data, axes=F) par(new= T) plot(t, data, type="b") However, as you can see in the example, the dots of the second plot do not fall in the midpoint of the bars in the first. Any trick for setting the 2 plots at the same scale? I have unsuccessfully tried: plot(t,
2003 Nov 12
2
wishlist item: changing origin of plot (PR#5045)
[This is an edited version of an email that I sent to Paul Murrell. He was in favour of the idea (although he noted the obstacles that: it could make par() longer; somebody has to implement it) and suggested I submit this as a wishlist item.] Do you think it would be worth adding options to plot commands to reverse axes? Here is a simple example: > x <- 1:12 > plot(x) Whereas if I
2011 Sep 12
6
barplot in hexagram layout
dev.new(width=6, height=1.5,mar=c(0,0,0,0)) par(mfrow=c(1,1),mar=c(.5, .5, 1.5, .5), oma=c(.4, 0,.5, 0)) barplot(c(1,1,1,1,1,1),col=c("blue","purple","red","green","orange","yellow"), axes = FALSE) I have a barplot that returns six colors in a line. I would like to get the same six color blocks in a hexagram layout (if it were a clock,
2010 Jan 12
1
barplot: border color when stacked
Dear R-users, I am using R version 2.10.1 under windows. In a barplot, I want to mark one of the bars with a special border color. For example: barplot(c(3, 7, 11), border = c(NA, "red", NA)) But how to do this when the bars are stacked? for example: barplot(matrix(1:6, ncol=3)) # border of second bar (i.e. the one with total height = 7) should be red again, I try: barplot(matrix(1:6,
2012 Sep 06
2
No room for labels in barplot
All, I have: sales <- c(2300,900,155,102,42,10) names(sales) <- c("Christmas","Valentine's Day", "Mother's Day","Father's Day", "Thanksgiving","New Year's Day") barplot(sales,ylim=c(0,2500)) But it doesn't place all of the name labels on the plot. So I tried: sales <-
1999 Nov 15
1
xlim, ylim problem in barplot (PR#325)
Hi, all. The lower bound in a barplot (or the left bound if you're making a horizontal barplot) is -0.01 no matter what. This causes problems if you're making a barplot of small values (say, < .001), as most of the plot is taken up with blank space beneath the axis, and the bars are squeezed in at the top. The fix seems to be simple: replace lines 41: xlim <- range(-0.01,
2012 Jul 30
2
barplot question
Dear r-help members. I would like to: a) control the margin around my legend box. Unfortunately I did not find an appropriate command under "?legend". The margin around the actual legend is way too wide. There is a lot of unnecessary "empty space" on the right side. b) increase the width of the individual barplots. I saw that this can be obtained with the command
2010 Apr 03
2
histogram-like barplot? (or reverse?)
Hi, I have a simple task I can't figure out. I'd like to take some measurements I made, e.g.: year (y-axis) 1 2 3 4 5 6 counts (x-axis) 10 10 20 30 40 50 And then, make a barplot with the x-axis ticks (representing the borders between years) between the bars. However, barplot seems to force you to make the x-axis arbitrary categories. I want it to be continuous (as in a
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
2007 Sep 25
2
Adjust barplot to the left
Hello, I have the following problem: I created an ecdf and a barplot. Unfortunatly, the bars are not where I would like them to be (please see picture below). http://www.nabble.com/file/p12877530/problem.gif That's my code: #------------------------ par(mfrow=c(2,1), mar=c(2,3,3,2)) #ECDF x = c(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2) F2.5 <- ecdf(x) plot(F2.5,
2017 Jan 27
4
Suggestion: barplot function
Hello developers folks! First, congratulations for the wonderful work with R. For science, barplots with error bars are very important. We were wondering that is so easy to use the boxplot function: boxplot(Spores~treatment, col=treatment_colors) But there is no such function for barplots with standard deviation or standard error. It becomes a "journey" to plot a simple graph (e.g.
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 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
2007 Aug 29
1
breaking the x-axis and having two different x-axis labels
Dear R community, I have two questions concerning barplots that I struggle to resolve: 1) How can I break (interrupt) the x-axis (e.g.: have it display values from -100 to -90 and 90 to 100 only)? 2) I overlay two horizontal barplots: one with negative values only and one with positive values only: I would wish to mark the two datasets separately on the x-axis (or some other way). If I use
2003 Nov 10
3
relationship between two discrete variables
I want to investigate possible relationships between two discrete variables. I have tried a few things but figured you guys might be able to point me at some purpose built functions. Our scientists score results of tests which are performed in lets say, 8 positions. The scores are assigned a value of 1,2,3 or 4. I want to know if there is a correlation between the test results and the
2011 May 25
2
barplot groups of different size i.e. height is NOT a matrix
Hello, I want to use the function barplot do display several group of bars. A standard example is given at this link http://onertipaday.blogspot.com/2007/05/make-many-barplot-into-one-plot.html But in their example the 4 groups of bars are all composed of 8 bars. I want to be able do display the same kind of graph but where the number of bars in each group are not the same. For example the
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