diff --git a/lib/matplotlib/backend_bases.py b/lib/matplotlib/backend_bases.py index d0ff3fec9c4d..6520b1d83ee3 100644 --- a/lib/matplotlib/backend_bases.py +++ b/lib/matplotlib/backend_bases.py @@ -636,9 +636,10 @@ def _draw_text_as_path(self, gc, x, y, s, prop, angle, ismath): def get_text_width_height_descent(self, s, prop, ismath): """ - Get the width, height, and descent (offset from the bottom - to the baseline), in display coords, of the string *s* with - `.FontProperties` *prop*. + Get the width, height, and descent (offset from the bottom to the baseline), in + display coords, of the string *s* with `.FontProperties` *prop*. + + Whitespace at the start and the end of *s* is included in the reported width. """ fontsize = prop.get_size_in_points()