Currently, calls to boxplot() set the axis limits, ticks, and ticklabels
assuming that nothing else, and in particular no other boxplot, will be
drawn on the axis; e.g., after
boxplot(np.random.rand(100), positions=[3])
boxplot(np.random.rand(100), positions=[5])
the xlims will be moved to hide the first boxplot, and even after
manually resetting the xlims, the tick at x=3 and its label will be gone
too.
Fix that to make boxplot a bit more cooperative with previous calls:
instead of forcefully setting the axis limits, just update the dataLim
and let autoscaling handle axis limits; also check whether the axis
already has a FixedLocator/FixedFormatter and if so, just append the new
tick locations and labels.
Also rename manage_xticks to manage_ticks (with deprecation), as the
direction it manages depends on the vert kwarg.
Currently, calls to boxplot() set the axis limits, ticks, and ticklabels
assuming that nothing else, and in particular no other boxplot, will be
drawn on the axis; e.g., after
the xlims will be moved to hide the first boxplot, and even after
manually resetting the xlims, the tick at x=3 and its label will be gone
too.
Fix that to make boxplot a bit more cooperative with previous calls:
instead of forcefully setting the axis limits, just update the dataLim
and let autoscaling handle axis limits; also check whether the axis
already has a FixedLocator/FixedFormatter and if so, just append the new
tick locations and labels.
Also rename manage_xticks to manage_ticks (with deprecation), as the
direction it manages depends on the vert kwarg (discussed in #13435).
attn @phobson I guess.
PR Summary
PR Checklist