Commit d6becd6
committed
Stop applying colorbar alpha twice (#687)
`fig.colorbar(mappable)` already bakes the mappable's alpha into the colorbar's
QuadMesh facecolors (verified: alpha column = mappable.alpha straight after
construction). Our subsequent `cb.solids.set_alpha(spec.alpha)` then multiplied
on top, so the colorbar rendered at alpha squared and looked much paler than the
layer it represents.
Only apply `spec.alpha` when the mappable does not carry alpha of its own; if it
does, trust the inherited value. Visible improvement on every continuous-color
colorbar (especially labels at low fill_alpha, e.g.
`Labels_can_handle_dropping_small_labels_after_rasterize_continuous` and
`Labels_two_calls_with_coloring_result_in_two_colorbars`).1 parent e459dfa commit d6becd6
1 file changed
Lines changed: 5 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1637 | 1637 | | |
1638 | 1638 | | |
1639 | 1639 | | |
1640 | | - | |
| 1640 | + | |
| 1641 | + | |
| 1642 | + | |
| 1643 | + | |
| 1644 | + | |
1641 | 1645 | | |
1642 | 1646 | | |
1643 | 1647 | | |
| |||
0 commit comments