How To Add Dollar Sign on Axis Ticks in Matplotlib

Barplot with dollar sign on axis ticks

In this tutorial, we will see examples of how to add dollar sign on axis ticks while making plots with Matplotlib in Python. While making plots to understand the relationship between currency like US dollars and other variables, it is better to show the Dollar symbol/sign on the axis ticks instead of numbers. Let us… Continue reading How To Add Dollar Sign on Axis Ticks in Matplotlib

How To Connect Paired Data Points with Lines in Scatter Plot with Matplotlib

Connect Paired Points with Lines in Matplotlib

In this tutorial, we will learn how to connect paired data points with lines in a scatter plot using Matplotlib in python. Adding lines to paired data points can be extremely helpful in understanding the relationship between two variables with respect to a third variable. Mainly we use Matplotlib’s plot() function and scatter() function to… Continue reading How To Connect Paired Data Points with Lines in Scatter Plot with Matplotlib

How to Add Legend to Scatterplot Colored by a Variable with Matplotlib in Python

Matplotlib Scatter plot with legend

Matplotlib, one of the powerful Python graphics library, has many way to add colors to a scatter plot and specify legend. Earlier we saw a tutorial, how to add colors to data points in a scatter plot made with Matplotlib‘s scatter() function. In this tutorial, we will learn how to add right legend to a… Continue reading How to Add Legend to Scatterplot Colored by a Variable with Matplotlib in Python

How to Combine Two Seaborn plots with Shared y-axis

Combine Two plots into one in Seaborn

In this tutorial, we will see how to join or combine two plots with shared y-axis. As an example, we will make a scatterplot and join with with marginal density plot of the y-axis variable matching the variable colors. Thanks to Seaborn’s creator Michael Waskom’s wonderful tip on how to do this. Let us get… Continue reading How to Combine Two Seaborn plots with Shared y-axis

How To Draw a Rectangle on a Plot in Matplotlib?

Add Rectangle with text annotation Matplotlib

When you make data visualization one might want to highlight a specific region of the plot by adding some annotation. In this post, we will learn how to add rectangle on top of a plot made with matplotlib in Python. We will first add a simple rectangle with specific color and then learn how to… Continue reading How To Draw a Rectangle on a Plot in Matplotlib?

Exit mobile version