Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 15b71b3

Browse filesBrowse files
authored
Merge pull request #18466 from anntzer/histautoscale
Remove unnecessary autoscale handling in hist().
2 parents 687fd12 + ddaf96d commit 15b71b3
Copy full SHA for 15b71b3

File tree

Expand file treeCollapse file tree

1 file changed

+0
-12
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+0
-12
lines changed

‎lib/matplotlib/axes/_axes.py

Copy file name to clipboardExpand all lines: lib/matplotlib/axes/_axes.py
-12Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6613,14 +6613,6 @@ def hist(self, x, bins=None, range=None, density=False, weights=None,
66136613

66146614
patches = []
66156615

6616-
# Save autoscale state for later restoration; turn autoscaling
6617-
# off so we can do it all a single time at the end, instead
6618-
# of having it done by bar or fill and then having to be redone.
6619-
_saved_autoscalex = self.get_autoscalex_on()
6620-
_saved_autoscaley = self.get_autoscaley_on()
6621-
self.set_autoscalex_on(False)
6622-
self.set_autoscaley_on(False)
6623-
66246616
if histtype.startswith('bar'):
66256617

66266618
totwidth = np.diff(bins)
@@ -6741,10 +6733,6 @@ def hist(self, x, bins=None, range=None, density=False, weights=None,
67416733
# we return patches, so put it back in the expected order
67426734
patches.reverse()
67436735

6744-
self.set_autoscalex_on(_saved_autoscalex)
6745-
self.set_autoscaley_on(_saved_autoscaley)
6746-
self._request_autoscale_view()
6747-
67486736
# If None, make all labels None (via zip_longest below); otherwise,
67496737
# cast each element to str, but keep a single str as it.
67506738
labels = [] if label is None else np.atleast_1d(np.asarray(label, str))

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.