diff --git a/lib/matplotlib/axes/_axes.py b/lib/matplotlib/axes/_axes.py index 01c94be87190..c60c911196ff 100644 --- a/lib/matplotlib/axes/_axes.py +++ b/lib/matplotlib/axes/_axes.py @@ -2034,7 +2034,8 @@ def make_iterable(x): if len(bottom) != nbars: raise ValueError("incompatible sizes: argument 'bottom' " "must be length %d or scalar" % nbars) - if len(tick_label) != nbars: + # only check the number of tick labels if tick labels were specified + if label_ticks_flag and len(tick_label) != nbars: raise ValueError("incompatible sizes: argument 'tick_label' " "must be length %d or string" % nbars)