Matplotlib: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
Line 16: Line 16:


==Difference between Plot and Scatter==
==Difference between Plot and Scatter==
=Visualization Style=
The visualization style can be set globally with:
<syntaxhighlight lang='py'>
import matplotlib.pyplot as plt
plt.style.use(<style-name>)
</syntaxhighlight>
where available style names can be obtained with:
<syntaxhighlight lang='py'>
import matplotlib.pyplot as plt
print(plt.style.available)
</syntaxhighlight>
<syntaxhighlight lang='text'>
Solarize_Light2
_classic_test_patch
_mpl-gallery
_mpl-gallery-nogrid
bmh
classic
dark_background
fast
fivethirtyeight
ggplot
grayscale
seaborn-v0_8
seaborn-v0_8-bright
seaborn-v0_8-colorblind
seaborn-v0_8-dark
seaborn-v0_8-dark-palette
seaborn-v0_8-darkgrid
seaborn-v0_8-deep
seaborn-v0_8-muted
seaborn-v0_8-notebook
seaborn-v0_8-paper
seaborn-v0_8-pastel
seaborn-v0_8-poster
seaborn-v0_8-talk
seaborn-v0_8-ticks
seaborn-v0_8-white
seaborn-v0_8-whitegrid
tableau-colorblind10
</syntaxhighlight>

Revision as of 21:51, 7 October 2023

External

Internal

Overview

Visualization Types

https://matplotlib.org/stable/plot_types/index.html

Plot

Plot

Scatter

Scatter

Difference between Plot and Scatter

Visualization Style

The visualization style can be set globally with:

import matplotlib.pyplot as plt 
plt.style.use(<style-name>)

where available style names can be obtained with:

import matplotlib.pyplot as plt 

print(plt.style.available)
Solarize_Light2
_classic_test_patch
_mpl-gallery
_mpl-gallery-nogrid
bmh
classic
dark_background
fast
fivethirtyeight
ggplot
grayscale
seaborn-v0_8
seaborn-v0_8-bright
seaborn-v0_8-colorblind
seaborn-v0_8-dark
seaborn-v0_8-dark-palette
seaborn-v0_8-darkgrid
seaborn-v0_8-deep
seaborn-v0_8-muted
seaborn-v0_8-notebook
seaborn-v0_8-paper
seaborn-v0_8-pastel
seaborn-v0_8-poster
seaborn-v0_8-talk
seaborn-v0_8-ticks
seaborn-v0_8-white
seaborn-v0_8-whitegrid
tableau-colorblind10