Quantcast
Channel: Active questions tagged r - Stack Overflow
Viewing all articles
Browse latest Browse all 206473

Does stroke aesthetic work with shapes 0 - 14?

$
0
0

Started learning R recently using a GitHub open book. In question 5 under Exercise 3.3.1 of the open book, the question asked: "What does the stroke aesthetic do? What shapes does it work with? (Hint: use ?geom_point)"

I understand that the stroke aesthetic works with shapes 21-24 since they have borders but I'm wondering why do the unofficial answer not mention it works with shapes 0-14 when you can change the colour of those borders too? There's no official answer & many have deemed this book accurate in answering the original open book's exercises, hence the term "unofficial answer". It is also not mentioned in cran.r-project.org too, under Shape's "Colour and fill" (nearing the end of the page).

Loaded tidyverse and the code I used for shape 5

ggplot(data = mpg)+
 geom_point(mapping = aes(x = displ, y = hwy), shape = 5, colour = "green", stroke = 3)

& the code I used for shape 23

ggplot(data = mpg)+
 geom_point(mapping = aes(x = displ, y = hwy), shape = 23, colour = "green", stroke = 3)

both gave the same plot with no errors in RStudio. However, despite the same results, I am worried there may be future repercussions from this "mistake" that I am unaware of; hence the question. Thanks in advance!


Viewing all articles
Browse latest Browse all 206473

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>