Displaying 20 results from an estimated 5000 matches similar to: "GGPLOT Clipping Regions"
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
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("") +
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
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
2017 Jun 24
2
Orden de categorías en gráficos de barras (position = "stack")
??
Hola.
Estoy intentando ordenar el gráfico tal que las columnas se apilen en el
siguiente orden: debajo, los EPI; los SemiEPI en el medio y los NoEpi
arriba de todo.
Estos son mis datos:
> tabla.barras
Rangos Clase Asistentes
1 De 45d EPI 405
2 De 1a EPI 812
3 De 2a EPI 1639
4 De 3a EPI 2202
5 De 4a EPI 1994
6 De 5a EPI
2012 Jun 06
5
ggplot incorrect legend
How do I create a legend with ggplot?
I think should be getting the FuelTypeNum in the legend.
Plot:
http://r.789695.n4.nabble.com/file/n4632471/Rplot.jpeg
My code is:
ggplot(data=tempTable, aes(x=Bands8, y=SubPercent, fill=FuelTypeNum)) +
geom_bar(position="stack", stat="identity") +
scale_colour_hue('my legend', breaks = levels(tempTable$FuelTypeNum),
2017 Jun 25
3
Orden de categorías en gráficos de barras (position = "stack")
Hola,
Mira la versión de ggplot2 que estás usando por tenerla actualizada a la
última...
A mi me funciona introduciendo algún cambio salvo la última línea cuando
cambias el tema...
#-----------
Lines <- " id Rangos Clase Asistentes
1 45d EPI 405
2 1a EPI 812
3 2a EPI 1639
4 3a EPI 2202
5 4a EPI 1994
6 5a EPI
2009 Oct 17
2
Putting names on a ggplot
Putting names on a ggplot
Can anyone suggest what I am doing wrong here. I am plotting
daily temperatures at Ottawa Ontario for 2008 broken down by
months, I seperate them by lines and want to put the names of the months
at the top of the chart ( with in the graphing area)
Everything is working as I want until I try to add the names of the months.
I did something similar a few days ago and I
2009 Jan 24
2
ggplot2 - how to change location / position of wind rose axis labels?
Dear R users,
First just want to say thank you to all for developing such a wonderful
software and packages.
I need to produce a wind rose plot. Tried with packages circular and plotrix
and couldn't quite get what I want. Moved to package ggplot2 and it's going
great. However stuck in how to move axis labels.
I am using the wind rose from the help to learn how to do what I need (code
2011 Oct 18
3
Ordering of stack in ggplot (package ggplot2)
I'm trying to reproduce the 3rd graph on the page of this site:
http://learnr.wordpress.com/2009/03/17/ggplot2-barplots/ . However, the data
below produces a ggplot with the stacks sorted in alphabetical order from
the bottom up. I'd like the stacks to be in the order "Europe", "Asia",
"Americas, "Africa", "Oceania". Is there an easy way to
2017 Jun 27
4
ggplot2 geom_bar arrangement
Hi,
I was trying to draw a geom_bar plot. However, by default, the bars are
arranged according to the label, which I don't want. I want the bars to
appear exactly as they appear in the data frame. For example in the code:
Lab=c(letters[4:6],letters[1:3])
valuex = c(3.1,2.3,0.4,-0.4,-1.2,-4.4)
df <- data.frame(Lab,valuex)
px <- ggplot(df,aes(Lab,valuex,label=Lab)) +
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",
2009 May 14
1
text() to label points in ggplot
is there a way to label points in a graph using text(locator(1),"text")
after ggplot() or qplot() ?
> qplot(date, psavert, data = economics, geom = "line",main="jhdjd")->p
> p+opts(text(locator(1),"HHHH"),new=T)
does not work.
--
View this message in context: http://www.nabble.com/text%28%29-to-label-points-in-ggplot-tp23545135p23545135.html
Sent
2010 Apr 19
2
plotting RR, 95% CI as table and figure in same plot
Hi all--
I am in the process of helping colleagues write up a ms in which we fit
zero-inflated Poisson models. I would prefer plotting the rate ratios
and 95% CI (as I've found Gelman and others convincing about plotting
tables...), but our journals usually like the numbers themselves.
Thus, I'm looking at a recent JAMA article in which both numbers and
dotplot of RR and 95% CI are
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
2012 Dec 21
2
ggplot2: setting martin
Is it possible to set the margin in ggplot2 to a fixed size? I create many
plots, and I want them to look the same.
Especially I want them to have the same left margin.
But
P<-ggplot()+geom_bar(aes(c("short label1","short
label2"),runif(2)))+coord_flip()
P<-creates a plot with another margin as
ggplot()+geom_bar(aes(c("very very very very long
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
2011 Nov 10
2
ggplot2 - regression statistics how to display on plot
Hello -
So I am trying to use ggplot2 to show a linear regression between two variables, but I want to also show the fit of the line on the graph as well.
I am using ggplot2 for other graphics in what I am working on, so even though this would be a fairly easy thing to do in Excel, I would prefer to do it in R to keep my look and feel, and I think ggplot2 is just cooler.
Here is a sample
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),
2012 Feb 06
1
ggplot2 geom_polygon fill
Hi everyone,
i've been trying to make a special plot with ggplot2, but I can't get it to
fill the polygon I'd like to see filled so very very much.
I want to display the difference or change in the distribution of the
modified Rankin Scale between two groups. mRS is a scale for disability or
daily activities competence.
It looks like this.