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]

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

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 -

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,

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

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.

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

Re: [R] barplot - x-axis

2006-11-23 Thread Petr Pikal
Hi barplot(data, las=2, ylim = c(0,plotMax+1), ylab = Percentage, main = filename, sub = subtitle) Error in barplot.default(data, las = 2, ylim = c(0, plotMax + 1), ylab = Percentage, : 'height' must be a vector or a matrix Your code gives me an error, as I do not have data

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

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.

Re: [R] barplot question

2006-10-17 Thread Francisco J. Zagmutt
Try RSiteSearch(rotate barplot labels) Then read the first thread for an example of what you want to do. Cheers Francisco Dr. Francisco J. Zagmutt College of Veterinary Medicine and Biomedical Sciences Colorado State University From: Leeds, Mark (IED) [EMAIL PROTECTED] To:

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.

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.

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)

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

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

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

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]))

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
Hi something like tab 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 barplot(as.matrix(tab), beside=T, legend.text=T) HTH Petr On 9 Jun 2006 at 11:26, Albert Vilella wrote: From:

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

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

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

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

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

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

2005-02-17 Thread Kevin Wang
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 want to set up a barplot with the catagories 1-4 horizontally and number of occurances vertically for each vector x,y. I've tried boxplot(table(x,y), beside=T) and boxplot(c(x,y),

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

2005-02-17 Thread T Petersen
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 want to set up a barplot with the catagories 1-4 horizontally and number of occurances vertically for

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

2005-02-17 Thread Mulholland, Tom
' is 'TRUE', then the values in each column 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

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

2005-02-17 Thread T Petersen
:[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, not boxplot:-) Kevin Wang wrote: Hi, T Petersen wrote: Hi, I have two catagorical vectors

Re: [R] Barplot at the axes of another plot

2005-01-20 Thread Marc Schwartz
On Thu, 2005-01-20 at 23:53 +0100, Robin Gruna wrote: Hi, I want to draw a barplot at the axes of another plot. I saw that with two histogramms and a scatterplot in a R graphics tutorial somewhere on the net, seemed to be a 2d histogramm. Can someone figure out what I mean and give me a hint

Re: [R] barplot() options for intervals on axes

2004-12-06 Thread Uwe Ligges
Sebastien Moretti wrote: Hello, I am a beginner with R. I read many tutorials and the FAQ but I cannot solve my problem. I use barplot() to view my graph. I try to get more interval marks on y axis. I wasn't able to find options in 'help(barplot)' or 'help(par)' to do this with barplot(). See

Re: [R] barplot() options for intervals on axes

2004-12-06 Thread Chuck Cleland
Did you see the lab argument to par()? 'lab' A numerical vector of the form 'c(x, y, len)' which modifies the way that axes are annotated. The values of 'x' and 'y' give the (approximate) number of tickmarks on the x and y axes and 'len' specifies the label size.

Re: [R] barplot() options for intervals on axes

2004-12-06 Thread Sebastien Moretti
Did you see the lab argument to par()? 'lab' A numerical vector of the form 'c(x, y, len)' which modifies the way that axes are annotated. The values of 'x' and 'y' give the (approximate) number of tickmarks on the x and y axes and 'len' specifies the

Re: [R] barplot() options for intervals on axes

2004-12-06 Thread Marc Schwartz
On Mon, 2004-12-06 at 15:30 +0100, Sebastien Moretti wrote: Hello, I am a beginner with R. I read many tutorials and the FAQ but I cannot solve my problem. I use barplot() to view my graph. I try to get more interval marks on y axis. I wasn't able to find options in 'help(barplot)' or

Re: [R] barplot() options for intervals on axes

2004-12-06 Thread Sebastien Moretti
Hello, I am a beginner with R. I read many tutorials and the FAQ but I cannot solve my problem. I use barplot() to view my graph. I try to get more interval marks on y axis. I wasn't able to find options in 'help(barplot)' or 'help(par)' to do this with barplot(). I seek for

Re: [R] barplot() options for intervals on axes

