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

displaying `shape` values in `ggplot2` plot annotations

$
0
0

I want to display the shape value (shape argument for geom_point function) in the plot annotation.

Below, for example, I am just writing 'point shape' where I actually want the shape itself to be displayed. (This is a minimal example of something more complicated I want to do.)

Is there any way to do this?

library(ggplot2)

ggplot(mtcars, aes(mpg , wt)) + geom_point(shape = 7) +
  labs(title = "'point shape' represents data point")

Created on 2020-01-30 by the reprex package (v0.3.0.9001)


Viewing all articles
Browse latest Browse all 201894

Trending Articles



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