Displaying 20 results from an estimated 10000 matches similar to: "Color barplots with a conditional?"
2006 Feb 22
3
2 barplots in the same graph
Hello,
I have a very simple question about "2 barplots in the same graph".
It seems quite easy, but I searched google for long time, haven't find
solution.
For example, I want one graph like:
x1=seq(0,2,by=0.3)
x2=seq(3,0,by=-0.1)
barplot(x1,col="red")
barplot(x2,col="green")
It means if it's on the same graph, some bars are overlaped.
So if the bars are
2005 Dec 19
1
help on barplots
Hello, I am a beginner with R and I would need some help with doing barplots.
My problem is that I would like to include both diffrent colors of the bars
and precence/absence of shading lines in the barplots. When reading in the
help file about the "col" command it states:
col: a vector of colors for the bars or bar components. By
default, grey is used if 'height'
2006 Oct 13
3
Need help with barplots
I`ve read all the manuals and still couln`t find what is the difference
between the stacked and side-by-side barplots ? Could you explain me ?
[[alternative HTML version deleted]]
2005 Jul 13
3
texture in barplots?
Dear R list,
For some reason I am unable to access neither search.r-project.org, nor
http://finzi.psych.upenn.edu/ so I cannot search the archives for a possible
answer (I Googled for this but didn't find anything).
Is it possible to draw barplots using a texture instead of colors, for a black
and white printer?
TIA,
Adrian
--
Adrian Dusa
Arhiva Romana de Date Sociale
Bd. Schitu
2007 Mar 20
2
Ticks on barplots
Dear Gurus,
Using R 2.4.1 on Windows XP
I am generating stacked barplots of age-composition of fish populations
(Y) over time (X). As there are many years, not every bars is labeled.
When looking at the plot, it becomes difficult to associate labels with
their bars.
We have improved this a bit by using axis() to add a tickmark below each
bar. Can anyone suggest a way to draw ticks ONLY
2003 Feb 05
4
barplot default colors
Dear R-help,
Can some one explain why barplot() uses changing colors in the bars by
default? I should think that most of the time when people draw barplots,
they want the bars to be in the same color. (At least that's what I'd
expect. The first time I used barplot() in R, I was shocked to see the
colors.) As an example, one example in ?layout draws a scatterplot with
histograms drawn
2003 Feb 05
4
barplot default colors
Dear R-help,
Can some one explain why barplot() uses changing colors in the bars by
default? I should think that most of the time when people draw barplots,
they want the bars to be in the same color. (At least that's what I'd
expect. The first time I used barplot() in R, I was shocked to see the
colors.) As an example, one example in ?layout draws a scatterplot with
histograms drawn
2003 Dec 04
1
assigning colors to barplot when beside=TRUE
dear list,
i am having trouble coloring the bars in a barplot. my data have two
groups, which i would like to plot side by side. within each group i
want to sort the observations in decreasing order, like a pareto
chart. the bar colors would relfect the value of a third variable.
below i have generated a reproducible example. the bar heights are a
given pig's "gain",
2010 Jun 01
5
Help barplots
Dear All,
I am newbie to R, and I wanted to plot a barplots with R and in such a way
that It will also show me position which I can plot on the bar line.
Here is my code that I am using to plot,
> chromosome <- c(40.2, 35.6, 36.1, 29.6, 31, 29.6, 31, 29.4, 28.2, 23, 23,
28.2)
>barplot (chromosome, col="purple", xlab="Oryza sativa Chromosomes", border
= NA, space =
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
1999 Mar 25
1
Y-limits of barplots
Hello everybody,
I frequently have to produce barplots from variables the natural variation
of which is far away from zero. A typical range would be, say from -16 to
-28.
So, the following example should give an "honest" presentation:
x<-c(-20,-22,-21,-28)
barplot(x,beside=T,ylim=c(-18,-30))
But using anything else but "0" for the first element of ylim
leads to strange
2006 Oct 13
2
Multiple barplots on the same axis
Hi
R newbie here :)
I need to plot 3 barplots in the same axis, something like
|
| _ _ _
| | | _ | | _ | | _
| _ | || | _ | || | _ | || |
| | || || | | || || | | || || |
-+-----------------------------------------
| v1 v2 v3
Is there any documentation describing how to achieve that, and
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.
2002 Jul 25
3
Barplot coloring question
Hi all,
I have the following dataset, call it test.data (30 columns, and one row
named "0"):
ADVP ADVP AP AP CONJ CONJ CP CP DU DU INF INF MWU
MWU NP NP PP PP PPRT PPRT REL REL SMN SMN SSB SSB SV1
SV1 TI TI
0 96.85 2.05 89.07 2.54 70.91 2.37 94.92 3.46 82.31 11.33 40.96 2.25 98.06
3.43 90.77 17.63 86.60 10.78 60.27 1.32 93.27 0.97 77.60
2000 Oct 01
1
barplots with standard deviation
Hello!
I'd like to print certain kinds of diagrams with R. They should
look like barplots with besides=TRUE, but also have the variance
or standard deviation on every bar so that one could better
compare the bars. How could I apply this?
thanks for your help
Raoul
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read
2012 May 07
2
y-axis-problem (barplots)
Ein eingebundener Text mit undefiniertem Zeichensatz wurde abgetrennt.
Name: nicht verf?gbar
URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20120507/f2dfaa17/attachment.pl>
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 Jun 18
2
Barplots and error indicators: Some R-Code
I' ve seen that several people are looking for a function that creates a
barplot with an error indicators (I was one of them myself). Maybe you will
find the following code helpful (There are some examples how to use it at
the end):
# Creates a barplot.
#bar.plot() needs a datavector for the height of bars and a error
#indicator for the interval
#many of the usual R parameters can be set:
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
2011 Jul 24
1
barplot colors
Hi,
In barplot(height, col = ...), the col = vector recycles so that the
same colors are used for each bar. I would like to use different colors
in different bars (corresponding to another piece of information, here,
the region of the country being represented).
For example,
x = matrix(c(5,2,3,1),nrow=2)
barplot(x,col=1:4)
will draw two bars with two segments each, but each colored red and