Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 1290536

Browse files
committed
Fix #191 (inversion of axis with ax.hist())
1 parent 2cb5a5b commit 1290536

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

‎proplot/axes/plot.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -522,14 +522,15 @@ def standardize_1d(self, func, *args, autoformat=None, **kwargs):
522522
if label and not getattr(self, f'get_{iname}label')():
523523
# For histograms, this label is used for *x* coordinates
524524
kw[iname + 'label'] = label
525-
# Xlabel
526525
if name not in ('hist',):
526+
# Xlabel
527527
x, label = _axis_labels_title(x)
528528
if label and not getattr(self, f'get_{xname}label')():
529529
kw[xname + 'label'] = label
530-
# Reversed axis
531-
if name not in ('scatter',) and len(x) > 1 and xi is None and x[1] < x[0]:
532-
kw[xname + 'reverse'] = True
530+
# Reversed axis
531+
if name not in ('scatter',):
532+
if len(x) > 1 and xi is None and x[1] < x[0]:
533+
kw[xname + 'reverse'] = True
533534

534535
# Appply
535536
if kw:

0 commit comments

Comments
 (0)