You are reading an old version of the documentation (v3.0.0). For the latest version see
Version 3.0.0
Fork me on GitHub


class mpl_toolkits.axisartist.axis_artist.LabelBase(*kl, **kwargs)[source]

Bases: matplotlib.text.Text

A base class for AxisLabel and TickLabels. The position and angle of the text are calculated by to offset_ref_angle, text_ref_angle, and offset_radius attributes.


Draws the Text object to the given renderer.


Return a Bbox object bounding the text, in display units.

In addition to being used internally, this is useful for specifying clickable regions in a png file on a web page.

renderer defaults to the _renderer attribute of the text object. This is not assigned until the first execution of draw(), so you must use this kwarg if you want to call get_window_extent prior to the first draw. For getting web page regions, it is simpler to call the method after saving the figure.

dpi defaults to self.figure.dpi; the renderer dpi is irrelevant. For the web application, if figure.dpi is not the value used when saving the figure, then the value that was used must be specified as the dpi argument.