How To Make Density Plot in Python with Altair?

Change Color in density plot Altair

Density plots are like histogram, but displays density instead of counts. In this post, we will see a simple example of making a density plot in Python using Altair. Let us load Pandas and Altair to make density plot. We will use the tuition dataset from TidyTuesday project. Within tuition dataset we will look at… Continue reading How To Make Density Plot in Python with Altair?

How to Make Countplot or barplot with Seaborn Catplot?

Grouped barplot with Seaborn Catplot

Sometimes you might want to make countplot or barplots in Python, but the data may not in the right format. For example, you might want to make countplot/barplot of the number of things corresponding to multiple categorical variables. However, the data may in the form such that you have compute the counts per category. Seaborn’s… Continue reading How to Make Countplot or barplot with Seaborn Catplot?

How To Highlight a Time Range in Time Series Plot in Python with Matplotlib?

Highlight a Time Range Over Time Series Plot in Python with Matplotlb

Time Series Plots are line plots with x-axis being date time instead of regular quantitative or ordered categorical variable. Sometimes you might want to highlight a region on a time series plot. In this post, we will learn how to highlight a time interval with a rectangular colored block in Python using Matplotlib. Let us… Continue reading How To Highlight a Time Range in Time Series Plot in Python with Matplotlib?

How to Make Overlapping Histograms in Python with Altair?

Overlapping Histogram From Wide Data

In this post, we will learn how to make multiple overlapping histograms in Python using Altair. Using Altair, we can make overlapping histograms or layers histograms from data that is in wide form and long tidy form. We will see an example of making overlapping histograms from data in tidy form first and then from… Continue reading How to Make Overlapping Histograms in Python with Altair?

How To Order Bars in Barplot using Seaborn in Python?

Sort bars in barplot descending order with Seaborn Python

Barplots are great to visualize a quantitative value corresponding to categorical variables. Often it is more meaningful to make barplot sorted by the quantitative value corresponding to the bars. In this post, we will see examples of making barplot using Seaborn and sorting the bars of barplot. Let us load the packages needed to make… Continue reading How To Order Bars in Barplot using Seaborn in Python?

Exit mobile version