similar to: ggplot2 barplot: extra markers in graph

Displaying 20 results from an estimated 4000 matches similar to: "ggplot2 barplot: extra markers in graph"

2007 Oct 14
1
ggplot2: ordering categorial data
Hello again, everytime I think I got something to work, the next issue comes up... I have the following data.frame, I want to visualize: > data_rb tld spam1 spam2 share 1 ca 826436 73452 0.0889 2 org 470550 25740 0.0547 3 de 156042 15531 0.0995 4 com 140753 7527 0.0535 5 edu 34845 2507 0.0719 6 net 12781 382 0.0299 7 ru 7648 18 0.0024
2018 Jan 15
5
barplot that displays sums of values of 2 y colums grouped by different variables
I am trying to create a barplot displaying the sums of 2 columns of data grouped by a variable. the data is set up like this: "city" "n" "y" <br> mon 100 200 <br> tor 209 300 <br> edm 98 87 <br> mon 20 76 <br> tor 50 96 <br> edm 62 27 <br> the resulting plot should have city as the x-axis, 2 bars per city, 1 representing
2018 Jan 15
0
barplot that displays sums of values of 2 y colums grouped by different variables
It is not generally advisable to get too fancy with stat functions in ggplot... things can easily get more complicated than ggplot is ready to handle when it comes to calculations. It is better to create data that corresponds directly to the graphical representations you are mapping them to. Read [1] for more on this philosophy. [1] H. Wickham, Tidy Data, Journal of Statistical Software,
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 =
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
2012 Feb 19
2
barplot with more than 1 variable
Dear R listers, I am trying to produce a simple (for a stata user) barplot with 4 countries on the x axis, each country observed in 2 subsequent years and 3 variables. Basically, I should have three bars for each year for each country. I am attaching the chart I made in Stata, but I am not sure you'll manage to see it! I did the following: #here I create the data-set TUSE2. The vectors mw, st
2010 Apr 07
1
ggplot2, density barplot and geom_point layer
Hi, Please consider the example below. How can I manage to overlay the points the way I want in the second case? Thanks, Joh library(ggplot2) # Modify data to match "real" case myDiamonds <- diamonds myDiamonds[["clarity"]] <- as.character(myDiamonds[["clarity"]]) myDiamonds[myDiamonds[["clarity"]]=="I1","clarity"] <- 1
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,
2010 Sep 20
1
ggplot2 - bar colour
Hi All, I have trying to do what I thought was a reasonably simple graph but I think I'm now going in circles with the colour. Attached is a picture of where I'm up to. The line creating this is: qplot(ageincgraph$age, ageincgraph$rate, position="dodge", stat="identity", geom="bar" ) + aes( colour=ageincgraph$era) +
2010 Sep 01
2
ggplot2 multiple group barchart
hi there.. i got a problem with ggplot2. here my example: library (ggplot2) v1 <- c(1,2,3,3,4) v2 <- c(4,3,1,1,9) v3 <- c(3,5,7,2,9) gender <- c("m","f","m","f","f") d.data <- data.frame (v1, v2, v3, gender) d.data x <- names (d.data[1:3]) y <- mean (d.data[1:3]) pl <- ggplot (data=d.data, aes (x=x,y=y)) pl
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
2020 Sep 27
2
GRÁFICO DE BARRAS COMPARATIVO VARIOS AÑOS
Buenas noches, Tengo que preparar un gráfico de barras comparativo para varios años, en el que tenga agrupadas, 3 barras para enero, 3 barras para febrero, 3 barras para marzo y así sucesivamente para todos los meses, estando en cada mes, los años 2020, 2019 y 2018 (juntas), un pequeño espacio y luego las de febrero y así sucesivamente... Con el siguiente código, hago un año:
2013 Oct 30
1
ggplot2 - how to get rid of bar boarder lines
Hello! I am using ggplot2: ggplot(myplotdata, aes(x=att_levels, y=WTP)) + geom_bar(stat="identity",fill="dark orange",colour="black", alpha = 1,position = "identity") + geom_text(aes(label=WTP),colour="black",size=4,hjust=1.1,position='dodge') + coord_flip() + xlab("") +
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 <-
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 <-
2008 Feb 06
1
Histogram/Bar plot graph
Hi, I have the following data: > Myvalues Gene ES MEF Embryo ESHyp 1 GeneA -0.38509507 0.00 1.6250 1.7039921 2 GeneB 0.06262914 0.00 1.6250 -0.272033 and so on... I want to plot the expression values of GeneA and GeneB in the different cell/embryo/conditions (columns 2:5 above). Now, if I do: >library(ggplot2) > qplot(x=Gene, Embryo, geom =
2010 Nov 23
2
Help with grouped barplot
Given the data structure below, how can I create a bar plot for the values of disc for each area grouped by year? bar <-structure(list(year = c(2003, 2003, 2003, 2003, 2003, 2003, 2003, 2007, 2007, 2007, 2007, 2007, 2007, 2007), area = structure(c(6L, 4L, 1L, 2L, 3L, 5L, 7L, 6L, 4L, 1L, 2L, 3L, 5L, 7L), .Label = c("AK", "ID", "MT", "NW",
2010 Jun 30
2
ggplot qplot bar removing bars when truncating scale
I'm having problems with this example, it is posted with reproduceable code below, both with the normal 0-6 scale and the desired 3-6 scale (with bars removed). How can I get the graph to have the desired 3-6 scale without removing the bars. Thanks! #Data
2009 Feb 02
1
Specifying the gap between "dodge'd" bins groups?
I'm looking at ggplot-static\position_dodge.html   For ggplot(diamonds, aes(x=price, fill=cut)) + geom_bar(position="dodge") , is it possible to specify the spacing between the dodge'd bin groupings?    That is, I would like for there to be a small separation (horizontal space) between the "Ideal" and the "Fair" bars on the plot.  That way the reader can get
2013 Oct 30
1
ggplot2 question: keeping the order as in the input data
Hello! I am using ggplot2 (see the code below) to plot the data in 'myplotdata'. The first column of 'myplotdata' is called "att.levels" and contains strings; the second column is called "WTP" and contains numeric values. Notice - I use 'coord.flip()' The command aes(x=att_levels, y=WTP), if I understand correctly, sorts things alphabetically based on