...
/Using Color Bars to Improve Data Readability
Using Color Bars to Improve Data Readability
In this lesson, we will learn how to use a color bar to improve the readability of our data.
We'll cover the following...
What is the colorbar
?
While legend
helps us identify the different elements of a chart, the feature only works for discrete data. If the data is continuous, how could we display it on the legend
? colorbar
can help us. The colorbar
maps the values of an interval to the colors of a range. The user can then distinguish the approximate range of the data by color. colorbar
is a very useful and beautiful feature.
The simplest way to draw a color bar is by calling colorbar()
.
Notice: In this lesson, the
colorbar()
is called from the figure object. Let’s see some of the parameters required bycolorbar
.
mappable
: Thematplotlib.cm.ScalarMappable
described by the colorbar.cax
: The axes object onto which the color bar will be drawn.
What is matplotlib.cm.ScalarMappable
...