Discussion:
geom point scale_colour_gradient2
Alina Vodonos Zilberg
2018-03-06 17:07:39 UTC
Permalink
Hi!

I am trying to change the color of the geom_point in my plot for the
variable -concentration

summary(dat$concentration) Min. 1st Qu. Median Mean 3rd Qu. Max.
0.5502 5.2628 12.2493 21.4695 27.4057 205.3170


mp <- NULL
mapWorld <- borders("world", colour="black", fill="white") # create a layer
of borders
mp <- ggplot() + mapWorld
mp

m1<-mp+ geom_point(data=dat, aes(x=lon,
y=lat,color=concentration),alpha=0.6, size=2.5)+
scale_colour_gradient2("concentration levels", low = "seashell1", mid =
"lightsalmon3",
high = "tomato4", midpoint = 21, space = "Lab",
na.value = "grey50", guide = "colourbar")
m1


I want it to look something like that


Any ideas?

thank you!
--
--
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 ***@googlegroups.com
To unsubscribe: email ggplot2+***@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+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Brandon Hurr
2018-03-06 22:39:17 UTC
Permalink
Alina,

Do you have some sample data that we could use to make a similar graph? I
don't do a lot of mapping so it's really hard for me to make up an example
here.

If you could make a reproducible example as described in the bottom of this
email it would help us help you.

Thanks,
B

On Tue, Mar 6, 2018 at 9:07 AM, Alina Vodonos Zilberg <
Post by Alina Vodonos Zilberg
Hi!
I am trying to change the color of the geom_point in my plot for the
variable -concentration
summary(dat$concentration) Min. 1st Qu. Median Mean 3rd Qu. Max.
0.5502 5.2628 12.2493 21.4695 27.4057 205.3170
mp <- NULL
mapWorld <- borders("world", colour="black", fill="white") # create a
layer of borders
mp <- ggplot() + mapWorld
mp
m1<-mp+ geom_point(data=dat, aes(x=lon, y=lat,color=concentration),alpha=0.6,
size=2.5)+
scale_colour_gradient2("concentration levels", low = "seashell1", mid =
"lightsalmon3",
high = "tomato4", midpoint = 21, space = "Lab",
na.value = "grey50", guide = "colourbar")
m1
I want it to look something like that
Any ideas?
thank you!
--
--
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
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
For more options, visit https://groups.google.com/d/optout.
--
--
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 ***@googlegroups.com
To unsubscribe: email ggplot2+***@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+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Loading...