Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>You can use hollow and solid points, <a href="https://stackoverflow.com/questions/15965870/fill-and-border-colour-in-geom-point-scale-colour-manual-in-ggplot">but only with certain shapes as described in this answer</a>.</p> <p>So, that leaves you with <code>fill</code>, <code>colour</code>, <code>shape</code>, and <code>alpha</code> as your aesthetic mappings. It looks ugly, but here it is:</p> <pre><code>ggplot(test, aes(x, y, fill=modeltype, shape=siteloc, colour=mth, alpha=factor(yr) )) + geom_point(size = 4) + scale_shape_manual(values=21:25) + scale_alpha_manual(values=c(0.35,1)) </code></pre> <p>Ugly, but I guess it is what you asked for. (I haven't bothered to figure out what is happening with the legend -- it obviously isn't displaying the borders right.)</p> <p><img src="https://i.stack.imgur.com/YiIzE.png" alt="Ugly"></p> <p>If you want to map a variable to a kind of custom aesthetic (hollow and solid), you'll have to go a little further:</p> <pre><code>test$fill.type&lt;-ifelse(test$yr==2010,'other',as.character(test$mth)) cols&lt;-c('red','green','blue') ggplot(test, aes(x, y, shape=modeltype, alpha=siteloc, colour=mth, fill=fill.type )) + geom_point(size = 10) + scale_shape_manual(values=21:25) + scale_alpha_manual(values=c(1,0.5)) + scale_colour_manual(values=cols) + scale_fill_manual(values=c(cols,NA)) </code></pre> <p><img src="https://i.stack.imgur.com/c83Y9.png" alt="Still ugly"></p> <p>Still ugly, but it works. I don't know a cleaner way of mapping both the <code>yr</code> to one colour if it is 2010 and the <code>mth</code> if not; I'd be happy if someone showed me a cleaner way to do that. And now the guides (legend) is totally wrong, but you can fix that manually.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload