Displaying 20 results from an estimated 10000 matches similar to: "barplot: different colors for the bar and the strips"
2011 Feb 19
1
barplot, different color for shading lines and bar
Dear all,
might there be a modified barplot function out there which allows the user
to specify a fill color for the bars and independent parameters for the
overlaid shading lines ?
Currently, when I specify density and col, the fill color for the bars is
white.
Thanks!
Markus
[[alternative HTML version deleted]]
2012 Feb 21
4
barplot with both color and shading
Hi list,
I want to draw a bar plot with color indicating one grouping and different shading on top of the color indicating another grouping.? How should I proceed?
Thanks!
...Tao
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'
2008 Jul 25
4
Matrix barplot
Hi,
as a bloody R beginner I failed to solve the probably simple problem
to create a barplot of the following data read from a file
Year A B C
2000 4 3 0
2001 2 1 3
2002 1 2 5
The Barplot should look like
5 | C
4 | A C
3 | AB C C
2 | AB A C BC
1 |
2004 Dec 01
2
barplot() using beside=TRUE and the density argument
Hi
I am using barplot() to draw some barplots, with a matrix as the data so
that multiple bars are drawn for each data point. I want to use the
argument "beside=TRUE" to juxtapose the bars instead of stacking them.
If I execute:
barplot(data,names.arg=names,density=c(20,10),beside=FALSE)
I get the expected behaviour i.e. the bottom part of the column is
shaded 20 lines per inch, the
2005 Sep 21
2
win.metafile on linux?
Dear R-help,
Is it possible to use win.metafile() on *nix versions of R?
I tried R 2.1.1 on FreeBSD and R 1.9.0 on redhat with no success. I need
to give some graphs generated in R to my boss so that he can modify them
in Powerpoint to fit he style of his presentation. Recommendations on
other methods are appreciated as well.
Hao
--
: Hao Chen, Ph.D.
: Instructor
: Department of
2006 Oct 13
3
Barplot legend position
Dear useRs,
I'm trying to create a barplot like so:
x=matrix(1:10,2,5)
barplot(x,leg=c("left","right"),besid=T)
The legend is placed in default position topright, however the data are
plotted there too. I tried controlling the legend position by adding
x="topleft" but this results in an error that x matches multiple formal
arguments.
Leaving out the legend
2007 Mar 02
1
barplot with different color combination for each bar
Hi,
I'd like to construct a somewhat unusual barplot. In "barplot" I use
beside=F as I'd like to have stacked bars. The height of each bar is
always the same. Information in my plot is coded in the color of the
bar. I therefore need to be able so assign a different combination
(or order) of colors to each individual stacked bar.
In the example below, the combination of
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,
2008 Jan 18
1
modifing barplot
Hi,
I would like to modify how barplot .... plots. For reasons only my supervisor comprehends i need to do the crisscross lines in the bar thicker. If i use lwd=2 the y-axis is thicker, (i use the option beside = TRUE) but nothing else is affected by this parameter - it seems. I looked at the barplot.r code but i am afraid i don't quite understand it so ..... i am at loss.
I am using
2004 Apr 19
1
barplot fill patterns
Dear R-helpers,
I will like to know if there is a way to generate a stacked column
graph using both patterns and colors to fill the bars. I have many
categories for the number of color available in R, so I will like R to
start with solid colors and then use patterns an colors. I have been
using barplot and some code that I found in the archives, but I am
still having bars with the
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
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
2013 Mar 26
3
barplot colors
Dear all,
I have a 2 by 2 matrix and I would like to do a barplot with it. (so 2 bars with each having 2 stacks.). I would like to have one colors per stack, so 4 different colors total.
The problem is that R is only given me 2 colors (the same two for the bottom stack and the same two for the top stack). Any idea how I can do to have 4 colors? (without using ggplot2 preferably)
Here is my
2002 Sep 18
5
newbie question: p.values in a column
Hello,
I have a vector (v) with 6 columns and 2000 rows. I am trying to do one
sample t.test for each row (I know this sounds crazy) and put the
p.values into the 7th column.
I know I can access the p.value via t.test(v[i,])[3]$p.value; I know I
can do t.test on the row by apply(v, 1, t.test), but I just couldn't
figure out how to fit them together.
I'd very appreciate your help!!
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
2008 Jan 24
2
Barplot w/ single stacked bar
Hi All,
I can get the barplot function to do many types of plots, stacked or
otherwise. However, I cannot get it to do a *single* stacked bar. I've
searched several books & listserv archives to no avail. I suspect I'm
missing the obvious from the help file!
I can reach my goal in ggplot2, although the relative heights of the
bar's pieces don't seem quite right (it does
2009 Nov 04
1
Patterned shading in ggplot
Am trying to produce a graph which prints out well in black and white using
ggplot2. I have the following example set up nicely, but want to shade the
red bars in one pattern and the blue in another so they print out clearly.
I tried changing colours to 1 light, 1 dark, but then the overlapping colour
looks virtually identical to the darker one. I noted the option density in
barplot, but
2005 Apr 18
3
Barplot and colors for legend
Hi all!
One quick question: How do I get the standard colors
used by barplot? I have
some stacked bars and would like to add a horizontal
legend via legend() but I
don't know how to find the colors for the fills of the
legend points.
Thanks!
Werner