search for: stat_density

Displaying 16 results from an estimated 16 matches for "stat_density".

Did you mean: stat_density2d
2009 Aug 24
1
how to add 95% confidential interval as vertical lines to x axe in density plot
...its8,traits9,traits10,traits11,traits12,traits13,traits14,traits15,traits16,traits17,traits18, traits19,traits20,traits21) library(ggplot2) d = melt(myda, id = "factor") str(d) pdf("test33.pdf") p = ggplot(data=d, mapping=aes(x=value, y=..density..)) + facet_wrap(~variable)+ stat_density(aes(fill=factor), alpha=0.5, col=NA, position = 'identity') + stat_density(aes(colour = factor), geom="path", position = 'identity') print(p) dev.off() Mao J-F
2007 Sep 02
0
ggplot2 - version 0.5.5
...use. Changes in version 0.5.5 ---------------------------------------- Improvements: * ggplot now gives rather more helpful errors if you have misspecified a variable name in the aesthetic mapping * changed default hline and vline intercepts to 0 * added "count" output variable from stat_density for creating stacked/conditional density plots * added parameters to geom_boxplot to control appearance of outlying points * overriding aesthetics with fixed values that have already been set with aesthetics now actually works * slightly better names for xaxis and yaxis grobs * added aes_string...
2007 Jul 05
1
ggplot2 customizing
...ty line. I also observed that the density lines (after limiting the x-scale) extend a little bit into the surrounding of the plot, which can be seen very strong when plotted as pdf. They extend into the white space between the tick and the plotting panel. p <- ggplot(df, aes(x=distance)) p + stat_density(aes(colour=factor(mark),y=..scaled..), size=1, fill=FALSE) + scale_x_continuous(limits=c(0, 1e4)) + scale_y_continuous("scaled density") thank you very much, ido
2007 Sep 02
0
ggplot2 - version 0.5.5
...use. Changes in version 0.5.5 ---------------------------------------- Improvements: * ggplot now gives rather more helpful errors if you have misspecified a variable name in the aesthetic mapping * changed default hline and vline intercepts to 0 * added "count" output variable from stat_density for creating stacked/conditional density plots * added parameters to geom_boxplot to control appearance of outlying points * overriding aesthetics with fixed values that have already been set with aesthetics now actually works * slightly better names for xaxis and yaxis grobs * added aes_string...
2011 Sep 06
3
r-help volcano plot
Can't installe packag maDB or limma. Error is shown as Using R version 2.13.1, biocinstall version 2.8.4. Installing Bioconductor version 2.8 packages: Is there any other way to draw volcano plot ? Thanks [[alternative HTML version deleted]]
2010 Mar 31
1
ggplot2: Adding points to a density plot
Hi, Consider something like > library(ggplot2) > movies$decade <- round_any(movies$year, 10) > m <- qplot(rating,data=movies,colour=factor(decade),geom="density") > m (modified from "?stat_density"). I'd like to add on the line y=0 a dot for the median of each "decade" category (using the same colour coding as the "fill"). I'm failing miserably at all my > m + geom_point based approaches and would appreciate if someone could show me the ggplot2 way of...
2009 Aug 21
0
how to plot 95% confidential interval as vertical lines to x axe in density plot
...its8,traits9,traits10,traits11,traits12,traits13,traits14,traits15,traits16,traits17,traits18, traits19,traits20,traits21) library(ggplot2) d = melt(myda, id = "factor") str(d) pdf("test33.pdf") p = ggplot(data=d, mapping=aes(x=value, y=..density..)) + facet_wrap(~variable)+ stat_density(aes(fill=factor), alpha=0.5, col=NA, position = 'identity') + stat_density(aes(colour = factor), geom="path", position = 'identity') print(p) dev.off() Mao J-F
2009 Mar 25
2
[ggplot2] Densityplot, grouping and NAs
...ydf) m + geom_density() How do I get rid of the NAs (i.e. the blue colored curve)? I thought ## m <- ggplot(aes(x = x, group = g, color = g, na.rm = TRUE), ## data = mydf) ## m + geom_density() or ## m <- ggplot(aes(x = x, group = g, color = g), data = mydf) ## m + geom_density() ## m + stat_density(na.rm = TRUE) etc. would solve my problem but to no avail. Thanks for your help, Bernd
2014 Jan 19
2
stat_density2d de ggplot2
Hola comunidad, tengo el siguiente problema con la funcion stat_density2d (estimacion de densidad 2d.) del paquete ggplot2 stat_density2d (mapping = NULL, data = NULL, geom = "density2d", position = "identity", na.rm = FALSE, contour = TRUE, n = 100, ...) de esta función requiero ver el cálculo númerico de la estimación de la densidad, cuento...
2009 Aug 19
2
how to fill the area under the density line with semitransparent colors
Dear R-listers, I have created a plot to display the density lines for the same variable by different entities. Now, I want to fill the area under the density lines with semitransparent colors. Though I have checked that in web-searching and book-reading, I still do not perform that. Could anyone please give me any helps or advice? Thank you in advance. The data and code I used listed below: #
2011 Jun 07
1
ggplot 2: Histogram with bell curve?
I am learning ggplot2 commands specifically qplot for the time being and I have figured out how to create histograms and normal density curves but I am not sure how to add a normal bell curve or other dist. as well on top of a histogram. Here are the two graphs that I created. ## Histogram t<-rnorm(500) w<-qplot(t, main="Normal Random Sample", fill=I("blue"),
2014 Jan 19
0
stat_density2d de ggplot2
Marta, Puedes ver en el código source de ggplot stat_density si es que lo tienes descargado como sorce o puedes ir a GitHub https://github.com/hadley/ggplot2/blob/master/R/stat-density-2d.r y ver como calcula los datos. Por lo que veo usa la función de la librería MASS kde2d, para ver que hace esta escribe kde2d en la consola. Espero te sirva. Daniel El...
2012 Mar 02
2
Statistical Histograms in R
Hi, I'm wondering if anybody could possibly help me? I have a table with 5 tab-delimited columns. Each column has 'e-value' scores for 5 different proteins. I'd like to plot a distribution curve using hist() for the 5 different proteins and show the 5 distribution curves on the same graph in different colours. In the case, E-values will be the X-axis and frequency will be the
2008 Apr 04
0
ggplot2 - version 0.6
...nks to Bob Muenchen for pointing this out!) * stat_bin: no longer incorrectly warns that binwidth is unspecified when breaks are set * stat_bin: now takes origin argument to manually specify origin of first bin (default is round_any(min(range), bin_width, floor)) * stat_boxplot, stat_contour, stat_density2d, stat_qq, stat_density: na.rm parameter added to the following statistics (thanks to Leena Choi for suggesting this) * stat_function: new, makes it easy to superimpose a function on the plot * stat_qq: axes flipped to agree with base R * stat_qq: now uses sample aesthetic to select variable...
2008 Apr 04
0
ggplot2 - version 0.6
...nks to Bob Muenchen for pointing this out!) * stat_bin: no longer incorrectly warns that binwidth is unspecified when breaks are set * stat_bin: now takes origin argument to manually specify origin of first bin (default is round_any(min(range), bin_width, floor)) * stat_boxplot, stat_contour, stat_density2d, stat_qq, stat_density: na.rm parameter added to the following statistics (thanks to Leena Choi for suggesting this) * stat_function: new, makes it easy to superimpose a function on the plot * stat_qq: axes flipped to agree with base R * stat_qq: now uses sample aesthetic to select variable...
2008 Jan 15
4
Overlay plots from different data sets using the Lattice package
#After spending the entire day working on this question, I have decided to reach out for support: #I am trying to overlay a densityplot from one data set over a histogram of another, if I were to plot the two individually, they would look like: # data frame construction data.frame.A <- data.frame(rnorm(12*8), c(rep("one", 4), rep("two", 4), rep("three", 4)),