[R] Barplot with multiple categories

2007-07-10 Thread Noel Magnin
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 -) #A1A2A3B1B2B3C1C2C3D1

Re: [R] barplot and map overlay

2007-06-13 Thread Greg Snow
Look at the subplot function in the TeachingDemos package. -Original Message- From: Héctor Villalobos [EMAIL PROTECTED] To: r-help@stat.math.ethz.ch 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 graphics

Re: [R] barplot and map overlay

2007-06-13 Thread Héctor Villalobos
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 r-help@stat.math.ethz.ch Sent: 6/11/07 5:48 PM Subject: [R

[R] barplot and map overlay

2007-06-11 Thread Héctor Villalobos
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 barplot

Re: [R] Barplot by two variables

2007-05-15 Thread 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. My data

[R] Barplot by two variables

2007-05-10 Thread Spilak,Jacqueline [Edm]
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

Re: [R] Barplot by two variables

2007-05-10 Thread Deepayan Sarkar
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.675 1999

Re: [R] Barplot by two variables

2007-05-10 Thread Marc Schwartz
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 to

Re: [R] Barplot legend position

2007-04-10 Thread Peter Danenberg
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 -

[R] barplot, for loop?

2007-03-10 Thread Lauri Nikkinen
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

Re: [R] barplot, for loop?

2007-03-10 Thread Lauri Nikkinen
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

Re: [R] barplot, for loop?

2007-03-10 Thread jim holtman
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 munat puoliks

Re: [R] barplot with different color combination for each bar

2007-03-05 Thread Jonne Zutt
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(blue,

[R] barplot with different color combination for each bar

2007-03-02 Thread Kim Milferstedt
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

[R] Barplot Graph

2007-02-26 Thread Mohsen Jafarikia
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

Re: [R] barplot x-axis problem

2007-01-26 Thread Lauri Nikkinen
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 (refering

[R] barplot x-axis problem

2007-01-25 Thread Lauri Nikkinen
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

Re: [R] barplot x-axis problem

2007-01-25 Thread Marc Schwartz
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 of

Re: [R] barplot - how to force vertical axis to cover entire plot area

2006-12-11 Thread Ricardo Rodríguez - Your XEN ICT Team
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 --

Re: [R] barplot - how to force vertical axis to cover entire plot area

2006-12-07 Thread Uwe Ligges
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.

[R] barplot - how to force vertical axis to cover entire plot area

2006-12-06 Thread Etienne
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

[R] barplot help needed

2006-11-24 Thread Antje
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

Re: [R] barplot help needed

2006-11-24 Thread Jacques VESLOT
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

Re: [R] barplot help needed

2006-11-24 Thread Antje
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...

Re: [R] barplot help needed

2006-11-24 Thread Jacques VESLOT
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

Re: [R] barplot help needed

2006-11-24 Thread ONKELINX, Thierry
] 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(sd1, sd2, sd3

Re: [R] barplot help needed

2006-11-24 Thread Antje
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)

Re: [R] barplot help needed

2006-11-24 Thread ONKELINX, Thierry
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 - c(2,4,6,2,5

Re: [R] barplot help needed

2006-11-24 Thread Jacques VESLOT
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 correct

[R] barplot - x-axis

2006-11-23 Thread Antje
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))

Re: [R] barplot - x-axis

2006-11-23 Thread Petr Pikal
] 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 between these labels, which does not look very nice... Could

[R] Barplot

2006-10-18 Thread Qian Wan
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.

Re: [R] Barplot

2006-10-18 Thread Chuck Cleland
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. Maybe

[R] barplot error

2006-10-17 Thread Farrel Buchinsky
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

Re: [R] barplot error

2006-10-17 Thread Gabor Grothendieck
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.

[R] barplot question

2006-10-17 Thread Leeds, Mark \(IED\)
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

Re: [R] barplot question

2006-10-17 Thread Francisco J. Zagmutt
@stat.math.ethz.ch 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 long, the barplot just shows 3 names and leaves

Re: [R] barplot question

2006-10-17 Thread Peter Alspach
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 would

Re: [R] barplot question

2006-10-17 Thread Deepayan Sarkar
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 out.

[R] BarPlot

2006-10-16 Thread Mohsen Jafarikia
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='black',

Re: [R] BarPlot

2006-10-16 Thread David Barron
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 problems.

[R] BarPlot Color

2006-10-16 Thread Mohsen Jafarikia
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

Re: [R] BarPlot

