Displaying 20 results from an estimated 3000 matches similar to: "ggplot2: deterministic position_jitter & geom_line with position_jitter"
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
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,
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 Jun 13
4
Sweave: looping over mixed R/LaTeX code
Dear guRus,
I would like to loop over a medium amount of Sweave code, including both R and LaTeX chunks. Is there any way to do so? As an illustration, can I create a .tex file like this using a loop within a .Rnw file, where the "1,2,3" comes from some iteration variable in R?
################################################
\documentclass{article}
\usepackage{Sweave}
\begin{document}
2008 Jul 14
2
Backslash in sub pattern?
Dear guRus,
I am trying to replace "~" by "$\sim$" for TeX. However, I can't get the
backslash to work. I would like to turn "DV~IV" into "DV$\sim$IV".
sub("~","$\sim$","DV~IV") => "DV$sim$IV"
sub("~","$\\sim$","DV~IV") => "DV$sim$IV"
2011 Jun 03
2
Y error bars, dates on the X-axis
Dear forum,
Does anyone know any functions for plotting vertical error bars, if the
x-axis variable is a date?
I can produce a pretty plot with dates on the x-axis, if I don't want to
include error bars. I can also produce a nice plot with error bars, if I
just use Julian days for the x-axis, but I'd much rather have the actual
dates.
I have tried writing my own function, plotCI
2009 Sep 09
2
ggplot2: mixing colour and linetype in geom_line
Hi all,
I try to represent a multiple curve graphic where the x-axis is the
temperature and the different y-axes are the different X (X22,X43,X44...)
some X corresponds to the same molecule (22 and 44 are for CO2 for instance)
so I use the same colour for them.
I wanna mix the linetype with the colour to be able to visually see the
difference between X43 and X45
The best I have done up to now
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?
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 Feb 12
3
problems plotting geom_line on ggplot2
Se ha borrado un texto insertado con un juego de caracteres sin especificar...
Nombre: no disponible
Url: https://stat.ethz.ch/pipermail/r-help/attachments/20080212/16ba8b97/attachment.pl
2011 Feb 11
1
Time Series in R with ggplot2
Hi Folks,
First, the important information.
> sessionInfo()
R version 2.12.1 (2010-12-16)
Platform: i386-pc-mingw32/i386 (32-bit)
Second, my problem.
I have a series of data sets comprised in the following format.
> totsoc
Location Year Value
1 SOUTH 1998 29
2 SOUTH 1999 20
3 SOUTH 2000 32
4 SOUTH 2001 29
5 SOUTH 2002 25
6 SOUTH 2003 28
7
2009 Sep 14
1
ggplot, ribbon not showing up properly
Hi,
I'm trying to plot a longitudinal data set, using ggplot and adding some
summary info (eg. mean, 1 sd bounds) using geom=ribbon. The summary
info is based on a subset of the original data (eg. less an outlier).
But I'm having trouble getting the ribbons to show up correctly. It's
probably something obvious that I'm missing as a novice at ggplot2, and
any help is much
2020 Oct 04
3
Leyenda gráfico combinado
Hola buenos días
hice un gráfico combinado de líneas, puntos y barras en ggplot2, pero no sé
cómo puedo poner la leyenda de eso gráfico para que me represente para las
líneas con puntos los valores estimados por un modelo y observados.
este es mi código:
ggplot(MLM,aes(x=Individuo)) + geom_bar(aes(y=Observada), stat =
"identity", color= "gray") +
geom_line(aes(y=Estimada),
2008 Oct 05
0
ggplot2 - version 0.7
ggplot2 ------------------------------------------------------------
ggplot2 is a plotting system for R, based on the grammar of graphics,
which tries to take the good parts of base and lattice graphics and
avoid bad parts. It takes care of many of the fiddly details
that make plotting a hassle (like drawing legends) as well as
providing a powerful model of graphics that makes it easy to produce
2008 Oct 05
0
ggplot2 - version 0.7
ggplot2 ------------------------------------------------------------
ggplot2 is a plotting system for R, based on the grammar of graphics,
which tries to take the good parts of base and lattice graphics and
avoid bad parts. It takes care of many of the fiddly details
that make plotting a hassle (like drawing legends) as well as
providing a powerful model of graphics that makes it easy to produce
2011 Jan 05
3
Adding lines in ggplot2
Hello,
this is probably a recurrent question, but I couldn't find any answers that
didn't involve the expression "data frame"... so perhaps I'm looking for
something new here.
I wanted to find a code equivalent to
> x=sqrt(1:10)
> y=log(1:10)
> plot(1:10, x, type="lines", col="darkgreen")
> lines(1:10, y, col="red")
to use with
2008 Nov 21
0
ggplot2 - version 0.8
ggplot2 ------------------------------------------------------------
ggplot2 is a plotting system for R, based on the grammar of graphics,
which tries to take the good parts of base and lattice graphics and
avoid bad parts. It takes care of many of the fiddly details
that make plotting a hassle (like drawing legends) as well as
providing a powerful model of graphics that makes it easy to produce
2008 Nov 21
0
ggplot2 - version 0.8
ggplot2 ------------------------------------------------------------
ggplot2 is a plotting system for R, based on the grammar of graphics,
which tries to take the good parts of base and lattice graphics and
avoid bad parts. It takes care of many of the fiddly details
that make plotting a hassle (like drawing legends) as well as
providing a powerful model of graphics that makes it easy to produce