Category: Matplotlib

Custom projection Matplotlib 0

Custom projection Matplotlib

Custom projection Showcase Hammer projection by alleviating many features of matplotlib. from __future__ import unicode_literals import matplotlib from matplotlib.axes import Axes from matplotlib.patches import Circle from matplotlib.path import Path from matplotlib.ticker import NullLocator, Formatter,...

SkewT-logP diagram: using transforms and custom projections Matplotlib 0

SkewT-logP diagram: using transforms and custom projections Matplotlib

SkewT-logP diagram: using transforms and custom projections This serves as an intensive exercise of matplotlib’s transforms and custom projection API. This example produces a so-called SkewT-logP diagram, which is a common plot in meteorology...

Radar chart (aka spider or star chart) Matplotlib 0

Radar chart (aka spider or star chart) Matplotlib

Radar chart (aka spider or star chart) This example creates a radar chart, also known as a spider or star chart [1]. Though this particular instance enables the body associated with both ‘circle’ or...

Hatch-filled histograms Matplotlib 0

Hatch-filled histograms Matplotlib

Hatch-filled histograms Hatching capabilities for plotting histograms. import itertools from collections import OrderedDict from functools import partial import numpy as np import matplotlib.pyplot as plt import matplotlib.ticker as mticker from cycler import cycler from...

Custom scale Matplotlib 0

Custom scale Matplotlib

Custom scale Create a custom scale, by implementing the scaling use for latitude data in a Mercator Projection. from __future__ import unicode_literals import numpy as np from numpy import ma from matplotlib import scale...

Rankine power cycle Matplotlib 0

Rankine power cycle Matplotlib

Rankine power cycle Demonstrate the Sankey class with a practical example of a Rankine power cycle. import matplotlib.pyplot as pltfrom matplotlib.sankey import Sankeyfig = plt.figure(figsize=(8, 9))ax = fig.add_subplot(1, 1, 1, xticks=[], yticks=[],title="Rankine Power Cycle:...

Line, Poly and RegularPoly Collection with autoscaling Matplotlib 0

Line, Poly and RegularPoly Collection with autoscaling Matplotlib

Line, Poly and RegularPoly Collection with autoscaling For the first two subplots, we will use spirals. Their size will be set in plot units, not data units. Their positions will be set in data...

Matplotlib Logos Matplotlib 0

Matplotlib Logos Matplotlib

Matplotlib Logos Displays some matplotlib logos. Thanks to Tony Yu <[email protected]> for the logo design import numpy as np import matplotlib as mpl import matplotlib.pyplot as plt import matplotlib.cm as cm mpl.rcParams[‘xtick.labelsize’] = 10...

The Sankey class Matplotlib 0

The Sankey class Matplotlib

The Sankey class Demonstrate the Sankey class by producing three basic diagrams. import numpy as np import matplotlib.pyplot as plt from matplotlib.sankey import Sankey Example 1 – Mostly defaults This demonstrates how to create...