2006-10-15 Thread Marc Schwartz
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, width=(MP$BL),

Re: [R] BarPlot

2006-10-15 Thread Mohsen Jafarikia
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='black',

Re: [R] BarPlot

2006-10-15 Thread David Barron
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.40)

[R] BarPlot

2006-10-14 Thread Mohsen Jafarikia
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,

[R] Barplot legend position

2006-10-13 Thread Ingmar Visser
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

Re: [R] Barplot legend position

2006-10-13 Thread David Hajage
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 is placed in

Re: [R] Barplot legend position

2006-10-13 Thread Ingmar Visser
Subject: Re: [R] Barplot legend position 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

Re: [R] Barplot legend position

2006-10-13 Thread Stefan Grosse
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: R-help@stat.math.ethz.ch Subject: Re: [R] Barplot legend position For example : x=matrix(1:10,2,5) barplot(x,besid=T

Re: [R] Barplot legend position

2006-10-13 Thread John Kane
,right), fill=c(red,blue)) From: David Hajage [EMAIL PROTECTED] Date: Fri, 13 Oct 2006 14:11:21 +0200 To: Ingmar Visser [EMAIL PROTECTED] Cc: R-help@stat.math.ethz.ch Subject: Re: [R] Barplot legend position For example : x=matrix(1:10,2,5) barplot(x,besid=T) legend(topleft, c

Re: [R] Barplot

2006-10-03 Thread Marc Schwartz (via MN)
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

[R] Barplot

2006-10-02 Thread Mohsen Jafarikia
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)

Re: [R] Barplot

2006-10-02 Thread Marc Schwartz (via MN)
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, 34.38, 05.32)

Re: [R] Barplot

2006-10-02 Thread Mohsen Jafarikia
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 want

[R] barplot: different colors for the bar and the strips

2006-09-07 Thread Hao Chen
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

Re: [R] barplot: different colors for the bar and the strips

2006-09-07 Thread Marc Schwartz
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: barplot(1:5,

Re: [R] barplot: different colors for the bar and the strips

2006-09-07 Thread Hao Chen
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 lines.

Re: [R] barplot: different colors for the bar and the strips

2006-09-07 Thread Marc Schwartz (via MN)
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 filled with one

[R] Barplot

2006-08-30 Thread Muhammad Subianto
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

Re: [R] Barplot

2006-08-30 Thread Jacques VESLOT
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

Re: [R] Barplot

2006-08-30 Thread Jim Lemon
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| |

Re: [R] Barplot - thanks

2006-08-30 Thread Muhammad Subianto
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:

Re: [R] Barplot

2006-08-30 Thread Gabor Grothendieck
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)

Re: [R] Barplot

2006-08-30 Thread Muhammad Subianto
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]))

[R] barplot dataframes w/ varying dimensions

2006-06-09 Thread Albert Vilella
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

Re: [R] barplot dataframes w/ varying dimensions

2006-06-09 Thread Marc Schwartz
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 73.0 zxcvb

Re: [R] barplot dataframes w/ varying dimensions

2006-06-09 Thread Marc Schwartz
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 with

Re: [R] barplot dataframes w/ varying dimensions

2006-06-09 Thread Petr Pikal
: 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:[EMAIL PROTECTED] mailto

[R] barplot axis range was Re:(no subject)

2006-05-11 Thread Petr Pikal
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]

[R] barplot names.arg

2006-03-06 Thread Roland Kaiser
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

Re: [R] barplot names.arg

2006-03-06 Thread Marc Schwartz (via MN)
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

Re: [R] barplot names.arg

2006-03-06 Thread Dan Bolser
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_003f

[R] barplot with multiple columns

2005-09-12 Thread Anette Nørgaard
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 two

[R] barplot legend

2005-07-01 Thread Navarre Sabine
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

Re: [R] barplot legend

2005-07-01 Thread Marc Schwartz
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 # legend

[R] barplot and missing values?

2005-06-04 Thread Dan Bolser
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 -

Re: [R] barplot and missing values?

2005-06-04 Thread Uwe Ligges
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) y

Re: [R] barplot and missing values?

2005-06-04 Thread Dan Bolser
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. So I want to

Re: [R] barplot and missing values?

2005-06-04 Thread Uwe Ligges
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.

Re: [R] barplot and missing values?

2005-06-04 Thread Dan Bolser
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) The above looks wrong because the last

Re: [R] barplot and missing values?

2005-06-04 Thread Uwe Ligges
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

Re: [R] barplot and missing values?

