From the course: Python Data Visualization: Create Impactful Visuals, Animations, and Dashboards by Pearson

Unlock this course with a free trial

Join today to access over 25,200 courses taught by industry experts.

Demo

Demo

In this demo, we're going to see how we can use Style Sheets and even create our own. Style Sheets are a fairly simple concept. They're basically a text file that lives in your hard drive with a bunch of definitions in a key value format. As usual, we start by importing the basic modules we're going to be using and using watermark to display their versions. Of course, my matplotlib is 3.8.4. The list of all available style sheets is part of the plt.style.available list. Here I'm displaying all of the ones I have currently available on my system. The list on your system might be different, it depends a little bit on what packages you actually have installed. In particular, you see that there's stylesheets from 538, ggplot, tableau, etc. And if we want to create a fair comparison between the different styles, we define a simple function that essentially generates a plot that looks like this. This is a simply sine function from minus pi to pi with just a line. We also added a couple of…

Contents