similar to: is it possible to map 2 plots(c and d) in a single output plot?

Displaying 20 results from an estimated 600 matches similar to: "is it possible to map 2 plots(c and d) in a single output plot?"

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
2010 Apr 13
2
liner regression for multiple keys
a1 is the first key in input. second column is x-axis and 3rd is y-axis and 4th is its corresponding key. Now for every key in 1st column I would like to calculate LR that gives p value. I tried to manage with a single key. But my problem is that How could I manage multiple keys in input. Thanx in advance input a1 1 2.5 x a1 2 3.5 x a1 3 4.5 x a1 1 2.6 x a1 2 3.8 x b1 1 4.6 y
2010 Jan 19
1
Model frame when LHS is cbind (PR#14189)
The model frame shows the response and predictors in a data frame with nicely labelled columns: fm <- lm(wt~qsec+log(hp)+sqrt(disp), data=mtcars) model.frame(fm) # ok When the left hand side consists of more than one response, those response variables still look good, inside a matrix: fm <- lm(cbind(qsec,hp,disp)~wt, data=mtcars) model.frame(fm)[[1]] # ok A problem arises when
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
2009 Mar 09
1
Adding text to both grid and base graphs
Dear all, I'm stuck with the following problem: I generate graphs using both the grid system (with lattice) and the base system. I'd like to be able to identify these graphs later on with a bit of identifying text (e.g. a date and some comments). Adding text to these graphs cannot be done using a common system if you want to save them as emf files. I now use: mtext("labelling
2010 Apr 26
1
Error in pf(q, df1, df2, lower.tail, log.p) : Non-numeric argument to mathematical function
inputfille snpid indid genotype gvariable probeid gene geneexpression rs1040480 CHB_NA18524 C/T 2 GI_19743926-I PTPRT 5.850586 rs1040480 CHB_NA18526 C/C 1 GI_19743926-I PTPRT 6.028641 rs1040480 CHB_NA18529 C/C 3 GI_19743926-I PTPRT 5.944392 rs1040481 CHB_NA18532 C/C 1 GI_19743926-I PTPRT 5.938578 rs1040481 CHB_NA18537 C/C 2 GI_19743926-I PTPRT 5.874439 rs1040481 CHB_NA18540 C/C 3 GI_19743926-I
2009 Jul 23
2
param:qsec in ggplot2
Hii i have been trying to do a scatter plot with ggplot2, like the plot 6 here (http://had.co.nz/ggplot2/geom_point.html) .. where the points size vary with values > p + geom_point(aes <http://had.co.nz/ggplot2/aes.html>(size = qsec)) but am not sure how to setup the parameter - qsec could anyone please give some pointers on how to define that thanks Mo. [[alternative HTML
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
2013 Mar 08
2
ggplot2: modifying line width and background fill color for stat_smooth()
In the example below, from http://www.ling.upenn.edu/~joseff/rstudy/summer2010_ggplot2_intro.html I'd like to make (a) the fitted line thicker and (b) change the background fill color for the confidence envelope around each fitted line to a low-alpha transparent version of the same color used for the separate fitted lines for GENDER, rather than grey for both. How can I do this?
2016 Apr 14
0
Bug in by() function which works for some FUN argument and does not work for others
I think you are not using the best function for what your intentions are. Try: > by(data=mtcars, INDICES=list(as.factor(mtcars$am)), FUN=colMeans) : 0 mpg cyl disp hp drat wt qsec vs 17.1473684 6.9473684 290.3789474 160.2631579 3.2863158 3.7688947 18.1831579 0.3684211 am gear carb 0.0000000
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
2023 Jan 12
1
Reg: ggplot error
Hallo I am not familiar with any of packages you use (except of MASS and ggplot2) and the code is too complicated without any hint where the error could come from and what is the message you get. I wonder if anybody would like to go through your whole code. 1. data seems to be read correctly ICUData <- read.csv(file = "ICUData.csv", stringsAsFactors = TRUE) ICUData.neuro <-
2007 Sep 20
1
ggplot and xlim/ylim
Hello everyone, I am (happily) using ggplot2 for all my plotting now and I wondered is there is an easy way to specify xlim and ylim somewhere when using the ggplot syntax, as opposed to the qplot syntax. Eg. qplot(data=mtcars,y=wt, x=qsec,xlim=c(0,30)) <-> ggplot(mtcars, aes(y=wt, x=qsec)) + geom_point() + ??? Indeed the ggplot syntax is in general more flexible and powerful and
2020 Oct 18
1
Resultado de la consola como un tibble
Hola, Bueno, puedes hacer el cálculo de una forma mucho más compacta y rápida. Esta forma es especialmente recomendable cuando tienes muchas columnas y muchas filas. > library(data.table) > myDT <- as.data.table(mtcars) > myDTlong <- melt(myDT, measure.vars=1:ncol(myDT)) > myDTlong[ , list(p_value = shapiro.test(value)$p.value, v_stat = shapiro.test(value)$statistic) , by
2008 Aug 25
1
lattice : using both strip and strip.left
Dear all, I'm routinely using lattice and ggplot2, I wish to create a lattice theme that looks not too dissimilar to ggplot's defaults so I can include both graphs in a document with a consistent look. To illustrate my questions, consider the following example: > library(ggplot2) > library(lattice) > > # example data > x <- seq(0, 10, len = 100) > y1 <-
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
2016 Apr 15
4
Bug in by() function which works for some FUN argument and does not work for others
Dear All, Thanks for your help. However, I would like to draw your attention to the following: Actually, I was replicating the Example 2.3, using the dataset "brainsize.txt" given in Section 2.3.3 ("Summarize by group") at page 55, of a famous book "R by Example" written by "Jim Albert and Maria Rizzo" published in Springers (2012) in a Use R! Series. The
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,
2007 Sep 27
1
Cairo on windows
Hi All, I just installed Cairo on R 2.5.1 on windows XP. My hope was to get to see the transparency output e.g. http://had.co.nz/ggplot2/stat_smooth.html ggplot2 - stat_smooth , which I finally managed to do. However, I find the Cairo device, which I access either through CairoWin() or Cairo(type="win"), is pretty shaky in a number of respects : - whatever portion of the Cairo
2016 Apr 15
0
Bug in by() function which works for some FUN argument and does not work for others
> On Apr 15, 2016, at 1:16 AM, Akhilesh Singh <akhileshsingh.igkv at gmail.com> wrote: > > Dear All, > > Thanks for your help. However, I would like to draw your attention to the > following: > > Actually, I was replicating the Example 2.3, using the dataset > "brainsize.txt" given in Section 2.3.3 ("Summarize by group") at page 55, > of a