librosa.display.ChromaFormatter

class librosa.display.ChromaFormatter[source]

A formatter for chroma axes

Examples

>>> import matplotlib.pyplot as plt
>>> values = np.arange(12)
>>> plt.figure()
>>> ax = plt.gca()
>>> ax.plot(values)
>>> ax.yaxis.set_major_formatter(librosa.display.ChromaFormatter())
>>> ax.set_ylabel('Pitch class')

(Source code)

../_images/librosa-display-ChromaFormatter-1.png
__init__($self, /, *args, **kwargs)

Initialize self. See help(type(self)) for accurate signature.

Methods

create_dummy_axis(**kwargs)
fix_minus(s) Some classes may want to replace a hyphen for minus with the proper unicode symbol (U+2212) for typographical correctness.
format_data(value) Returns the full string representation of the value with the position unspecified.
format_data_short(value) Return a short string version of the tick value.
get_offset()
set_axis(axis)
set_bounds(vmin, vmax)
set_data_interval(vmin, vmax)
set_locs(locs)
set_view_interval(vmin, vmax)

Attributes

axis
locs