Closed AlexTWeb closed 4 weeks ago
While migrating from 0.12 to 0.13, I've spotted the new behaviour of palette on a barplot, that now automatically uses hue.
This is just to make the deprecation smoother; you should be seeing a warning that you need to update your code, and eventually it will be required to pass hue
explicitly. This change was documented in the release notes.
Note that the precise way that artists end up on the matplotlib Axes is considered an implementation detail and subject to change at any time (this is true for pyplot as well).
Hello and thanks for this awesome visualisation library!
While migrating from 0.12 to 0.13, I've spotted the new behaviour of
palette
on abarplot
, that now automatically useshue
.This changes the returned
containers
, as in the past all bars where part ofcontainers[0]
, while with thehue
parameter 1 BarContainer is returned per bar.Example Code:
When running this with v0.12 is resulted in all 3 bars having bar_labels (as
ax.containers[0]
contains all of them):Now with v0.13 each bar is it's own
BarContainer
, soax.containers[0]
is just the first bar:I assume this is the supposed behaviour, as it behaves the same, when using the
hue
parameter in v0.12 (that likely not many people used).So the old behaviour can be restored, by iterating all
BarContainers
like this:Do you confirm, that this is the expected behaviour or did I miss something?