Skip to content

Colorbar's edge drawn in really thick line for saved figures.  #3790

Closed
@dchandan

Description

@dchandan

The colorbar's set_edgecolor function draws a really thick line in the saved PNG figures when the figures are saved with a high dpi option. This reproduces the error:

import numpy as np
import matplotlib.pyplot as plt

r = np.random.random((20,20))

ff  = plt.contourf(r, interpolation="nearest" ,extend="both")
cb   = plt.colorbar(ff, format="%3.1f")
cb.solids.set_edgecolor("face")
plt.savefig("test23.png", dpi=400, bbox_inches="tight")

Here's a link to the stackoverflow discussion of this issue with figures showing the bug: http://stackoverflow.com/questions/26900160/overflow-of-colour-bar-in-saved-matplotlib-figure?noredirect=1#comment42377205_26900160

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions