Scatterplots are great for visualizing relationship between two quantitative variables. However, it suffers from overplotting when the number of data points is large. Another solution is plot the density instead of actjual points. However, sometimes you might want to see the datapoints. ggpointdensity is a ggplot2 extension that solves the problem by combining scatterplot with… Continue reading ggpointdensity plot: A ggplot extension combining scatter plot with density plot
Tag: ggplot2
How To Add Mean Line to Ridgeline Plot in R with ggridges?
In this post, we will learn how to add mean line to ridgeline plot. We can make ridgeline plot in R with ggridges R package developed Claus Wilke. Ridgeline plot is useful when you have multiple distributions or a distribution that changes in distributions over time or space. The name “ridgeline” comes from the way… Continue reading How To Add Mean Line to Ridgeline Plot in R with ggridges?
How to Add Labels Over Each Bar in Barplot in R?
Adding text annotations over a barplot can be useful in quickly conveying the core message of a plot. In this post, we will see example of how to add text labels or text annotations over each bar in barplot. Barplot is great way to visualize numerical values corresponding to categorical variables. The height of the… Continue reading How to Add Labels Over Each Bar in Barplot in R?
How To Make World Map with ggplot2 in R?
In this post, we will learn how to make world map using ggplot2 in R. We will use geom_map() function to make map with ggplot2. And then we will see an example of overlaying data on the world map. To overlay, we will use volcano eruption data from TidyTuesday project to overlay the locations of… Continue reading How To Make World Map with ggplot2 in R?
How To Make Simple Animation in R?
In this post, we will learn to make simple animation in R using gganimate package. gganimate R package is a powerful package to make animation using R. gganimate extends the grammar of graphics as implemented by ggplot2 to include the description of animation. It does this by providing a range of new grammar classes that… Continue reading How To Make Simple Animation in R?