2005-06-04 Thread Marc Schwartz
On Sat, 2005-06-04 at 14:50 +0100, Dan Bolser wrote: snip 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 on a log

Re: [R] barplot and missing values?

2005-06-04 Thread Dan Bolser
On Sat, 4 Jun 2005, Marc Schwartz wrote: On Sat, 2005-06-04 at 14:50 +0100, Dan Bolser wrote: snip 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

[R] Barplot and colors for legend

2005-04-18 Thread Werner Wernersen
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

Re: [R] Barplot and colors for legend

2005-04-18 Thread Uwe Ligges
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

Re: [R] Barplot and colors for legend

2005-04-18 Thread Achim Zeileis
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 find the colors

RE: [R] Barplot and colors for legend

2005-04-18 Thread Mulholland, Tom
... 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 https://stat.ethz.ch/mailman/listinfo/r-help

[R] barplot usage

2005-04-13 Thread Antonio Olinto
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 (should be ...) the species names and at y-axis the frequency per sediment, in stacked

Re: [R] barplot usage

2005-04-13 Thread Marc Schwartz
On Wed, 2005-04-13 at 19:05 -0300, Antonio Olinto wrote: 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 ...)

Re: [R] Barplot - Can't figure it out

2005-02-18 Thread Petr Pikal
@stat.math.ethz.ch Subject: Re: [R] Barplot - Can't figure it out Ups, it should of course be barplot() in my mail, not boxplot:-) Kevin Wang wrote: Hi, T Petersen wrote: Hi, I have two catagorical vectors like this; x = c(1, 2, 4, 2, 1) y = c(2, 4, 2 ,4, 1) I

Re: [R] Barplot - Can't figure it out

2005-02-18 Thread T Petersen
are juxtaposed rather than stacked. -Original Message- From: T Petersen [mailto:[EMAIL PROTECTED] Sent: Friday, 18 February 2005 1:35 PM To: Kevin Wang Cc: r-help@stat.math.ethz.ch Subject: Re: [R] Barplot - Can't figure it out Ups, it should of course be barplot() in my mail

Re: [R] Barplot - Can't figure it out

2005-02-18 Thread Achim Zeileis
than stacked. -Original Message- From: T Petersen [mailto:[EMAIL PROTECTED] Sent: Friday, 18 February 2005 1:35 PM To: Kevin Wang Cc: r-help@stat.math.ethz.ch Subject: Re: [R] Barplot - Can't figure it out Ups, it should of course be barplot() in my mail

RE: [R] Barplot - Can't figure it out

2005-02-18 Thread BXC (Bendix Carstensen)
1:01 PM To: Petr Pikal Cc: r-help@stat.math.ethz.ch Subject: Re: [R] Barplot - Can't figure it out Wow, I'm getting confused...The syntax Petr suggested does what I wanted, but things are stille wrong...Maybe a bug? Let me explain. I got two vectors: x = c(3, 3, 3, 4, 3, 4, 3, 4, 3

Re: [R] Barplot - Can't figure it out

2005-02-18 Thread Petr Pikal
: Friday, 18 February 2005 1:35 PM To: Kevin Wang Cc: r-help@stat.math.ethz.ch Subject: Re: [R] Barplot - Can't figure it out Ups, it should of course be barplot() in my mail, not boxplot:-) Kevin Wang wrote: Hi, T Petersen wrote: Hi

Re: [R] Barplot - Can't figure it out

2005-02-18 Thread T Petersen
February 2005 1:35 PM To: Kevin Wang Cc: r-help@stat.math.ethz.ch Subject: Re: [R] Barplot - Can't figure it out Ups, it should of course be barplot() in my mail, not boxplot:-) Kevin Wang wrote: Hi, T Petersen wrote: Hi, I have two catagorical

Re: [R] barplot and ylim - display problems

2005-02-18 Thread Marc Schwartz
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, and I

Re: [R] barplot and ylim - display problems

2005-02-18 Thread Uwe Ligges
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

Re: [R] barplot and ylim - display problems

2005-02-18 Thread Achim Zeileis
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...

Re: [R] Barplot - Can't figure it out

2005-02-18 Thread Adaikalavan Ramasamy
. -Original Message- From: T Petersen [mailto:[EMAIL PROTECTED] Sent: Friday, 18 February 2005 1:35 PM To: Kevin Wang Cc: r-help@stat.math.ethz.ch Subject: Re: [R] Barplot - Can't figure it out Ups, it should of course be barplot() in my mail

  1   2   >