Dear all
Thanks in advance for replies
I am trying to make a barplot out of this data which I read from a file
tb <- read.table("tmp.dat"
, na.string=c("-"))
tmp.dat:
(the file is much longer and includes NAs as "-")
#A1A2A3B1B2B3C1C2C3
Thank you Greg,
It works!
On 13 Jun 2007 at 8:27, Greg Snow wrote:
> Look at the subplot function in the TeachingDemos package.
>
> -Original Message-
> From: "Héctor Villalobos" <[EMAIL PROTECTED]>
> To: "r-help@stat.math.ethz.ch"
> Sent
Look at the subplot function in the TeachingDemos package.
-Original Message-
From: "Héctor Villalobos" <[EMAIL PROTECTED]>
To: "r-help@stat.math.ethz.ch"
Sent: 6/11/07 5:48 PM
Subject: [R] barplot and map overlay
Hi,
I wonder if it is possible with the graph
Hi,
I wonder if it is possible with the graphics package to overlay one or several
plots
(barplots, for example) over a map. Data for the map is in a data frame with the
latitude and longitude coordinates, and then:
> plot(map$long, map$lat, type ="l")
produces the map. I want to put each barpl
ks so much for your help.
>
> -Original Message-
> From: Deepayan Sarkar [mailto:[EMAIL PROTECTED]
> Sent: May 10, 2007 4:58 PM
> To: Spilak,Jacqueline [Edm]
> Cc: r-help@stat.math.ethz.ch
> Subject: Re: [R] Barplot by two variables
>
> On 5/10/07, Spilak,Jacqueline [Edm] &
[mailto:[EMAIL PROTECTED]
Sent: May 10, 2007 4:58 PM
To: Spilak,Jacqueline [Edm]
Cc: r-help@stat.math.ethz.ch
Subject: Re: [R] Barplot by two variables
On 5/10/07, Spilak,Jacqueline [Edm] <[EMAIL PROTECTED]> wrote:
> Hi all
> I have a bit of a problem. I want to make a barplot of some data.
On Thu, 2007-05-10 at 15:58 -0700, Deepayan Sarkar wrote:
> On 5/10/07, Spilak,Jacqueline [Edm] <[EMAIL PROTECTED]> wrote:
> > Hi all
> > I have a bit of a problem. I want to make a barplot of some data. My
> > data is of a score that is separated by year and by a limit (above 3 and
> > below 3 t
On 5/10/07, Spilak,Jacqueline [Edm] <[EMAIL PROTECTED]> wrote:
> Hi all
> I have a bit of a problem. I want to make a barplot of some data. My
> data is of a score that is separated by year and by a limit (above 3 and
> below 3 to calculate the score).
> YearLimit HSS
> 1999ALT 0.67
Hi all
I have a bit of a problem. I want to make a barplot of some data. My
data is of a score that is separated by year and by a limit (above 3 and
below 3 to calculate the score).
YearLimit HSS
1999ALT 0.675
1999VFR 0.521
2000ALT 0.264
2000VFR 0.295
I w
> However, the legend does not reproduce the color/shading used in the
> original barplot, are those available somehow?
Actually, Ingmar, there's a more elegant way to recre-
ate the original colors; to expand on your example:
data <- 1:10
rows <- 2
cols <- 5
labels <-
Here is one way of doing it.
x <- 'kuvaaja kuva yhteispisteet
Hannu isokala 8
Hannu "kaapin alta löytynyt" 2
Hannu "kaapin alta löytynyt2" 8
Hannu limamikko 1
Hannu "maukasta marmeladia" 8
Hannu skrinnareita 4
Hate "madekoukkujen suojelupyhimys" 3
Hate "matka aikaan joka ei enää palaa" 3
Hate "mu
I put the data again because it looks like it went all mixed up. Data is
named pisteet.sum. First row is the header row.
kuvaaja kuva yhteispisteet
Hannu isokala 8
Hannu kaapin alta löytynyt 2
Hannu kaapin alta löytynyt2 8
Hannu limamikko 1
Hannu maukasta marmeladia 8
Hannu skrinnareita 4
Hate mad
Hi R-users,
I have a dataset like this:
kuvaaja
kuva
yhteispisteet
Hannu
isokala
8
Hannu
kaapin alta löytynyt
2
Hannu
kaapin alta löytynyt 2
8
Hannu
limamikko
1
Hannu
maukasta marmeladia
8
Hannu
skrinnareita
4
Hate
madekoukkujen suojelupyhimys
3
Hate
matka aikaan joka
Hi, I'd suggest you use ?rect for this.
Here's an example (I did not check whether it's correct...)
I also improved (but not checked :) your definition of cols.
Jonne.
X <- seq(1:6)
Q <- matrix(sample(X, 60, replace = T), nrow=6, byrow = T)
H <- matrix(rep(1,60), nrow=6, byrow=T)
color <- c("bl
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 co
Hello everyone:
I want to draw a Par plot but I don't know how to choose different pattern
of of colors for different bars to be able to distinguish them in a black
and white print. I want some kinds of patterns on the bars such as '///' or
'\\\' or
Suppose I have the following data in the
Thank you very much, Marc! That was exactly the solution I was looking for!
Regards,
Lauri
2007/1/26, Marc Schwartz <[EMAIL PROTECTED]>:
>
> On Thu, 2007-01-25 at 22:23 +0200, Lauri Nikkinen wrote:
> > Hi R-users,
> >
> > I'm new to R and I'm trying to make a barplot combined with two lines
> >
On Thu, 2007-01-25 at 22:23 +0200, Lauri Nikkinen wrote:
> Hi R-users,
>
> I'm new to R and I'm trying to make a barplot combined with two lines
> (refering to secondary y-axis). Bars should represent the number of
> transfused patients by age class and sex and lines should represent
> the amount
Hi R-users,
I'm new to R and I'm trying to make a barplot combined with two lines
(refering to secondary y-axis). Bars should represent the number of
transfused patients by age class and sex and lines should represent
the amount of blood units given in age classes. I have now successfully made
a b
Hi, Etienne,
I've seen this while working with barplot and never been able to understand the
general rule, but by setting ylim high enough, I've always been able to draw a
y axis covering the biggest values.
Could you send a data subset to reproduce the issue? Thanks.
Best,
Ricardo
--
R
Etienne wrote:
> I'm using barplot with the following call:
>
> barplot(stat_data[[5]][,],axes=TRUE,axisnames=TRUE,axis.lty=1,xlab=xlab,ylab=ylab,beside=TRUE,las=1,font.lab=2,font.axis=1,legend.text=TRUE)
The example is not reproducible and poorly formatted. Please read the
posting guide.
I'm using barplot with the following call:
barplot(stat_data[[5]][,],axes=TRUE,axisnames=TRUE,axis.lty=1,xlab=xlab,ylab=ylab,beside=TRUE,las=1,font.lab=2,font.axis=1,legend.text=TRUE)
On some data, the vertical axis does not cover the
whole plot area and the last tick mark is smaller than
the m
tab <- do.call(rbind, list(data1, data2, data3, data4))
etype <- do.call(rbind, list(sd1, sd2, sd3, sd4))
b <- barplot(tab, beside=T, ylim=c(0,max(tab+etype)))
arrows(as.vector(b), as.vector(tab) - as.vector(etype), as.vector(b),
as.vector(tab) +
as.vector(etype), code=3)
unlist() is not correc
AIL PROTECTED] [mailto:[EMAIL PROTECTED] Namens Antje
Verzonden: vrijdag 24 november 2006 16:17
Aan: r-help@stat.math.ethz.ch
Onderwerp: Re: [R] barplot help needed
Still, there is one problem. The SD-Values don't fit to the bar they
belong to. I made the following experiment:
> data1 <
Still, there is one problem. The SD-Values don't fit to the bar they
belong to. I made the following experiment:
> data1 <- c(2,4,6,2,5)
> data2 <- data1
> sd1 <- c(0.5,1,1.5,1,2)
> sd2 <- sd1
> tab <- do.call(rbind, list(data1, data2))
> etype <- c(sd1,sd2)
> b <- barplot(tab, beside=T)
TED] Namens Antje
Verzonden: vrijdag 24 november 2006 13:42
Aan: r-help@stat.math.ethz.ch
Onderwerp: Re: [R] barplot help needed
Thank you very much for your help.
I just don't understand the following line (which also gives me a
dimension error later in the arrows command)
etype <- rep(c(sd
thought sd1, sd2... were scalars but if not just do:
etype <- c(sd1, sd2, sd3, sd4)
---
Jacques VESLOT
CNRS UMR 8090
I.B.L (2ème étage)
1 rue du Professeur Calmette
B.P. 245
59019 Lille Cedex
Tel : 33 (0)3.20.87.10.44
Fax : 33 (0)3.2
Thank you very much for your help.
I just don't understand the following line (which also gives me a
dimension error later in the arrows command)
etype <- rep(c(sd1, sd2, sd3, sd4), length(data1))
Antje
(I don't see my emails to the mailinglist anymore... just the answers
from other people...
tab <- do.call(rbind, list(data1, data2, data3, data4))
etype <- rep(c(sd1, sd2, sd3, sd4), length(data1))
b <- barplot(tab, beside=T)
arrows(unlist(b), unlist(tab) - etype, unlist(b), unlist(tab) + etype, code=3)
---
Jacques VESLOT
hello,
I would like to create the following barplot:
I have 4 different data sets (same length + stddev for each data point)
data1
sd1
data2
sd2
data3
sd3
data4
sd4
now, I'd like to plot in the following way:
data1[1],data2[1],data3[1],data4[1] with it's sd-values side-by-side at
one x-axis l
rom: Antje <[EMAIL PROTECTED]>
To: R-help@stat.math.ethz.ch
Subject:[R] barplot - x-axis
> Hi there,
>
> I have a barplot and the labels at the x-axis are strings, which are
> rotated by 90°. But now the sub-title of the barplot is in
Hi there,
I have a barplot and the labels at the x-axis are strings, which are
rotated by 90°. But now the sub-title of the barplot is in between these
labels, which does not look very nice...
Could anybody help me finding the parameter-setting to prevent this?
par(mai=c(1.5,1,1,0.6))
barplot(d
Qian Wan wrote:
> Hi,
>
> I have about 500 data entry ranging from -50 to 10,000. when I
> barplot(data), it plots all 500 of them individually. How can I set a
> ranges to group these 500 numbers into 10 or 20 groups, and plot the
> value of the ranges with how many numbers are in the range.
Hi,
I have about 500 data entry ranging from -50 to 10,000. when I
barplot(data), it plots all 500 of them individually. How can I set a
ranges to group these 500 numbers into 10 or 20 groups, and plot the
value of the ranges with how many numbers are in the range.
Thanks a lot,
Q.
_
On 10/17/06, Leeds, Mark (IED) <[EMAIL PROTECTED]> wrote:
> i'm doing a bar plot and there are 16 column variables. is there a way
> to make the variable names go down instead of across when you do the
> barplot ?
> because the names are so long, the barplot just shows 3 names and leaves
> the rest
Mark
> i'm doing a bar plot and there are 16 column variables. is
> there a way to make the variable names go down instead of
> across when you do the barplot ?
> because the names are so long, the barplot just shows 3 names
> and leaves the rest out. if i could rotate the names 90
> degrees, it
PROTECTED]>
>To:
>Subject: [R] barplot question
>Date: Tue, 17 Oct 2006 17:15:43 -0400
>
>i'm doing a bar plot and there are 16 column variables. is there a way
>to make the variable names go down instead of across when you do the
>barplot ?
>because the names are so
i'm doing a bar plot and there are 16 column variables. is there a way
to make the variable names go down instead of across when you do the
barplot ?
because the names are so long, the barplot just shows 3 names and leaves
the rest out. if i could rotate the names 90 degrees, it would probably
fit
On 10/17/06, Farrel Buchinsky <[EMAIL PROTECTED]> wrote:
> I created a dataframe called OSA
> here is what it looks like
> no.surgery surgery
> 00.4 6.9
> 60.2 0.3
>
> I have also attached it as an R data file
>
> I cannot understand why I am getting the following error.
>
I created a dataframe called OSA
here is what it looks like
no.surgery surgery
00.4 6.9
60.2 0.3
I have also attached it as an R data file
I cannot understand why I am getting the following error.
barplot(OSA)
Error in barplot.default(OSA) : 'height' must be a vector
Hello everyone,
In the following program, I have specified if 'Q!=0', bar color is 'orange'
and if is '0.0', color is green. Now I want to have different colors for
'Q'. For example:
If 'Q=0.0' then color is green
If 'Q=1.92' then color is blue
If 'Q=4.48' then color is red
I also want an indica
Specify margins using par(mar=c(5,1,4,2)) before the call to barplot.
You won't be able to see the vertical axis labels with those settings,
though.
On 16/10/06, Mohsen Jafarikia <[EMAIL PROTECTED]> wrote:
> Hello everyone:
>
> I am using the following code to draw my barplot but it has two proble
Hello everyone:
I am using the following code to draw my barplot but it has two problems.
BL<-c(1.97,8.04,2.54,10.53,4.85,1.73)
LR<-c(0.85,0.86,8.33,04.18,6.26,2.40)
Q<-c(0.00,0.00,1.92,01.92,4.48,0.00)
cols <- ifelse(Q!=0, "orange", "green")
Graph<- barplot(LR, main='LR Value',col=cols, border=
Try adding
> text(31,3.8,expression(paste(alpha==5,"%")),pos=3)
On 15/10/06, Mohsen Jafarikia <[EMAIL PROTECTED]> wrote:
> Hello again,
>
> Thanks for answering my questions.
> If my program is now:
>
> pdf('Test.pdf')
> BL<-c(1.97,8.04,2.54,10.53,4.85,1.73)
> LR<-c(0.85,0.86,8.33,04.18,6.26,2.
Hello again,
Thanks for answering my questions.
If my program is now:
pdf('Test.pdf')
BL<-c(1.97,8.04,2.54,10.53,4.85,1.73)
LR<-c(0.85,0.86,8.33,04.18,6.26,2.40)
Q<-c(0.00,0.00,1.92,01.92,4.48,0.00)
cols <- ifelse(Q!=0, "orange", "green")
Graph<- barplot(LR, main='LR Value',col=cols, border='
On Sat, 2006-10-14 at 23:52 -0400, Mohsen Jafarikia wrote:
> Hello everyone,
>
> I have the following program to draw a barplot.
>
>
>
> MP<-read.table(file='AR.out')
>
> names(MP)<-c('BN','BL','LR','Q')
>
> Graph<- barplot(MP$LR, main='LR Value', col='orange', border='black', space=
> 0.05,
Hello everyone,
I have the following program to draw a barplot.
MP<-read.table(file='AR.out')
names(MP)<-c('BN','BL','LR','Q')
Graph<- barplot(MP$LR, main='LR Value', col='orange', border='black', space=
0.05, width=(MP$BL), xlab='Length', ylab='LR each')
axis(1, at=Graph, sprintf('%0.2f',MP
=c("red","blue"))
legend("topleft", c("left","right"),
fill=c("red","blue"))
>
>
> From: David Hajage <[EMAIL PROTECTED]>
> Date: Fri, 13 Oct 2006 14:11:21 +0200
> To: Ingmar Visser <[EMAIL PROTECTED]>
&
k!
> However, the legend does not reproduce the color/shading used in the
> original
> barplot, are those available somehow?
> Best, Ingmar
>
>
> From: David Hajage <[EMAIL PROTECTED]>
> Date: Fri, 13 Oct 2006 14:11:21 +0200
> To: Ingmar Visser <[EMAIL PROTE
Thanks, this could work!
However, the legend does not reproduce the color/shading used in the
original
barplot, are those available somehow?
Best, Ingmar
From: David Hajage <[EMAIL PROTECTED]>
Date: Fri, 13 Oct 2006 14:11:21 +0200
To: Ingmar Visser <[EMAIL PROTECTED]>
Cc:
Sub
For example :
x=matrix(1:10,2,5)
barplot(x,besid=T)
legend("topleft", c("left","right"), density= c(0,1000))
2006/10/13, Ingmar Visser <[EMAIL PROTECTED]>:
>
> 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
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 th
Mohsen,
I had not seen a reply to your follow up yet and I have been consumed in
meetings and on phone calls.
On your first question, add two additional lines of code:
BL <- c(36.35, 36.91, 25.70, 34.38, 5.32)
LR <- c(1.00, 4.00, 6.00, 3.00, 0.50)
Q <- c(1.92, 0.00, 0.00, 1.92, 0.00)
# Get the
Thanks for your response. I just have two more questions:
1) I don't know how to write the titles of the LR and Q behind their
lines of values (at the bottom of the graph). I tried to write like
text = sprintf("LR%.1f", LR)...
but it writes 'LR' behind all values while I only wan
On Mon, 2006-10-02 at 11:14 -0400, Mohsen Jafarikia wrote:
> Hello,
>
> I have used the following data to draw my barplot:
>
> BL LRQ
>
> 36.351.00 1.92
> 36.914.00 0.00
> 25.706.00 0.00
> 34.383.00 1.92
> 05.320.50 0.00
>
> BL<-c(36.35, 36.91, 25.70,
Hello,
I have used the following data to draw my barplot:
BL LRQ
36.351.00 1.92
36.914.00 0.00
25.706.00 0.00
34.383.00 1.92
05.320.50 0.00
BL<-c(36.35, 36.91, 25.70, 34.38, 05.32)
LR<-c(1.00, 4.00, 6.00, 3.00, 0.50)
Q<-<(1.92, 0.00, 0.00, 1.92, 0.00)
On Thu, 2006-09-07 at 12:14 -0500, Hao Chen wrote:
> Hello Marc Schwartz
>
> On Thu, Sep 07, 2006 at 07:54:05AM -0500, Marc Schwartz wrote:
> > On Thu, 2006-09-07 at 06:18 -0500, Hao Chen wrote:
> > > Hi,
> > >
> > > I am using barplot and would like to know if it is possible to have bars
> > > f
Hello Marc Schwartz
On Thu, Sep 07, 2006 at 07:54:05AM -0500, Marc Schwartz wrote:
> On Thu, 2006-09-07 at 06:18 -0500, Hao Chen wrote:
> > Hi,
> >
> > I am using barplot and would like to know if it is possible to have bars
> > filled with one color while use a different color for the shading li
On Thu, 2006-09-07 at 06:18 -0500, Hao Chen wrote:
> Hi,
>
> I am using barplot and would like to know if it is possible to have bars
> filled with one color while use a different color for the shading lines.
>
> The following code colors the shading lines, leaving the bars in white:
>
> barpl
Hi,
I am using barplot and would like to know if it is possible to have bars
filled with one color while use a different color for the shading lines.
The following code colors the shading lines, leaving the bars in white:
barplot(1:5, col=c(1:5), density=c(1:5)*5)
while the colors are applied
Dear all,
To Gabor Grothendieck, (again) thanks you very much for your help.
Now, I can play around with lattice package.
Best, Muhammad Subianto
#Gabor
#reduce the data to a frequency matrix and
#then plot it using classic and then lattice graphics:
zm <- as.matrix(rowsum(z1[-9], z1[,9]))
ba
Try this. First we reduce the data to a frequency matrix and
then plot it using classic and then lattice graphics:
zm <- as.matrix(rowsum(z1[-9], z1[,9]))
barplot(zm, beside = TRUE, col = grey.colors(2))
legend("topleft", legend = levels(z1[,9]), fill = grey.colors(2))
library(lattice)
barchart
Dear all,
Many Thanks to Jacques VESLOT and Jim Lemon for their helps.
Best, Muhammad Subianto
#Jacques VESLOT
barplot(t(sapply(split(z1[,1:8], z1$V9),colSums)), beside=T)
#Jim Lemon
barplot(sapply(z1[1:8],by,z1[9],sum),beside=TRUE)
On this day 30/08/2006 11:43, Muhammad Subianto wrote:
> D
Muhammad Subianto wrote:
> ...
> I have tried to learn ?xtabs ?table and ?ftable but I can't figure out.
> I need a barplot for all variables and the result maybe like
>
> | | | |
> | | | | | || | |
> |pos|neg| |pos|neg||pos|neg
barplot(t(sapply(split(z1[,1:8], z1$V9),colSums)), beside=T)
---
Jacques VESLOT
CNRS UMR 8090
I.B.L (2ème étage)
1 rue du Professeur Calmette
B.P. 245
59019 Lille Cedex
Tel : 33 (0)3.20.87.10.44
Fax : 33 (0)3.20.87.10.31
http://www-
Dear all,
I have a dataset. I want to make barplot from this data.
Zero1 <- "
V1 V2 V3 V4 V5 V6 V7 V8 V9
1 1 0 0 0 1 0 0 0 Positive
2 0 0 1 0 1 0 1 1 Negative
3 0 0 1 0 0 0 1 1 Positive
4 0 1 0 1 1 1 0 1 Negative
5 0 0 1 0 1 1 0 0 Positive
6 0
rom: Albert Vilella <[EMAIL PROTECTED]>
To: r-help@stat.math.ethz.ch
Date sent: Fri, 09 Jun 2006 11:26:26 +0100
Subject: [R] barplot dataframes w/ varying dimensions
Send reply to: [EMAIL PROTECTED]
<mailto:[EMA
On Fri, 2006-06-09 at 11:26 +0100, Albert Vilella wrote:
> Hi all,
>
> I would like to do a barplot of a dataframe like this one:
>
>alfa beta gamma delta
> qwert 56.5 58.5 56.5 58.5
> asdfg 73.0 73.0 43.0 73.0
> zxcvb 63.0 63.0 43.0 63.0
> yuiop 63.0 63.0 43.0 63.0
On Fri, 2006-06-09 at 06:05 -0500, Marc Schwartz wrote:
> On Fri, 2006-06-09 at 11:26 +0100, Albert Vilella wrote:
> > Hi all,
> >
> > I would like to do a barplot of a dataframe like this one:
> >
> >alfa beta gamma delta
> > qwert 56.5 58.5 56.5 58.5
> > asdfg 73.0 73.0 43.0
Hi all,
I would like to do a barplot of a dataframe like this one:
alfa beta gamma delta
qwert 56.5 58.5 56.5 58.5
asdfg 73.0 73.0 43.0 73.0
zxcvb 63.0 63.0 43.0 63.0
yuiop 63.0 63.0 43.0 63.0
with the labels of the rows and columns.
I would like to have something t
Hi
See help in plot.default for ylim and xlim. The same apply in case of
barplot
barplot(. some stuff..., ylim =c(no1, no2))
HTH
Petr
On 11 May 2006 at 11:16, [EMAIL PROTECTED] wrote:
Date sent: Thu, 11 May 2006 11:16:27 +0200 (MEST)
From: [EMAIL PROTECTED]
Marc Schwartz (via MN) wrote:
> On Mon, 2006-03-06 at 15:40 +0100, Roland Kaiser wrote:
>
>>How can i set a rotation for the names.arg in barplot?
>
>
>
> See R FAQ 7.27 How can I create rotated axis labels?:
>
> http://cran.r-project.org/doc/FAQ/R-FAQ.html#How-can-I-create-rotated-axis-labels
On Mon, 2006-03-06 at 15:40 +0100, Roland Kaiser wrote:
> How can i set a rotation for the names.arg in barplot?
See R FAQ 7.27 How can I create rotated axis labels?:
http://cran.r-project.org/doc/FAQ/R-FAQ.html#How-can-I-create-rotated-axis-labels_003f
That provides the basic concept, which i
How can i set a rotation for the names.arg in barplot?
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Anette Nørgaard <[EMAIL PROTECTED]> writes:
> I have a large dataset looking like this (as an example):
>
> doy<-c(178,179,180,181,182,183,184,185,186,187,188)
> s1<-c(0 , 0, 2.4 , 0 , 3.34 , 0 , 5.34 , 0 , 0 , 0 , 6.9)
> s2<-c(0 , 9.72, 0, 10.56 , 2.67 , 0 , 6.45 ,0 , 0 , 9, 3.6)
>
> dat<-cbi
On Mon, 12 Sep 2005 15:36:28 +0200 Anette Nørgaard wrote:
> I have a large dataset looking like this (as an example):
>
> doy<-c(178,179,180,181,182,183,184,185,186,187,188)
> s1<-c(0 , 0, 2.4 , 0 , 3.34 , 0 , 5.34 , 0 , 0 , 0 , 6.9)
> s2<-c(0 , 9.72, 0, 10.56 , 2.67 , 0 , 6.45 ,0 , 0 , 9, 3.6)
I have a large dataset looking like this (as an example):
doy<-c(178,179,180,181,182,183,184,185,186,187,188)
s1<-c(0 , 0, 2.4 , 0 , 3.34 , 0 , 5.34 , 0 , 0 , 0 , 6.9)
s2<-c(0 , 9.72, 0, 10.56 , 2.67 , 0 , 6.45 ,0 , 0 , 9, 3.6)
dat<-cbind(doy,s1,s2)
dat
I need to make a barplot where the tw
On Fri, 2005-07-01 at 14:04 +0200, Navarre Sabine wrote:
> Hi,
>
> Is it possible ti put the legend out of a barplot?
>
> tanks
>
> Sabine
I presume that you mean outside the plot region?
If so, you can use something like the following:
# Adjust the plot margins to make room for the
# le
Hi,
Is it possible ti put the legend out of a barplot?
tanks
Sabine
-
[[alternative HTML version deleted]]
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-
On Sat, 2005-06-04 at 15:53 +0100, Dan Bolser wrote:
> On Sat, 4 Jun 2005, Marc Schwartz wrote:
>
> >On Sat, 2005-06-04 at 14:50 +0100, Dan Bolser wrote:
> >
> >
> >
> >> This must be because of the "log='y'" option that I am using here.
> >>
> >> y <- c(2,4,6,8,NA,NA,NA,NA,18)
> >>
> >> barplot
On Sat, 4 Jun 2005, Uwe Ligges wrote:
>Dan Bolser wrote:
>
>[all previous stuff deleted]
>
>I see, what comes out of this longish thread is:
>
> - barplot() and barplot2() both have deficiencies for you particular
>examples, so it is time to provide patches for both barplot() and
>barplot2() (f
On Sat, 4 Jun 2005, Marc Schwartz wrote:
>On Sat, 2005-06-04 at 14:50 +0100, Dan Bolser wrote:
>
>
>
>> This must be because of the "log='y'" option that I am using here.
>>
>> y <- c(2,4,6,8,NA,NA,NA,NA,18)
>>
>> barplot2(y,log='y')
>>
>> Above fails.
>>
>>
>> I appreciate that what I am try
On Sat, 2005-06-04 at 14:50 +0100, Dan Bolser wrote:
> This must be because of the "log='y'" option that I am using here.
>
> y <- c(2,4,6,8,NA,NA,NA,NA,18)
>
> barplot2(y,log='y')
>
> Above fails.
>
>
> I appreciate that what I am trying to do is somewhat artificial (handle
> zero values o
Dan Bolser wrote:
[all previous stuff deleted]
I see, what comes out of this longish thread is:
- barplot() and barplot2() both have deficiencies for you particular
examples, so it is time to provide patches for both barplot() and
barplot2() (for the latter, you might want to contact the pac
On Sat, 4 Jun 2005, Uwe Ligges wrote:
>Dan Bolser wrote:
>
>> On Sat, 4 Jun 2005, Uwe Ligges wrote:
>>
>>
>>>Dan Bolser wrote:
>>>
I want to include missing values in my barplot to get the correct x-axis,
for example,
x <- c(1,2,3,4, 9)
y <- c(2,4,6,8,18)
barplot(y)
Dan Bolser wrote:
On Sat, 4 Jun 2005, Uwe Ligges wrote:
Dan Bolser wrote:
I want to include missing values in my barplot to get the correct x-axis,
for example,
x <- c(1,2,3,4, 9)
y <- c(2,4,6,8,18)
barplot(y)
The above looks wrong because the last height in y should be a long way
over.
On Sat, 4 Jun 2005, Uwe Ligges wrote:
>Dan Bolser wrote:
>> I want to include missing values in my barplot to get the correct x-axis,
>> for example,
>>
>> x <- c(1,2,3,4, 9)
>> y <- c(2,4,6,8,18)
>>
>> barplot(y)
>>
>> The above looks wrong because the last height in y should be a long way
>>
Dan Bolser wrote:
I want to include missing values in my barplot to get the correct x-axis,
for example,
x <- c(1,2,3,4, 9)
y <- c(2,4,6,8,18)
barplot(y)
The above looks wrong because the last height in y should be a long way
over.
So I want to do something like...
x <- c(1,2,3,4,5,6,7,8, 9)
I want to include missing values in my barplot to get the correct x-axis,
for example,
x <- c(1,2,3,4, 9)
y <- c(2,4,6,8,18)
barplot(y)
The above looks wrong because the last height in y should be a long way
over.
So I want to do something like...
x <- c(1,2,3,4,5,6,7,8, 9)
y <- c(2,4,6,8,0,0
: Monday, 18 April 2005 10:56 PM
...
> Subject: Re: [R] Barplot and colors for legend
...
> This must be an old version of R ;-)
...
Tom Mulholland
Perth, WA, Australia.
,-_|\
/ \
?_,-._/
v
__
R-help@stat.math.ethz.ch mailing list
h
>>>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
>>
>>
>>Ty
On Mon, 18 Apr 2005 16:48:42 +0200 Uwe Ligges wrote:
> Werner Wernersen wrote:
>
> > 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 fin
Werner Wernersen wrote:
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
Type
barplot.defa
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
__
On Wed, 2005-04-13 at 19:05 -0300, Antonio Olinto wrote:
> Hi,
>
> Iâm trying to make a barplot with the following dataframe, with information
> on
> relative frequency per sediment type (ST) for some species:
>
> Species ST1 ST2 ST3
> SP_A 10 6030
> ...
>
>
> At x-axis are (shoul
Hi,
Im trying to make a barplot with the following dataframe, with information on
relative frequency per sediment type (ST) for some species:
Species ST1 ST2 ST3
SP_A 10 6030
...
At x-axis are (should be ...) the species names and at y-axis the frequency per
sediment, in stacked b
,y),ncol = 2),beside=T)
> >>>>>
> >>>>>Does this help
> >>>>>
> >>>>>?barplot notes
> >>>>>
> >>>>>height: either a vector or matrix of values describing the bars
>
I think a workaround, that will do what you want is:
barplot(c(101,102,103) - 100, offset = 100)
hth,
Z
On Fri, 18 Feb 2005 14:47:24 + (GMT) Dan Bolser wrote:
>
>
> The following single line of code shows what I am trying to do, and
> the problem I am having...
>
> barplot(c(101,102,103
Dan Bolser wrote:
The following single line of code shows what I am trying to do, and the
problem I am having...
barplot(c(101,102,103),ylim=c(100,103))
The 'xaxis' is missing, and the grey bars 'fall off' the plot area. This
is generally ugly, and I would like to trim the bars (ideally they would
On Fri, 2005-02-18 at 14:47 +, Dan Bolser wrote:
>
> The following single line of code shows what I am trying to do, and the
> problem I am having...
>
> barplot(c(101,102,103),ylim=c(100,103))
>
> The 'xaxis' is missing, and the grey bars 'fall off' the plot area. This
> is generally ugly,
1 - 100 of 164 matches
Mail list logo