Hi
{Firstly many thanks Hadley for providing us with such an inspiring graphics tool!}
I wish to plot data points from colorimetric measurements made in CIELAB colour space on an a* b* scatterplot with point colour mapped to L*a*b* colour.
I have been able to achieve this using colorspace and lattice libraries but have as yet been unable to do this in ggplot2 with scale_identity
What originally inspired me was Hadleys figure 6.11 in “Elegant graphics..” showing the idea in Luv space.
Does anyone have code examples for this kind of thing (or for this figure) or of scale_identity usage they could share?
Regards
John McCallum
The contents of this e-mail are confidential and may be subject to legal privilege. If you are not the intended recipient you must not use, disseminate, distribute or reproduce all or any part of this e-mail or attachments. If you have received this e-mail in error, please notify the sender and delete all material pertaining to this e-mail. Any opinion or views expressed in this e-mail are those of the individual sender and may not represent those of The New Zealand Institute for Plant and Food Research Limited. |
--
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
--
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
So here are two attempts to replicate figure 6.11 and neither gives anything close to that image:myColors <- data.frame("L"=runif(10000, 0,100),"a"=runif(10000, -100, 100),"b"=runif(10000, -100, 100))myColors <- within(myColors, LAB <- hex(LAB(L, a, b)))myColors <- within(myColors, Luv <- hex(LUV(L, a, b)))myColors <- na.omit(myColors)g <- ggplot(myColors, aes(a, b, color=Luv), size=2)g + geom_point() + ggtitle ("mycolors")other <- data.frame("L"=runif(10000),"a"=runif(10000),"b"=runif(10000))other <- within(other, Luv <- hex(LUV(L, a, b)))other <- na.omit(other)g <- ggplot(other, aes(a, b, color=Luv), size=2)g + geom_point() + ggtitle("other")The first has some diagonal clustering of the dots, the second is pure random dots.
--
--
You received this message because you are subscribed to the ggplot2 mailing list.
Please provide a reproducible example: https://github.com/hadley/devtools/wiki/Reproducibility
To post: email ggp...@googlegroups.com
To unsubscribe: email ggplot2+u...@googlegroups.com
More options: http://groups.google.com/group/ggplot2
---
You received this message because you are subscribed to the Google Groups "ggplot2" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ggplot2+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.