How to Annotate on a Graph with R GGplot2
| |

How to Annotate on a Graph with R GGplot2

Functions such as annotate() and geom_text() can be used to annotate a graph in GGPLOT2. This article focuses on the annotate() function which uses data passed in as vectors. The geom_text() function, which uses data frames, is covered in another article. The following example is based on the iris dataset which is available in R….

How to Fix the Error: Mapping Must be Created by aes() in GGPLOT2

How to Fix the Error: Mapping Must be Created by aes() in GGPLOT2

“Error: mapping must be created by aes()” is an error you would eventually run into if you frequently use GGPLOT2 to create graphs in R. The last time I ran into this error was when I was creating profile plots using geom_line(). I succeeded to recreate the error using the R codes below. Visit this…