Reputation: 32111
My matplotlib plots have changed styles unexpectedly. I am trying to pin down what I did to change them. My best guess is that I changed matplotlib versions, or I'm possibly am using a different backend.
A histogram plot currently looks like this:
They used to look like this (nice defined border lines between the bars):
I have made no changes to the code that generates the plots, but I have mucked with import statements, and re-installed various components of anaconda, including matplotlib for unrelated reasons.
Upvotes: 0
Views: 541
Reputation: 339590
Starting from matplotlib version 2.0, patches do not have edges anymore. See the Changes to the default style.
Options to set edges back on:
Use the edgecolor
argument of the artist. E.g.
plt.bar(...., edgecolor="k")
Use the rcParams to globally set edges,
plt.rcParams['patch.force_edgecolor'] = True
or edit you matplotlibrc file accordingly.
Turn the old style on again, using
plt.style.use('classic')
Upvotes: 1
Reputation: 7404
Earlier this year, matplotlib changed their defaults. You want the edgecolor param.
plt.hist(np.random.norma(0,1,100), edgecolor='k')
You can use a classic style by passing plt.style.use('classic')
.
Upvotes: 1