Combining or joining multiple plots made with ggplot2 into a single plot is often very useful in telling a story with data. Now we have multiple options in R, including patchwork, gridExtra, and cowplot to join multiple plots made by ggplot2. In this post, we will see how to use R package cowplot made by… Continue reading How To Join Multiple ggplot2 Plots with cowplot?
Author: datavizpyr
How To Make Dumbbell Plot in R with ggplot2?
Dumbbell plots or connected dot plots are a great way to visualize change in something over time for multiple groups. Dumbbell plots are a great alternative to grouped barchart as dumbbell plot uses much less ink on the paper and is much simpler to understand. We can use ggplot2 extension packages to make a dumbbell… Continue reading How To Make Dumbbell Plot in R with ggplot2?
How To Make Lower Triangular Heatmap with Python?
Heatmaps are a great way to quickly visualize the actual data coded as colors. Heatmaps of correlation matrix is useful to understand the relationship between multiple features or variable. However, since the correlation matrix is symmetric, it is more useful to make heatmap of upper or lower triangular part of correlation matrix as having both… Continue reading How To Make Lower Triangular Heatmap with Python?
How To Color Scatterplot by a variable in Matplotlib?
Scatterplots between two numerical variables are great to see the relationship between them. Adding colors to the data points based on the third categorical variable is often useful in understanding the relationship among the three variables. In this post, we will learn how to color data points in a scatterplot by a third categorical variable… Continue reading How To Color Scatterplot by a variable in Matplotlib?
How To Get the Default Color Codes of ggplot2?
ggplot2 adds colors to its plot automatically. Sometimes you might want to get the list of colors (color codes) that ggplot2 uses. In this post, we will learn how to get the color codes that ggplot2 uses by default in a plot. We will use scales package in tidyverse to get the colors for different… Continue reading How To Get the Default Color Codes of ggplot2?