2004-12-06 Thread Marc Schwartz
On Mon, 2004-12-06 at 16:31 +0100, Sebastien Moretti wrote: There are too many answers in the FAQ. Given the discussions here of late, I suspect that there will be one or two folks who might disagree with that statement... ;-) Marc __ [EMAIL

Fwd: Re: [R] barplot() options for intervals on axes

2004-12-06 Thread Sebastien Moretti
There are too many answers in the FAQ. For this topic ! Marc Schwartz -- Sebastien MORETTI Linux User - #327894 CNRS - IGS 31 chemin Joseph Aiguier 13402 Marseille cedex 20, FRANCE tel. +33 (0)4 91 16 44 55 __ [EMAIL PROTECTED] mailing list

Re: [R] barplot() using beside=TRUE and the density argument

2004-12-01 Thread Petr Pikal
__ [EMAIL PROTECTED] 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() using beside=TRUE and the density argument

2004-12-01 Thread Marc Schwartz
On Wed, 2004-12-01 at 10:46 +, michael watson (IAH-C) wrote: 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

Re: [R] barplot(2?) with CI from a zero reference line

2004-11-26 Thread Marc Schwartz
On Fri, 2004-11-26 at 07:56 +0100, Jean-Louis Abitbol wrote: Dear R Users, (and dear Marc) First of all many thanks for the answers to my previous questions. I would like to barplot the mean percent change of a variate with it's CI. Bars should start from the zero reference line to height

RE: [R] barplot(2?) with CI from a zero reference line

2004-11-25 Thread Mulholland, Tom
I didn't know how to do this but I knew it had to been asked about. Try getS3method(barplot2,default) Make sure you've loaded gplots. I guessed default, but I wonder how you would find out the class if it had been something else. I guess that's something to work on when I'm next twiddling my

Re: [R] Barplot difficulties

2004-11-16 Thread Frank E Harrell Jr
Heather J. Branton wrote: Hello. I am an R newbie struggling to learn and use R . I have read many portions of the R Reference Manual, as well as the FAQs. Given that I learn something new each time, I know I might be missing something obvious. But I appeal to your good nature to help me

Re: [R] Barplot difficulties

2004-11-15 Thread Marc Schwartz
On Mon, 2004-11-15 at 19:03 -0500, Heather J. Branton wrote: Hello. I am an R newbie struggling to learn and use R . I have read many portions of the R Reference Manual, as well as the FAQs. Given that I learn something new each time, I know I might be missing something obvious. But I

Re: [R] barplot

2004-10-16 Thread Uwe Ligges
Sepp Gurgel wrote: I have a table Do you mean a data.frame? with two columns, one with types of blood (A, B, AB or 0) and one with the factor (negative = -1 or positive = 1). And from these you made a table? my.table - table(my.data.frame) How can I combine those two columns so that 7 bars are

Re: [R] barplot with vcd library

2004-09-16 Thread Gabor Grothendieck
Tatsuki Koyama Tatsuki.Koyama at Vanderbilt.edu writes: : : 'barplot' doesn't seem to work with vcd library. : Am I supposed to detach vcd when I want to use barplot? : Here's an example. : Say I have the following matrix, : : m - matrix(c(1,2,3, 4,5,6, 3,4,5, 2,3,4), ncol=4) : m : [,1]

Re: [R] barplot and names.arg

2004-08-13 Thread Marc Schwartz
On Fri, 2004-08-13 at 09:22, Luis Rideau Cruz wrote: R-help Is there any option to get closer the x-axis and names.arg from barplot? Thank you Using mtext() you can do something like the following: data(VADeaths) # Now place labels closer to the x axis # set 'axisnames' to FALSE so the

Re: [R] barplot

2004-05-24 Thread Sundar Dorai-Raj
Carlos Guevel wrote: I´ve tried version 1.9.0 barplot with these (and others) example from the help page: tN - table(Ni - rpois(100, lambda=5)) r - barplot(tN, col='gray') I get : ...OLE_Obj... Same example with version 1.8.1 gives the following result: ...OLE_Obj... What is wrong with

Re: [R] barplot fill patterns

2004-04-18 Thread Tamas Papp
On Sun, Apr 18, 2004 at 11:28:09PM -0400, Hector L. Ayala-del-Rio wrote: 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

Re: [R] Barplot errors in MASS script

2004-01-01 Thread Uwe Ligges
[EMAIL PROTECTED] wrote: Reading Modern Applied Statististics with S and trying the corresponding examples both in the book and in ../lib/R/library/MASS/script, I'm now trying chapter 4 plotting bars with the following code on a linux box with R 1.8.1: -- library(MASS)

Re: [R] barplot plot together

2003-12-18 Thread Martin Maechler
juli == juli g pausas [EMAIL PROTECTED] on Thu, 18 Dec 2003 10:54:08 +0100 writes: juli Dear colleges, juli I'm trying to combine a barplot and a plot in a single figure as follows: juli data - 1:6 juli t - barplot(data, axes=F) juli par(new= T) juli plot(t, data,

Re: [R] barplot plot together

2003-12-18 Thread Peter Dalgaard
juli g. pausas [EMAIL PROTECTED] writes: 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

Re: [R] barplot plot together

2003-12-18 Thread juli g. pausas
Thank you very much! I'm using par(new = TRUE) because in my real case, the 2 plots have different ylim (different y-scale). I got what I wanted by using the same xlim in the barplot and in the plot, as suggested by Peter. My real case: par(mar= c(7, 4, 5, 5) + 0.1) area - c(136, 3426,

Re: [R] barplot(names.arg) versus axis(labels)

2003-11-07 Thread Marc Schwartz
On Fri, 2003-11-07 at 14:29, Siddique, Amer wrote: Should I be able to use axis() on a barplot? i have a data.frame, the first 3 values of which are: c[1:3,] median mean A156.5 58.5 A61 73.0 73.0 A62 63.0 63.0 str(c) `data.frame': 19 obs. of 2

  1   2   >