Hi:
Thankfully, this thread was resurrected so I'll give it a shot. This
should get you close to what you want. Using a simple toy example,
DF <- data.frame(x = rnorm(30), y = rnorm(30),
gp = sample(LETTERS[1:4], 30, replace = TRUE))
library(ggplot2)
library(grid)
p <- ggplot(DF, aes(x, y)) +
geom_point(aes(shape = gp, fill = gp), size = 3.5,
color = "black") +
scale_shape_manual(values = 21:25)
grid.edit("geom_point.points", grep = TRUE, gp = gpar(lwd = 2))
Notes:
1. Shapes 21-25 allow fill color, which explains the choice in
scale_shape_manual().
2. To thicken the line borders, you need to use grid graphics
directly. This is what the last line does, which comes from a
StackOverflow question answered by Sandy Muspratt in August, 2013:
http://stackoverflow.com/questions/17677687/change-thickness-of-a-marker-in-ggplot2
3. You need to fix the point color before you can thicken the shape
borders; clearly, you want the border color to differ from the fill
color unless you want to play with alpha transparency, which is
another option..
4. I know the next question is going to be how to make the border
thickness in the legend the same as that in the graph. I tried without
success. It probably involves some combination of guide_legend() with
the override.aes argument and some appropriate incantation from grid
graphics, but I don't know enough about the latter yet to make it
work. Perhaps someone else can fill the gap.
Dennis
> --
> --
> 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/d/optout.