similar to: ggplot2: modifying line width and background fill color for stat_smooth()

Displaying 20 results from an estimated 1100 matches similar to: "ggplot2: modifying line width and background fill color for stat_smooth()"

2013 Dec 17
1
ggplot2: stat_smooth for family=binomial with cbind(Y, N) formula
With ggplot2, I can plot the glm stat_smooth for binomial data when the response is binary or a two-level factor as follows: data("Donner", package="vcdExtra") ggplot(Donner, aes(age, survived)) + geom_point(position = position_jitter(height = 0.02, width = 0)) + stat_smooth(method = "glm", family = binomial, formula = y ~ x, alpha = 0.2, size=2) But how can I
2011 Sep 12
1
plot 3 lines with ggplot2
Hi, I am trying to learn to use ggplot2 for what I had hoped would be a fairly simple task. I have a relatively small data.frame (100 by 4). The first column contains symbols. The 2nd, 3rd and 4th columns represent percentage weightings for each symbol using 3 different methodologies. For example: sym <- make.unique(replicate(100, paste(sample(LETTERS, 3, replace = TRUE), collapse =
2011 Jan 25
2
ggplot geom_boxplot and stat_smooth
Dear all I would like to superpose some smoothing line through boxplot in ggplot > dput(ad) structure(list(konc.f = structure(c(1L, 1L, 1L, 1L, 2L, 2L, 2L, 2L, 3L, 3L, 3L, 3L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 6L, 6L, 6L, 7L, 7L, 7L, 7L, 1L, 1L, 1L, 1L, 2L, 2L, 2L, 2L, 3L, 3L, 3L, 3L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 6L, 6L, 6L, 7L, 7L, 7L, 1L, 1L, 1L, 1L, 2L, 2L, 2L, 3L, 3L, 3L, 3L, 4L, 4L, 4L,
2013 Mar 06
6
Ggplot2: Moving legend, change fill and removal of space between plots when using grid.arrange() possible use of facet_grid?
Hi, # For publications, I am not allowed to repeat the axes. I have tried to remove the axes using: # yaxt="n", but it did not work. I have not understood how to do this in ggplot2. Can you help me? # I also do not want loads of space between the graphs (see below script with Dummy Data). # If I could make it look like the examples on the (nice) examples page: #
2009 Feb 04
5
ggplot: problem with fill option in stat_smooth()
Hi all, I am using ggplot2 and continuing to find it very useful and pretty. However, I am trying to create some graphics for publication that would be included in an MS Word document (not my choice!) in Windows Vista. The problem is that I want to use stat_smooth() to add an fitted linear model line along with its 95% confidence band, but I cannot seem to get the confidence band in a format
2009 Sep 12
1
ggplot2: deterministic position_jitter & geom_line with position_jitter
Dear guRus, I am starting to work with the ggplot2 package and have two very dumb questions: 1) deterministic position_jitter - the jittering is stochastic; is there any way to get a deterministic jittering? For instance: example.data <- data.frame(group=c("foo","bar","foo","bar","foo","bar"),x=c(1,1,2,2,3,3),y=c(1,1,0,2,1,1))
2011 Oct 03
4
Question about ggplot2 and stat_smooth
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 heavy blue line is the median. I don't understand how to do this with
2007 Nov 16
1
Exponential Smoothing for ggplot2's stat_smooth()
Hello everyone, I was wondering if anyone was aware of a way in which I could use ggplot's stat_smooth() function for add an exponential moving average. I was thinking that I could maybe use something like: >myggplot + stat_smooth (method = 'HoltWinters( data , .9 , 0, 0)') but my efforts were futile. Perhaps there is a way to write my own custom method to throw into
2010 Sep 11
1
ggplot: stat_smooth() and nls method
Hi all, Does one of you know if there is any way to combine a "nls" method in the stat_smooth of ggplot? Regards -- ------------- Benoit Boulinguiez Ph.D student Ecole de Chimie de Rennes (ENSCR) Bureau 1.20 Equipe CIP UMR CNRS 6226 "Sciences Chimiques de Rennes" Avenue du G?n?ral Leclerc CS 50837 35708 Rennes CEDEX 7 Tel 33 (0)2 23 23 80 83 Fax 33 (0)2 23 23 81 20
2011 Mar 24
1
questions regarding stat_smooth in ggplot area plot
Hello, I drew a simple area plot using ggplot2 using set <- read.table(file="http://www.jovian.nl/set.csv", head=1, sep=",") library(ggplot2) ggplot() + layer( data = set, mapping = aes(x = time, y = hours), geom = "area", stat="smooth", color="red" ) + layer( data = set, mapping = aes(x = time, y = hours), geom = "area",
2017 Nov 02
3
ggplot inside function doesn't plot
I have a function: myplot <- function (X) { d <- plotCounts(dds2, gene=X, intgroup="condition", returnData=TRUE) png(paste("img/", X, ".png", sep="")) ggplot(d, aes(x=condition, y=count, color=condition)) + geom_point(position=position_jitter(w=0.1,h=0)) + scale_y_log10(breaks=c(25,100,400)) + ggtitle(X) +
2017 Nov 02
0
ggplot inside function doesn't plot
> On Nov 2, 2017, at 9:27 AM, Ed Siefker <ebs15242 at gmail.com> wrote: > > I have a function: > > myplot <- function (X) { > d <- plotCounts(dds2, gene=X, intgroup="condition", returnData=TRUE) > png(paste("img/", X, ".png", sep="")) > ggplot(d, aes(x=condition, y=count, color=condition)) + >
2017 Nov 02
3
ggplot inside function doesn't plot
I don't really understand. I mean, I understand the solution is print(ggplot(...)). But why is that required in a function and not at the console? Shouldn't I be able to rely on what I do at the console working in a script? Is this inconsistent behavior by design? On Thu, Nov 2, 2017 at 11:54 AM, David Winsemius <dwinsemius at comcast.net> wrote: > >> On Nov 2, 2017,
2008 Nov 19
2
ggplot2; dot plot, jitter, and error bars
With this data x <- c(0,0,1,1,2,2) y <- c(5,6,4,3,2,6) lwr <- y-1 upr <- y+1 xlab <- c("Low","Low","Med","Med","High","High") mydata <- data.frame(x,xlab,y,lwr,upr) I would like to make a dot plot and use lwr and upr as error bars. Above 0=Low. I would like there to be some space between the 5 and the 6 corresponding
2005 Sep 07
2
Hotelling Test
Hello R-users, I've been looking for a function performing one and two sample Hotelling test for testing equality of mean vectors. Has anyone implemented such a function in R? thanks a lot, Bill ============== Bill Donner Statistician
2009 Oct 06
1
ggplot2: mapping categorical variable to color aesthetic with faceting
Hello Again... I?m making a faceted plot of a response on two categorical variables using ggplot2 and having troubles with the coloring. Here is a sample that produces the desired plot: compareCats <- function(data, res, fac1, fac2, colors) { require(ggplot2) p <- ggplot(data, aes(fac1, res)) + facet_grid(. ~ fac2) jit <- position_jitter(width = 0.1) p <- p +
2008 Dec 08
2
Red Hat réagit à la crise économique
L'entreprise Red Hat r?agit ? la crise... en supprimant une ?norme f?te d'entreprise. Au lieu de cela, ils ont d?cid? de donner l'argent ? l'?quivalent am?ricain des Restos du Coeur, soit quelque 800.000 repas: http://www.newsobserver.com/business/story/1314667.html J'ai toujours eu un faible pour Red Hat, mais l?, je les appr?cie carr?ment. Comme quoi l'esprit de
2008 Oct 22
1
ggplot scale limit and stat_smooth
In the change log of ggplot2, version 0.7, I find this: "* scales: any point outside of limits is dropped (this was previously the behaviour for discrete scales, but not continuous scales)" and that makes sense for some applications. But what about if I want to summarize the data with a smooth, and (a) include the effect of all values, but (b) "zoom in" on the smooth by
2013 Jan 14
1
Tukey HSD plot with lines indicating (non-)significance
Dear list members, I'm running some tests looking at differences between means for various levels of a factor, using Tukey's HSD method. I would like to plot the data as boxplots or dotplots, with horizontal significance lines indicating which groups are statistically significantly different, according to Tukey HSD. Here's a nice image showing an example of such a graphical
2010 May 31
0
Put two plots side by side
Two different ways: library(ggplot2) x=5 size=50 A=data.frame(X=sample(x, size, replace=T), Y=sample(x, size, replace=T),a=rep(1:2,each=25));A # Facetting qplot(X,Y,data=A) + geom_jitter(position=position_jitter(width=.03)) + facet_grid(.~a) # Or with vp p=qplot(X, Y, data=A) + geom_jitter(position=position_jitter(width=.03)) ggsave(p, file='main.png') p1=qplot(X, Y, data=A) +