Displaying 20 results from an estimated 4000 matches similar to: "ggplot2: less than equal sign"
2009 Nov 04
1
Patterned shading in ggplot
Am trying to produce a graph which prints out well in black and white using
ggplot2. I have the following example set up nicely, but want to shade the
red bars in one pattern and the blue in another so they print out clearly.
I tried changing colours to 1 light, 1 dark, but then the overlapping colour
looks virtually identical to the darker one. I noted the option density in
barplot, but
2011 Jan 01
3
Plot symbols: How to plot (and save) a graphic symbols originating from a table
Dear all,
Please, I have a doubt regarding symbol plotting
with data originating from a table.
Please, see below:
I have a tab delimited file called table1.txt with 4 columns:
ypos animal var1 var2
5 cat gina <= lady gina \u2264 lady
7 dog bill >= tony bill \u2265 tony
9 fish dude <= bro dude \u2264 bro
#I then load in the data to R:
table1<-read.table("table1.txt",
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",
2011 Oct 21
2
stacked plot
Hi!
I am trying to use ggplot2 to create a stacked bar plot. Previously I
tried using barplot() but gave up because of problems with the
positioning of the legend and other appearance problems. I am now
trying to learn ggplot2 and use it for all the plots that I need to
create for my dissertation.
I am able to create normal bar plots using ggplot2, but I am stomped
with the stacked bar plots.
2004 Jul 02
2
Error:length of dimnames [2] not equal to array extent ?
Hi everyone,
I have the following problem:
I want to perform a LDA with the function lda().
My data object mat.data is a matrix with dimensions
> dim(mat.data)
[1] 1228 44
and my grouping vector grp has length 1228:
> length(grp)
[1] 1228
Every time I call lda(), the following error message occurs:
> lda(mat.data,grp)
Error in lda.default(x, grouping, ...) : length of dimnames [2]
2009 Jul 03
3
Variable names in lattice XY-plot
Hi,
how can I get a more descriptive text
instead of the variable names in my XY-lattice plot,
according to the table below?
Variable text
acet = "Acetylaspartate Thalamus"
chol = "Choline Thalamus"
acetp = "Acetylaspartate parieoc"
ino = "Inositole Thalamus"
I could not find a solution.
Please have a look at my syntax.
Thanks a lot,
2017 Oct 09
2
Incluir símbolo matemático en data frame
Muchas gracias Jesús,
Por lo que veo hay que hacer una columna diferente para los símbolos, tal
como sugiere Carlos. No hay forma de ubicarlos en el mismo string,
acompañando al número?
Manuel
El 9 de octubre de 2017, 8:52, Jesús Para Fernández <
j.para.fernandez en hotmail.com> escribió:
> Con
>
> print("\u2265")
>
>
> lo consigues.
>
> Aqui tienes
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
2011 Jul 24
1
barplot colors
Hi,
In barplot(height, col = ...), the col = vector recycles so that the
same colors are used for each bar. I would like to use different colors
in different bars (corresponding to another piece of information, here,
the region of the country being represented).
For example,
x = matrix(c(5,2,3,1),nrow=2)
barplot(x,col=1:4)
will draw two bars with two segments each, but each colored red and
2011 Aug 29
1
Legend / bar order - ggplot2
Hi all,
I am trying to do a barplot in ggplot2 and want to make sure that the legend order is consistent with the bar order, that is the legend order is orig and match; and the bars are ordered in the same way. It seems to me that I can only control one of them. Any idea?
library(ggplot2)
df <- data.frame(value = rnorm(20),
name = factor(rep(letters[1:10], 2), levels =
2010 Nov 23
1
specifying colours in a ggplot2 piechart
Someone was asking how to do a 16 category piechart in OpenOffice Calc and it appears that it can not be done (which we, probably, should be happy about) but I thought that I'd try it in ggplot2.
It works but I then thought I'd like to make the colours more distinctive but fro some reason I don't seem to be able to use manually assigned colours.
Can anyone suggest where I'm
2008 Jun 13
1
overlaid transparent histograms
Hello all--
I'm attempting to produce overlaid histograms with partially transparent
columns. Whether this display will end up being useful, I can't say.
But I do want to get it right.
I've already got one solution (shown below), but I tried some other
versions and had questions about my results. (Note: I'm using a quartz
device, so transparency shows up correctly. You might
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"))+
2015 Jun 16
4
Ayuda boxplot ggplot2
Hola a todos
Me gustaría saber si me pueden ayudar con lo siguiente.
Realicé un Boxplot usando ggplot2 para visualizar el comportamiento de dos
variables. Visualmente no se notan las diferencias porque la gráfica de la
derecha (parásitos en el abdomen) llega hasta 20 en el eje y. ¿Cómo puedo
hacer para que las dos gráficas muestren la misma escala en el eje Y, es
decir, que las dos lleguen a 60?
2010 Dec 17
1
ggplot missing fill colours in boxplot legend
Hello,
I am trying to create a series of boxplots with the following data, three
columns, "Day" (1 or 2), "Site" (1-4), and "VO2" (some values missing for
some Sites or Days)
> CorbulaMR3
Day Site VO2
1 1 1 88.92223
2 1 1 86.17873
3 1 1 61.08950
4 1 1 190.47922
5 1 1 98.65930
6 1 1 121.03549
7 1 1 67.88404
8
2017 Aug 18
1
help with stacked ggplot
Hi,
I am new to R and this is probably a very basic question but I can?t seem to figure out a solution. I am creating a stacked ggplot with the following data and code:
PercentageData.csv looks like this:
decision
treatment
percentage
labtreatment
defect
0
53.49
COMMON
defect
1
78.00
ASYMMETRIC
defect
2
96.67
PRIVATE
coop
0
46.51
COMMON
coop
1
22.00
ASYMMETRIC
coop
2
3.33
PRIVATE
%Load data:
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.
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),
2018 Nov 08
2
ggplot con muchos colores
Buenos días, estoy haciendo unos mapas con ggplot, con 29 categorías,
por lo que tengo que utilizar library(RColorBrewer) para disponer de
suficientes colores. El problema es que al hacerlo acorde a dos
variables distintas (color=var1 y color=var2), cuyas 29 categorías son
obviamente las mismas, les da distintos colores y no puedo comparar
los mapas.
Muchas gracias,
Manuel
2010 Jun 09
4
creating a new variable, conditional on the value of an existing variable, selected conditionally
Dear all,
I have a data frame f, with four variables:
f <- data.frame(A=c(0,0,1,1), B=c(0,1,0,1), C=c(1,1,0,1), D=c(3,1,2,3))
f
A B C D
1 0 0 1 3
2 0 1 1 1
3 1 0 0 2
4 1 1 1 3
I want to create a new variable (f$E), such that each of its elements is drawn from either f$A, f$B, or f$C, according to the value (for each row) of f$D (values of which range from 1 to 3).
In the first row, D is