Caution

You're reading an old version of this documentation. If you want up-to-date information, please have a look at 0.10.2.

librosa.display.ChromaFJSFormatter

class librosa.display.ChromaFJSFormatter(*, intervals, unison='C', unicode=True, bins_per_octave=None)[source]

A formatter for chroma axes with functional just notation

Examples

>>> import matplotlib.pyplot as plt
>>> values = np.arange(12)
>>> fig, ax = plt.subplots()
>>> ax.plot(values)
>>> ax.yaxis.set_major_formatter(librosa.display.ChromaFJSFormatter(intervals="ji5", bins_per_octave=12))
>>> ax.set(ylabel='Pitch class')
../_images/librosa-display-ChromaFJSFormatter-1.png
__init__(*, intervals, unison='C', unicode=True, bins_per_octave=None)[source]

Methods

__init__(*, intervals[, unison, unicode, ...])

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. This is a helper method to perform such a replacement when it is enabled via :rc:`axes.unicode_minus`.

format_data(value)

Return the full string representation of the value with the position unspecified.

format_data_short(value)

Return a short string version of the tick value.

format_ticks(values)

Return the tick labels for all the ticks at once.

get_offset()

set_axis(axis)

set_locs(locs)

Set the locations of the ticks.

Attributes

axis

locs