similar to: ggplot - unwanted sorted X values

Displaying 20 results from an estimated 1100 matches similar to: "ggplot - unwanted sorted X values"

2010 Nov 04
5
ggplot output
Dear All, I have this script: dat <- data.frame(Month = hstat$Date,C_avg = hstat$C.avg,C_stdev = hstat$C.stdev) ggplot(data = dat, aes(x = Month, y = C_avg, ymin = C_avg - C_stdev, ymax = C_avg + C_stdev)) + geom_point() + geom_line() + geom_errorbar() dat <- data.frame(Month = hstat$Date,K_avg = hstat$K.avg,K_stdev = hstat$K.stdev) ggplot(data = dat, aes(x = Month, y = K_avg,
2012 Jul 26
2
Error Bars ggplot2
Hello, I'm attempting to plot error bars side by side rather than stacked on top of each other with ggplot2. Here is the sample code I am using: #Code #Data spd<-c("s","f","f","s","f","s","s","s","f","f","s","f") r<-c(4.9,3.2,2.1,.2,3.8,6.4,7.5,1.7,3.4,4.1,2.2,5)
2011 Feb 17
3
ggplot2, 'se' variable in geom_errorbar's limits?
Dear R-list I'm working with with geom_errorbar; specifically I'm trying to reproduce the example Hadley Wickham have on http://had.co.nz/ggplot2/geom_errorbar.html (all in the button of the page) where he makes an nice plot with errorbars and then draw lines between the points. What confuses me is the 'limits' he defines for the errorbars from the se variable. First he creates
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
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: #
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 =
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
2011 Sep 07
2
ggplot2-Issue placing error bars behind data points
Hi all, This seems like a basic problem, but no amount of playing with the code has solved it. I have a time-series data set like that shown below (only longer) and am seeking to plot the data with filled, circular points and error bars. I would like the error bars to be behind the points otherwise they tend to obscure the points (especially when I have a lot of points in the actual data set).
2013 Mar 07
3
ggpliot2: reordering of factors in facets facet.grid(). Reordering of factor on x-axis no problem.
Hi everyone (again), before you all start screaming that the reordering of factors has been discusse on several threads and is not particular to ggplot2, hear me out. I can easily reorder my x-axis factor in facet.grid() in ggplot2. What I cannot reorder are the factors represented on the strips. I can see that the graphs are changing, so I am afraid of what it is I am doing. Why is ggplot2
2011 Nov 09
2
plot separate groups with plotmeans()
Hi, I often use plotmeans() from the gplots package to quickly visualize a pattern of change. I would like to be able to plot separate lines for different groups, but the function gives an error when a grouping variable is included in the formula argument. For instance, > require(gplots) > x <- data.frame(Score=rnorm(100), Time=rep(1:10, 10),
2013 May 14
1
Tamaño plots y calidad en grafico ggplot
Hola a tod en s, bueno, un poco al hilo de un mensaje anterior, reformulo la pregunta y pongo código completamente reproducible, a ver si hay más suerte. Estoy con un informe y hay que hacer algunos gráficos con datos diferentes con ggplot2, y hay que poner el mismo tamaño para todos ellos. El problema es que R cambia automáticamente el tamaño del área de trazado y el margen en función de
2009 Apr 23
1
ggplot2/aesthetic plotting advice
Consider the following situation: we have quantified algal concentrations for a variety of species using many samples at each of three years. It seems to make sense to generate a line plot (matplot-like), with each species plotted as a separate line, with the points connected to emphasize the temporal pattern. The problem: lots of overlapping error bars. The question: from both a
2009 Apr 27
1
plot estimates and their 95% confidence intervals
Hi, there: I have a dataset with 50 states and for each state, I have its associated mean estimate (for some parameters) and the lower and upper bound of the 95% CI. The data look like below: state ami_mean ami_low ami_up 1 MS -0.58630 -0.90720 -0.29580 2 KY -0.48100 -0.75990 -0.19470 3 FL -0.47900 -0.62930 -0.32130 I would like to have a plot the 95% CI (characterized by
2012 Sep 16
1
How to plot two lines, and only one line with errorbar by qqplots of R
Here is my code, which plots three lines with errorbar. How could I add an extra line without errorbar to the plot? Thank you very much. beta.data <- data.frame ( method = rep(c("Wrong", "Correct", "Full Bayes"), each = T_obs), mean.beta = c(mean.beta1, mean.beta2, mean.beta3), t = rep(points, 3), std.beta = c(std.beta1, std.beta2, std.beta3) ) limits =
2012 Mar 12
1
ggplot2: coord_polar
Hello HelpeRs, The last print statement in the code segment below results in : Error in data$x[data$x == -Inf] <- range$x.range[1] : replacement has length zero R version 2.14.1 Patched (2011-12-23 r57982) ggplot2: version 0.90 OS : Linux (64bit) Any thoughts? Many Thanks, A. ## code segment starts here df <- data.frame( trt = factor(c(1, 1, 2, 2)), resp = c(1, 5,
2013 Mar 31
1
lmer effects-type plot?
hello, all. while i have a mcmc running, i am looking at the frequestist method of my model. i have never done HLM so i am looking for ways to plot them that might yeild something useful like dr. fox's effects plot package. this is my model, where dem is democracy ranked continuous 1:10, trsut is a 3 level categorical variable, cpi is 1:10, etc... > hier.jags2.mod <- lmer(dem ~
2009 Jul 09
1
ggplot2: geom_errorbarh()
Hi all, quick question: is the optional command "width" effective in the geom_errorbarh() layer of ggplot? Cause I can't get it works on this graph http://www.4shared.com/file/116919103/93488d88/iso_2PrsH.html pdf(file = "iso_2PrsH.pdf", width = 7, height = 7) NC60.iso.graph<-ggplot( NC60.DATA ,aes(Ce,Qe)) + geom_point(col=MaCouleur1, size=4) +
2011 Mar 08
2
plotCI() with ggplot2
Hello Currently, I plot some coefficients with some intervals using function "plotCI()" (package "gplots") using the following code: (m1 <- matrix(0:5, nrow=2, byrow=T, dimnames=list(c("v1", "v2"), c("lo", "m", "hi")))) m2 <- m1 + 1 library(gplots) plotCI( x=1:length(m1[, 1]), pch="",
2013 Sep 26
1
Less than equal to symbol in ggplot2 legend text
Hello, I am trying to add a less than equal to symbol in a ggplot2 legend text. See sample code below. I have tried using the expression function and \u2264. I also tried adding labels to legend.text under theme. Neither of these 3 options work. Please help, Mahesh ++++++++++++++ Extra.column=ifelse(data[,covariate]>cutpoint,1,0) Grp1 <- "\u2264 1.5" Grp2 <-
2010 Dec 08
1
ggplot - line_range help, second tier axis label
Hi All, Will try and keep brief, excuse the poor graphics skills, first time using GIMP. I would like to make the first one look (somewhat) like the second if possible. From: http://d.imagehost.org/0519/Screen_shot_2010-12-08_at_3_50_23_PM.png To here: http://d.imagehost.org/0293/Screen_shot_2010-12-08_at_3_50_23_PM2.png I imagine the line going over the top with the p-values is probably not