e parameter add=TRUE is used to add
the second function to the previous plot.
HTH
Matthieu
Matthieu Dubois
Post-doctoral fellow,
Psychology Department, Univeristé Libre de Bruxelles
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman
o arguments that are passed to curve():
#Figure 2, with xlim beyond the radius of the circle
plot(g,axes=F,from=0, to =50, xlim=c(0, 60), ylim=c(0,60))
axis(1,pos=0)
axis(2,pos=0)
HTH
Matthieu
Matthieu Dubois
Post-doctoral researcher
Psychology Department
Université Libre d
Colin Wahl gmail.com> writes:
>
> Does anyone have any recommendations for producing dotplots with error
> bars? Are there packages available for this? I searched far and wide
> and cannot find a suitable option.
Dear Colin,
have a look at this page from the R wiki:
http://rwiki.sciviews.org/
lt;- t.test(x,y)
@
The p value for my data was \Sexpr{ round(t$p.value, 3) }
which is not significant.
\end{document}
Best,
Matthieu
Matthieu Dubois
Post-doctoral researcher
Department of Psychology and Neural Science, NYU
__
R-help@r-project.org mai
You can also use the comment() function to add comments to any kind of R
object.
Matthieu Dubois
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting
Hi Megh,
just set the legned position to 'none' using options, by putting
+ opts(legend.position="none") after your code.
ggplot(diamonds, aes(carat, ..density..)) +
geom_histogram(binwidth = 0.2, aes(fill = cut)) +
facet_grid(. ~ cut) +
opts(legend.position="none")
HTH,
Matthieu
__
Hi,
the blue point is not shown simply because it is printed outside
the current plot area. If you want to use the base graphics, you
have to manually define the xlim and ylim of the plot. Legend is added
with the command "legend".
E.g.
x=rbind(c(10,11),c(10,11))
y=cbind(-1:0,-1:0)
plot(y,co
Hi Benoit,
I'm not a specialist of ggplot2, but I will try to help.
You may obtain more --interesting-- answers on the ggplot2
mailing list. This said, let's go.
To solve your problem, I would suggest to
1. change the form of the data frame (using the reshape library)
in order to have one v
dear Claudia,
I was recently in touch with Vito Muggeo (the developer of the
segmented package) with a similar question. This is an adapted
version of his answer to your problem.
In fact, the essential aspect is that predict.segmented has not
(yet?) been implemented. Nevertheless, you could u
Hi,
small modifications to your code will do the trick
> Here everything is ok, except few points :
> 1. I want to remove the name of y-axis, which is by default "density". Here
> I put ylab(""), however although for x-axis it is working, for y-axis it is
> not. Is there any specific formula for
Hi,
qseq is a variable from the data.frame mtcars,
that has been used to create the initial plot p.
library(ggplot2)
p <- ggplot(mtcars, aes(wt, mpg))
p + geom_point(aes(size = qsec)
Just replace qseq by your variable of interest.
Regards,
Matthieu
___
Dear Steve,
it will be difficult to help you without the code
you are using to produce the plots. Could you please post
a complete example with some (possibly generated)
data and your code ?
Regards,
Matthieu
Matthieu Dubois
Post-doctoral fellow
Psychology and NeuroCognition Lab
Grenoble
Simply use the col paramater, with a factor to index the colors.
Example:
# generate some data
x <- rnom(100)
y <- rnorm(x)
z <- as.factor(rbinom(x,1,0.5))
# plot
plot(x,y, col=c('red','blue')[z])
HTH,
Matthieu
__
R-help@r-project.org mailing list
You might also use ?curve
# same example as Bill's
par(mar = c(5,4,2,4)+0.1, yaxs = "r")
Sample <- rgamma(1000,2.5,.8)
hist(Sample, main = "", freq = FALSE, ylim = c(0,1))
curve(pgamma(x, 2.5, 0.8), add=T, col='red')
curve(dgamma(x, 2.5, 0.8), add=T, col='darkgreen')
axis(4, col = "red")
mtext(s
expr, envir,
enclos) : object 'var' not found
Thank you,
Matthieu
Matthieu Dubois
Post-doctoral fellow
Psychology and NeuroCognition Lab (CNRS UMR 5105)
Université Pierre Mendès-France
BP47 --- 38040 Grenoble Cedex 9 --- France
Email: matthieu.dub...@upmf-grenoble.fr
Gmail: mat
see ?plotmath and ?bquote
HTH,
Matthieu
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, repr
Hi Tim,
there are a couple of problems in your example.
(1) The most important is that your 'x' values for the matplot
are 1:5 (that is row numbers of your mat1 matrix)
and are seq(20,100,20) (that is, your vect vector) for your error bars.
Error bars are thus plotted outside the plotting are
Douglas M. Hultstrand metstat.com> writes:
>
> Hello,
>
> I am using the lm to fit a linear model to data, I was wondering if
> there is a way to display the equation on a plot using the extracted lm
> coefficients? I am using the plot() function to create the plot/.png.
>
> Example:
> lm_m
Just a small typo. I forgot a ) in the polygon function.
The code must be:
polygon(x = c(qrv[1], drv$x[select], qrv[2]),
y = c(0, drv$y[select], 0), col='blue')
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE
ucalgary.ca> writes:
>
> For a given random variable rv, for instance, rv = rnorm(1000),
> I plot its density curve and calculate some quantiles:
> plot(density(rv))
> P10P50P90 = = quantile(rv,probs = c(10,50,90)/100)
> I would like to color the area between P10 and P90 and under the curve
> a
see ?system.time
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
leo_wa hotmail.com> writes:
>
>
> i want to plot the histogram and the curve in the same graph.if i have a set
> of data ,i plot the histogram and also want to see what distribution it
> was.So i want to plot the curve to know what distribution it like.
You will find below an example using on
22 matches
Mail list logo