Dear Luis,
Please don't post in HTML, it mangles the code.
You want something like
p + scale_shape_manual(values = c(16, 2))
Untested as you failed to provide a reproducible example.
Best regards,
ir. Thierry Onkelinx
Instituut voor natuur- en bosonderzoek / Research Institute for Nature and
Dear R experts,
Maybe my question is too basic and I apologize for that. I am having an
issue currently by trying to change manually the symbols of the series. I
need to put them manually, instead of using the symbols that R gives by
default and produce a plot with the classic style. For example I
specify the limits calculated for the 'boxplots' using 5%, 25%,75%, 95%
limits as we have with the 'boxplots'.
>
> Tom
>
> - Original Message -
> From: Hadley Wickham
> Date: Tuesday, October 4, 2011 10:23 am
> Subject: Re: [R] Question about gg
Dennis & Hadley,
This does exactly what I need — thank you so much!
Regards,
Tom
On 10/4/11 5:34 PM, Dennis Murphy wrote:
Hi Hadley:
When I tried your function on the example data, I got the following:
dd<- data.frame(year = rep(2000:2008, each = 500), y = rnorm(4500))
g<- function(df, qs
previous email where I can
specify the limits calculated for the 'boxplots' using 5%, 25%,75%, 95% limits
as we have with the 'boxplots'.
Tom
- Original Message -
From: Hadley Wickham
Date: Tuesday, October 4, 2011 10:23 am
Subject: Re: [R] Question about ggplot2 and
Hi Hadley:
When I tried your function on the example data, I got the following:
dd <- data.frame(year = rep(2000:2008, each = 500), y = rnorm(4500))
g <- function(df, qs = c(.05, .25, .50, .75, .95)) {
data.frame(q = qs, quantile(d$y, qs))
}
ddply(dd, .(year), g)
> ddply(dd, .(year), g)
year
> # Function to compute quantiles and return a data frame
> g <- function(d) {
> qq <- as.data.frame(as.list(quantile(d$y, c(.05, .25, .50, .75, .95
> names(qq) <- paste('Q', c(5, 25, 50, 75, 95), sep = '')
> qq }
You could cut out the melt step by making this return a data frame:
g <
m my previous email where I can
> specify the limits calculated for the 'boxplots' using 5%, 25%,75%, 95%
> limits as we have with the 'boxplots'.
>
> Tom
>
> - Original Message -
> From: Hadley Wickham
> Date: Tuesday, October 4, 2011 10:2
ious email where I can
specify the limits calculated for the 'boxplots' using 5%, 25%,75%, 95% limits
as we have with the 'boxplots'.
Tom
- Original Message -
From: Hadley Wickham
Date: Tuesday, October 4, 2011 10:23 am
Subject: Re: [R] Question about ggplot2 and stat_
On Mon, Oct 3, 2011 at 12:24 PM, Thomas Adams wrote:
> I'm interested in creating a graphic -like- this:
>
> c <- ggplot(mtcars, aes(qsec, wt))
> c + geom_point() + stat_smooth(fill="blue", colour="darkblue", size=2, alpha
> = 0.2)
>
> but I need to show 2 sets of bands (with different shading) u
Hi,
Try some like this:
c <- ggplot(mtcars, aes(qsec, mpg, colour=factor(cyl)))
c + stat_smooth(aes(group=cyl))+stat_smooth(aes(fill=factor(cyl)))+geom_point()
Andrés AM
2011/10/3, Thomas Adams :
> I'm interested in creating a graphic -like- this:
>
> c <- ggplot(mtcars, aes(qsec, wt))
> c
Andrés,
Thank you for your help, but that does not capture what I'm looking for. I need
to be able to control the
shaded bound limits and they need to be coincident.
Tom
On 10/3/11 3:37 PM, Andrés Aragón wrote:
Hi,
Try some like this:
c<- ggplot(mtcars, aes(qsec, mpg, colour=factor(cyl)))
Hi:
I would think that, at least in principle, this should work:
a <- ggplot(mtcars, aes(qsec, wt))
a + geom_point() + stat_smooth(fill="blue", colour="darkblue", size=2,
level = 0.9, alpha = 0.2) +
stat_smooth(fill = 'blue', colour = 'darkblue', size = 2,
I'm interested in creating a graphic -like- this:
c <- ggplot(mtcars, aes(qsec, wt))
c + geom_point() + stat_smooth(fill="blue", colour="darkblue", size=2,
alpha = 0.2)
but I need to show 2 sets of bands (with different shading) using 5%,
25%, 75%, 95% limits that I specify and where the hea
> If a function uses substitute() or its equivalent to avoid evaluating
> its arguments in the normal way, you are pretty much forced to use
> eval() with the output of substitute() or call() or use do.call()
> to evaluate the arguments it will not evaluate for itself.
Which is why I'd argue all f
ftware
> > wdunlap tibco.com
> >
> >> -Original Message-
> >> From: r-help-boun...@r-project.org
> >> [mailto:r-help-boun...@r-project.org] On Behalf Of Brian Diggs
> >> Sent: Thursday, May 26, 2011 2:07 PM
> >> To: Julian TszKin Cha
co.com
-Original Message-
From: r-help-boun...@r-project.org
[mailto:r-help-boun...@r-project.org] On Behalf Of Brian Diggs
Sent: Thursday, May 26, 2011 2:07 PM
To: Julian TszKin Chan
Cc: r-help@r-project.org
Subject: Re: [R] Question about ggplot2
On 5/26/2011 12:29 PM, Julian TszKin Chan wr
r-help-boun...@r-project.org
> [mailto:r-help-boun...@r-project.org] On Behalf Of Brian Diggs
> Sent: Thursday, May 26, 2011 2:07 PM
> To: Julian TszKin Chan
> Cc: r-help@r-project.org
> Subject: Re: [R] Question about ggplot2
>
> On 5/26/2011 12:29 PM, Julian TszKin Chan wro
On 5/26/2011 12:29 PM, Julian TszKin Chan wrote:
Hi all,
Is there any way for me to to string in the argument of qplot or ggplot? for
example
qplot(x='carat',y='price',data=diamonds,geom=c('point','smooth'))
instead of
qplot(x=carat,y=price,data=diamonds,geom=c('point','smooth'))
I don't know
Hi all,
Is there any way for me to to string in the argument of qplot or ggplot? for
example
qplot(x='carat',y='price',data=diamonds,geom=c('point','smooth'))
instead of
qplot(x=carat,y=price,data=diamonds,geom=c('point','smooth'))
Thanks!!
Regards,
TszKin Julian
[[alternative HTML ve
Dear Josh,
This is exactly what I want, thank you so much!
Best,
Shige
On Tue, Nov 2, 2010 at 8:25 PM, Joshua Wiley wrote:
> Dear Shige,
>
> This is a feature that lets you view information about the specific
> data you are viewing. If you merely want a visual adjustment, use
> coord_cartesian
Dear Shige,
This is a feature that lets you view information about the specific
data you are viewing. If you merely want a visual adjustment, use
coord_cartesian():
year.plot + stat_summary(fun.y = "mean", geom = "line") +
coord_cartesian(xlim = c(0, 0.1))
HTH,
Josh
On Tue, Nov 2, 2010 at 5
Dear Josh and Abhijit,
Thanks for the help. The interesting thing is that the option "limits
= c(0, .1)" or "ylim(0,0.1)" also eliminates cases whose values are
greater than 0.1 and report missing values, which is not what I want.
Is there a way to keep all the cases for the computation of the
sum
Dear Shige,
You can use scale_y_continuous() to achieve this.
year.plot <- ggplot(d, aes(year, rate))
year.plot + stat_summary(fun.y = "mean", geom = "line") +
scale_y_continuous(limits = c(0, .1))
where limits may be whatever you like for the y axis.
Cheers,
Josh
On Tue, Nov 2, 2010 at 6:5
from where you are,
year.plot+ylim(0,0.1)
Abhijit
On Nov 2, 2010, at 9:57 AM, Shige Song wrote:
> Dear All,
>
> I am trying to graph a simple scatter plot where the x axis is year
> and the y axis is a percentage (percentage of infant death). Instead
> of plotting the raw data, I want to plot
Dear All,
I am trying to graph a simple scatter plot where the x axis is year
and the y axis is a percentage (percentage of infant death). Instead
of plotting the raw data, I want to plot summary statistics such as
mean and median. Here is the problem: the value range of y is between
0 and 1, but
26 matches
Mail list logo