10000 Merge remote-tracking branch 'matplotlib/v2.1.x' · matplotlib/matplotlib@ff31d67 · GitHub
[go: up one dir, main page]

Skip to content

Commit ff31d67

Browse files
committed
Merge remote-tracking branch 'matplotlib/v2.1.x'
2 parents 4389baf + 7b0c82a commit ff31d67

File tree

3 files changed

+20
-11
lines changed

3 files changed

+20
-11
lines changed

doc/users/whats_new.rst

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -111,13 +111,16 @@ negative values are simply used as labels, and the real radius is shifted by
111111
the configured minimum. This release also allows negative radii to be used for
112112
grids and ticks, which were previously silently ignored.
113113

114-
Radial ticks have been modified to be parallel to the circular grid
115-
line, and angular ticks have been modified to be parallel to the grid
116-
line. It may also be useful to rotate tick *labels* to match the
117-
boundary. Calling ``ax.tick_params(rotation='auto')`` will enable the
118-
new behavior: radial tick labels will be parallel to the circular grid
119-
line, and angular tick labels will be perpendicular to the grid line
120-
(i.e., parallel to the outer boundary).
114+
Radial ticks have been modified to be parallel to the circular grid line, and
115+
angular ticks have been modified to be parallel to the grid line. It may also
116+
be useful to rotate tick *labels* to match the boundary. Calling
117+
``ax.tick_params(rotation='auto')`` will enable the new behavior: radial tick
118+
labels will be parallel to the circular grid line, and angular tick labels will
119+
be perpendicular to the grid line (i.e., parallel to the outer boundary).
120+
Additionally, tick labels now obey the padding settings that previously only
121+
worked on Cartesian plots. Consequently, the ``frac`` argument to
122+
`.PolarAxes.set_thetagrids` is no longer applied. Tick padding can be modified
123+
with the ``pad`` argument to `.Axes.tick_params` or `.Axis.set_tick_params`.
121124

122125

123126
``Figure`` class now has ``subplots`` method

lib/matplotlib/projections/polar.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1173,6 +1173,11 @@ def set_thetagrids(self, angles, labels=None, frac=None, fmt=None,
11731173
11741174
ACCEPTS: sequence of floats
11751175
"""
1176+
if frac is not None:
1177+
cbook.warn_deprecated('2.1', name='frac', obj_type='parameter',
1178+
alternative='tick padding via '
1179+
'Axes.tick_params')
1180+
11761181
# Make sure we take into account unitized data
11771182
angles = self.convert_yunits(angles)
11781183
angles = np.asarray(angles, float)

lib/matplotlib/widgets.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -936,10 +936,11 @@ def on_submit(self, func):
936936

937937
def disconnect(self, cid):
938938
"""remove the observer with connection id *cid*"""
939-
try:
940-
del self.observers[cid]
941-
except KeyError:
942-
pass
939+
for reg in (self.change_observers, self.submit_observers):
940+
try:
941+
del reg[cid]
942+
except KeyError:
943+
pass
943944

944945

945946
class RadioButtons(AxesWidget):

0 commit comments

Comments
 (0)
0