8000 Improve documentation, docstring and comments · matplotlib/matplotlib@8546ca4 · GitHub
[go: up one dir, main page]

Skip to content

Commit 8546ca4

Browse files
committed
Improve documentation, docstring and comments
1 parent 7c47128 commit 8546ca4

File tree

3 files changed

+10
-3
lines changed

3 files changed

+10
-3
lines changed
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
Selector widget state internals
22
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3-
*state_modifier_keys* have to be defined when creating the selector widget. The
4-
*state_modifier_keys* attribute is deprecated.
3+
*state_modifier_keys* now have to be defined when creating a selector widget.
4+
The *state_modifier_keys* attribute is deprecated.

lib/matplotlib/axes/_axes.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8096,7 +8096,10 @@ def violin(self, vpstats, positions=None, vert=True, widths=0.5,
80968096
triplot = mtri.triplot
80978097

80988098
def _get_aspect_ratio(self):
8099-
"""Convenience method to calculate aspect ratio of the axes."""
8099+
"""
8100+
Convenience method to calculate the aspect ratio of the axes in
8101+
the display coordinate system.
8102+
"""
81008103
figure_size = self.get_figure().get_size_inches()
81018104
ll, ur = self.get_position() * figure_size
81028105
width, height = ur - ll

lib/matplotlib/patches.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -738,6 +738,10 @@ def __init__(self, xy, width, height, angle=0.0,
738738
self.angle = float(angle)
739739
self.rotate_around_center = rotate_around_center
740740
# Required for RectangleSelector with axes aspect ratio != 1
741+
# The patch is defined in data coordinates and when changing the
742+
# selector with square modifier and not in data coordinates, we need
743+
# to correct for the aspect ratio difference between the data and
744+
# display coordinate systems.
741745
self._aspect_ratio_correction = 1.0
742746
self._convert_units() # Validate the inputs.
743747

0 commit comments

Comments
 (0)
0