In this post we will learn how to make a random jitter plots made with ggplot2 reproducible. We have multiple posts on the importance of showing the actual data points while making boxplots/violinplots. One of the ways to avoid overplotting, is to add random jitters on the x-axis … [Read more...] about How to make random jittered points reproducible
ggplot2
Direct Labeling on line plots with geomtextpath
Labeling a plot greatly help understand the gist of a plot easily. ggplot2 offers a number of ways to add text labels to a plot. Often directly adding the labels on a plot instead of having a legend is a better option. The R package, geomtextpath, a ggplot2 extension package … [Read more...] about Direct Labeling on line plots with geomtextpath
How to Remove Legend Title in ggplot2
In this tutorial we will learn how to remove legend title text in R using ggplot2. There are many ways to remove legend title in R, in this post we will use barplot with legend from fill color to show how to remove legend title. We will see 4 examples of removing legend using … [Read more...] about How to Remove Legend Title in ggplot2
Visualizing Stock Return of a Company Over Time with Barplots
In this tutorial, we will learn how to visualize a company’s stock return over time. A stock's return is defined as the capital gains/losses and income from dividend. We will use the adjusted stock price to compute the nominal return using the fantastic tidyquant R … [Read more...] about Visualizing Stock Return of a Company Over Time with Barplots
Adding and Troubleshooting Text Annotations on a plot with ggplot2
Adding text annotations to a plot can greatly help understanding a plot better. In this tutorial, we will learn couple of examples of adding text annotations to a scatter plot with three groups of samples. First we see couple of examples of what might typically go wrong while … [Read more...] about Adding and Troubleshooting Text Annotations on a plot with ggplot2