similar to: Errorbar

Displaying 20 results from an estimated 7000 matches similar to: "Errorbar"

2011 Dec 04
1
Polishing my geom_bar for publication
Dear list, I am new with ggplot2 and I have spend quiet some time putting together the following code to create the attached plot. However there's still a few things that I'm having trouble with! I would be grateful if someone can tell me how to fix (1) the colour of my bars into grey scales (2) removing the y-axis (species name) on the right figure to avoid duplication, and (3) fix the
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
2013 Feb 03
1
ggplot2 plotting errorbars.
Hi, i'm using this lines of code: dodge <-position_dodge(width=0.9) ggplot(dfm,aes(x = X,y = value)) + geom_bar(aes(fill = variable), position=dodge, stat="identity") + geom_errorbar(aes(ymin=value-er, ymax=value+er),width=0.25, position=dodge,stat="identity") to plot this data frame X variable value er 1 A X4 58.74 9.44 2 B X4
2023 Nov 24
1
ggplot adjust two y-axis
Hi, I don't know the axis mecanism well enough in ggplot but using the original barplot function you can add an axis on the right using the axis function. Here is an example: test <- as.table(matrix(c(2,10,3,11), 2,2)) barplot(test, beside = TRUE, col = scales::brewer_pal(palette = 1)(2)) axis(4, at = c(0, 5, 10), labels = c(0,50,100)) -----Message d'origine----- De?:
2010 Mar 12
1
simple plot in ggplot2, wrong error bars
I was wondering if anyone could help me with this, simple problem. I am essentially following the example on Hadley's webpage (http://had.co.nz/ggplot2/geom_errorbar.html), but it still doesn't make any sense to me. df <- data.frame(trt = factor(c("intact", "intact", "removed", "removed")), coon = c(0.093, 0.06, 0.057, 0.09), group =
2023 Nov 24
1
ggplot adjust two y-axis
Dear Charles-Edouard Thanks a lot. Yes indeed barplot sounds excellent. Unfortunately, the scale of the smaller axis is fixed, even If I am able to draw to axes. The idea is to expand the scale to the scale to the second axis for comparison. F1 <- as.table(matrix(c(50,11,6,17,16,3,1,2237,611,403,240,280,0,0), 2,7)) barplot(F1, beside = TRUE, col = c("blue", "grey"))
2023 Nov 24
1
ggplot adjust two y-axis
Hi, Just find a scaling factor that would make the two sets of data comparable. Here I divided the second row by 5 and did the same for the second axis. Charles-?douard F1 <- as.table(matrix(c(50,11,6,17,16,3,1,2237,611,403,240,280,0,0), 2,7)) barplot(F1, beside = TRUE, col = c("blue", "grey")) axis(2, at=c(0,10,20,30,40,50,60, labels=c(0,10,20,30,40,50,60))) axis(4, at =
2011 Nov 16
1
geom_bar with missing data in package ggplot
Dear all, I was hoping someone could help with a ggplot question. I would like to generate a faceted bar chart, but missing data are causing problems. g<-structure(list(Date = structure(c(11322, 11687, 12052, 11322, 11687, 12052, 11322, 11687, 12052, 11322, 11687, 12052), class = "Date"), variable = c("Govt Revenues to GDP", "Govt Revenues to GDP",
2013 Apr 30
1
Stacked geom_bar with aggregated SE -ggplot2
Hi there,? I've been battling with an extension of this in my own data: getting appropriate error bars once data is stacked in a bar graph.? (original question: http://r.789695.n4.nabble.com/ggplot2-se-variable-in-geom-errorbar-s-limits- td3311176.html). It wouldn't let me reply to that thread. A modification of the earlier answer:? data(diamonds)? ?diamonds_df <- ddply(diamonds,
2023 Jun 28
1
horizontal grouped stacked plots and removing space between bars
I have code like this: data <- read.csv("test1.csv", stringsAsFactors=FALSE, header=TRUE) # Graph myplot=ggplot(data, aes(fill=condition, y=value, x=condition)) + geom_bar(position="dodge", stat="identity", width=0.5) + scale_fill_manual(values=c("#7b3294", "#c2a5cf", "#a6dba0", "#008837"))+
2010 Dec 06
2
ggplot2: Controlling line width of panel borders
Dear R-users, i encountered some problems when trying to adjust the line width of the axes and stripes in a plot created with ggplot2. I use the "barley" dataset of the lattice package to illustrate my problem: library(ggplot2) library(lattice) barley[["SD"]] <- 5 limits <- aes(ymax=barley$yield + barley$SD,ymin=barley$yield - barley$SD) p1 <-
2017 Jun 18
2
Problema con Histograma con porcentajes usando ggplot
Estimados Soy un nuevo usario de R, y estoy usando como base de datos el European Social Survey, que tiene datos de 40,000 individuos, y alrededor de 23 países europeos. Lo que he seleccionado es la útima ola, el round 7, para el año 2014. He leido los datos, desde SPSS y aquí tienen la base de datos y que tipo de objetos se han generado, y tambíen la distribución por pais de la muestra. No he
2023 Nov 24
1
ggplot adjust two y-axis
Hi Sibylle, For that kind of data with two different scales, I generally use two graphs that I name gg1 and gg2 and join them using gridExtra::grid.arrange(gg1, gg2). This way, the red part of your graph is easier to interpret. Have a nice day, Charles-?douard -----Message d'origine----- De?: R-help <r-help-bounces at r-project.org> De la part de sibylle.stoeckli at gmx.ch Envoy??:
2017 Jun 19
3
Problema con Histograma con porcentajes usando ggplot
Muchas gracias. Me puede recomendar algún libro donde poder empezar. Gracias El 18/06/2017 9:46 p. m., <javier.ruben.marcuzzi en gmail.com> escribió: > > > Estimado Antonio Rodriguez Andres > > > > Usted dice que está en sus inicios con R, y desea realizar un gráfico. > Esto no es problema, el inconveniente es que está mezclando librerías, es > lógico, se puede
2023 Jun 16
1
Issue with crammed Y axis
Hi, I have a data frame like this: > dput(df) structure(list(ID = 1:8, Type = c("gmx mdrun -ntmpi 8 -ntomp 1 -s benchPEP.tpr -nsteps 10000 -resethway", "gmx mdrun -ntmpi 8 -ntomp 1 -s benchPEP.tpr -nsteps 10000 -resethway", "gmx mdrun -ntmpi 8 -s benchPEP.tpr -nsteps 4000 -resetstep 3000", "gmx mdrun -ntmpi 8 -s benchPEP.tpr -nsteps 4000 -resetstep
2017 Jul 27
0
na.rm = T treatment by ggplot2's geom_bar
Thank you, Bert! I do NOT have an object named "T" in scope (I checked - and besides, it would never occur to me to use this name). TRUE or T results in the same unexpected behavior: ggplot(data = md, mapping = aes(x = a)) + geom_bar(na.rm = TRUE) On Thu, Jul 27, 2017 at 10:57 AM, Bert Gunter <bgunter.4567 at gmail.com> wrote: > Just a thought: > > Did you try
2017 Jun 18
3
Problema con Histograma con porcentajes usando ggplot
Gracias. Alguna idea de que usar para calcular los porcentajes y almacenarlos. Se puede usar flat table? El 18/06/2017 4:50 p. m., "Carlos J. Gil Bellosta" <cgb en datanalytics.com> escribió: > Los porcentajes que obtienes con tu código son sobre todas las facetas, no > país a país. > > Calcula los porcentajes previamente a por país y representa esa columna en >
2012 Mar 12
1
Faceted bar plot shows wrong counts (ggplot2)
I have encountered a problem with faceted bar plots. I have tried to create something like the example explained in the ggplot2 book (see pp. 126-128): library(ggplot2) mpg4 <- subset(mpg, manufacturer %in% c("audi", "volkswagen", "jeep")) mpg4$manufacturer <- as.character(mpg4$manufacturer) mpg4$model <- as.character(mpg4$model) base <-
2008 Jun 16
1
ggplot2: How to remove legend component for geom_errorbar() ?
Dear list (probably Hadley), I'm trying to do a plot like the following, composed of bars and error bars: df <- data.frame(factor1=gl(2,5), factor2=gl(5,1), y=rnorm(10), err=0.1) ggplot(df, aes(x=factor1, y=y, fill=factor2)) + geom_bar(position="dodge", stat="identity") + geom_errorbar(aes(min=y-err, max=y+err), position="dodge", width=0.1) The