Matplotlib Draw Rectangle: Add, Fill, Annotate & Highlight Regions (Step-by-Step)

Multiple rectangles on the same Matplotlib plot

Need to highlight regions, create annotations, or add geometric shapes to your plots? This guide shows exactly how to draw rectangles in Matplotlib using patches.Rectangle—from crisp outlines to transparent overlays, labels, multiple boxes, subplots, and more. Copy-paste the code and adapt it to your data. Rectangles are ideal for highlighting clusters, marking thresholds/time windows, or… Continue reading Matplotlib Draw Rectangle: Add, Fill, Annotate & Highlight Regions (Step-by-Step)

How To Join Multiple ggplot2 Plots with cowplot?

Combine plots with shared legend and title using cowplot in R

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?

How To Make Dumbbell Plot in R with ggplot2?

Dumbbell plot with ggplot2: Customizing Colors

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?

Lower Triangular Heatmap with color palette in 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?

Coloring Scatterplot with Variable using 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?

Exit mobile version