it's hard to know without your data...
Hadley
> --
> You received this message because you are subscribed to the ggplot2 mailing list.
> Please provide a reproducible example: http://gist.github.com/270442
>
> To post: email ggp...@googlegroups.com
> To unsubscribe: email ggplot2+u...@googlegroups.com
> More options: http://groups.google.com/group/ggplot2
>
--
Assistant Professor / Dobelman Family Junior Chair
Department of Statistics / Rice University
http://had.co.nz/
Both scales work fine for me. Do you have the latest version of ggplot2?
Hadley
Nick S wrote:
> I updated all packages...ggplot2 was not on the list requiring an
> update. I'm running R v. 2.11.
R 2.11 is good. But the problem is almost surely caused by your
absolutely ancient version of ggplot2. If I recall, that must have been
one of the first releases of the package! Hadley I'm sure can help,
but there's a chance that maybe you didn't install the package from CRAN
even, so it's not finding the most up-to-date version.
What happens when you simply
> install.packages("ggplot2")
Nick S wrote:
> Perhaps my previous post was a bit unclear...I do have the latest
> version of ggplot2 (0.8.7) loaded from CRAN. When I updated all
> packages from the menu...ggplot2 wasn't listed as needing an
> update...which lead me to believe it was up-to date. I have since re-
> loaded ggplot2 as you suggested and am still having the same issue.
Ok, odd! And what about traceback() results after the error?
I see the same as Nick, the point is including alpha and only affects the
line (simplified code bellow). Can be a OS issue?
library(ggplot2)
df <- data.frame(x = c(1, 2), y = c(1, 2), f = c("a", "a"))
qplot(x = x, y = y, colour = f, data = df) +
geom_line() +
scale_colour_manual(values = alpha("red", 0.99))
qplot(x = x, y = y, colour = f, data = df) +
geom_line() +
scale_colour_manual(values = "red")
R version 2.11.1 (2010-05-31)
x86_64-pc-mingw32
locale:
[1] LC_COLLATE=Spanish_Spain.1252 LC_CTYPE=Spanish_Spain.1252
[3] LC_MONETARY=Spanish_Spain.1252 LC_NUMERIC=C
[5] LC_TIME=Spanish_Spain.1252
attached base packages:
[1] grid stats graphics grDevices utils datasets methods
[8] base
other attached packages:
[1] ggplot2_0.8.7 digest_0.4.2 reshape_0.8.3 plyr_0.1.9 proto_0.3-8
loaded via a namespace (and not attached):
[1] tools_2.11.1
-----Mensaje original-----
De: ggp...@googlegroups.com [mailto:ggp...@googlegroups.com] En nombre de
Nick S
Enviado el: jueves, 03 de junio de 2010 20:41
Para: ggplot2
Asunto: Re: scale_colour_manual issues
--
I realized that when you save the graph the legend looks correct ... the
line does not appear on screen within R ... no idea what can be the reason
for this
library(ggplot2)
df <- data.frame(x = c(1, 2), y = c(1, 2), f = c("a", "a"))
pdf("deleteme.pdf")
qplot(x = x, y = y, colour = f, data = df) +
geom_line() +
scale_colour_manual(values = alpha("red", 0.6))
dev.off()
-----Mensaje original-----
De: ggp...@googlegroups.com [mailto:ggp...@googlegroups.com] En nombre de
Nick S
Enviado el: jueves, 03 de junio de 2010 20:41
Para: ggplot2
Asunto: Re: scale_colour_manual issues
Perhaps my previous post was a bit unclear...I do have the latest
--
For bitmap devices it works if the resolution is increased.
library(ggplot2)
df <- data.frame(x = c(1, 2), y = c(1, 2), f = c("a", "a"))
png("deleteme.png", width = 7, height = 7, unit = "in", res = 600)
qplot(x = x, y = y, colour = f, data = df) +
geom_line() +
scale_colour_manual(values = alpha("red", 0.6))
dev.off()
Hope this helps,
fernando
-----Mensaje original-----
De: ggp...@googlegroups.com [mailto:ggp...@googlegroups.com] En nombre de
Nick S
Enviado el: jueves, 03 de junio de 2010 22:46
Para: ggplot2
Asunto: Re: scale_colour_manual issues
Correction...Fernando was correct in that the legend does display
--