ggplot(df, aes(x =x, y = y, alpha=alpha)) +
geom_point() +
scale_alpha(breaks=df$alpha, to = c(0.05, 0.50), legend=FALSE)
Best,
Ista
> --
> 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
>
--
Ista Zahn
Graduate student
University of Rochester
Department of Clinical and Social Psychology
http://yourpsyche.org
Thanks for a quick response! This actually does work for my intended
purpose, so thanks again.
Unfortunately it doesn't quite capture the scale_identity, does it.
Is there any way to implement that?
Cheers
david.
On Thu, Sep 30, 2010 at 6:07 PM, David Kahle <david...@gmail.com> wrote:
> Hi Ista -
>
> Thanks for a quick response! This actually does work for my intended
> purpose, so thanks again.
>
> Unfortunately it doesn't quite capture the scale_identity, does it. Is
> there any way to implement that?
Actually it turns out to be easy...
scale_alpha_identity <- function (name = NULL, limits = NULL, breaks =
NULL, labels = NULL, trans = NULL, to = c(0.1, 1), legend = TRUE, ...)
{
ScaleIdentity$new(name = name, breaks = breaks, labels = labels,
legend = legend, variable = "alpha", ...)
}
ggplot(df, aes(x =x, y = y, alpha=alpha)) +
geom_point() +
scale_alpha_identity()
-Ista
scale_alpha_identity <- function (name = NULL, breaks = NULL, labels =
NULL, formatter = NULL,
legend = TRUE, ...) ScaleIdentity$new(name = name, breaks =
breaks, labels = labels,
formatter = formatter, legend = legend, variable = "alpha", ...)
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/