Re: [R] Multiple Plots using ggplot

2015-03-31 Thread John Kane
)) + geom_histogram( position="dodge", stat = "identity", aes(fill = variable)) ## John Kane Kingston ON Canada > -Original Message- > From: ntfr...@gmail.com > Sent: Tue, 31 Mar 2015 16:55:56 +0300 &

Re: [R] Multiple Plots using ggplot

2015-03-31 Thread stephen sefick
The error message is very informative. You named a column in the melted data "Start", and told ggplot to use "start". "start" is a function. R is case sensitive. On Tue, Mar 31, 2015 at 8:46 AM, Frederic Ntirenganya wrote: > Hi All, > > Thanks for the help. I want to plot some of the columns on

Re: [R] Multiple Plots using ggplot

2015-03-31 Thread Frederic Ntirenganya
Hi John, Sorry for the mistake I made for providing useless data. Here I am interest only on Tmin and Tmax columns. I want to use the same approach with the previous data. I want to plot on the same graph not separate graph. Thanks > dput(head(BUTemp))structure(list(Year = c(1971L, 1971L, 1971L,

Re: [R] Multiple Plots using ggplot

2015-03-31 Thread Frederic Ntirenganya
Hi All, Thanks for the help. I want to plot some of the columns on the same graph not all of them. Sorry, I failed to follow the instructions. Here is the output of *dput()* but I don't know how it works. > dput(head(data))structure(list(Date = structure(c(-6575, -6209, -5844, -5479, -5114, -4748

Re: [R] Multiple Plots using ggplot

2015-03-31 Thread John Kane
7977758355, 0.439361470235051, 1.2597110753159, -0.795425331570368, 0.974654694801041, -0.309087884123705, -1.55929705211554, 0.147715827800676, -0.542626171203849, 0.745294589678554, -0.254290052908619, 0.939894889209173)), .Names = c("xx", "yy", "zzrnorm.20."), row.name

Re: [R] Multiple Plots using ggplot

2015-03-31 Thread stephen sefick
Your data and post is still not provided in one of the formats provided here: http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example. I am unsure of what you want to do, but I have made a reproducible example that might help. zz <- "Date Number.of.Rain.Days Total.rai

Re: [R] Multiple Plots using ggplot

2015-03-31 Thread Jeff Newmiller
By failing to take the advice given to you, you make it harder to help you. Learn to control your email program to send plain text, and learn to use the dput function. With regard to this function call: > ggplot(df2, aes(Date,value)) + I highly recommend using named parameters in the aes call.

Re: [R] Multiple Plots using ggplot

2015-03-31 Thread Frederic Ntirenganya
Hi All, Sorry for the shape of data which was not good enough.This is how my data look like. I want to plot multiple using ggplot function from a data frame of many columns. I want to plot only Start.of.Rain..i., Start.of.Rain..ii. and Start.of.Rain..iii. and I failed to make it. What I want is

Re: [R] Multiple Plots using ggplot

2015-03-30 Thread Jeff Newmiller
This is no better because (a) you are still posting using HTML format, and (b) using printed output loses the internal representation of the data. The dput function is very helpful for solving this. [1] [1] http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example --

Re: [R] Multiple Plots using ggplot

2015-03-30 Thread Frederic Ntirenganya
Hi Stephen, Sorry, the data came in bad way. Here is the head of the data. > head(data)Date Number.of.Rain.Days Total.rain Start.of.Rain..i. > Start.of.Rain..ii. Start.of.Rain..iii. Start.Rain..iv. 1 1952-01-01 86 1139.95292 239 11

Re: [R] Multiple Plots using ggplot

2015-03-30 Thread stephen sefick
Hi Frederic, Can you provide a minimal reproducible example including either real data (dput), or simulated data that mimics your situation? This will allow more people to help. Stephen On Mon, Mar 30, 2015 at 8:39 AM, Frederic Ntirenganya wrote: > Dear All, > > I want to plot multiple using g

[R] Multiple Plots using ggplot

2015-03-30 Thread Frederic Ntirenganya
Dear All, I want to plot multiple using ggplot function from a data frame of many columns. I want to plot only str1, str2 and str3 and I failed to make it. What I want is to compare str1, str2 and str3 by plotting vertical line. I also need to add points to the plot to be able to separate them.