Closed
Description
When using the darkgrid seaborn style, no ticks are rendered. However, in the saved pdf single pixels show up at each tick position. This is not the case when saving the figure as png. Here's an example of what I mean:
At first I assumed this is a seaborn bug. But I can replicate the behavior in matplotlib only code as well. A small example would be:
import matplotlib as mpl
import matplotlib.pyplot as plt
style = {
"figure.facecolor": "white",
"xtick.direction": "out",
"ytick.direction": "out",
"axes.axisbelow": True,
"grid.linestyle": "-",
"lines.solid_capstyle": "round",
"axes.facecolor": "#EAEAF2",
"axes.edgecolor": "white",
"axes.linewidth": 0,
"grid.color": "white",
"xtick.major.size": 0,
"ytick.major.size": 0,
"xtick.minor.size": 0,
"ytick.minor.size": 0,
}
mpl.rcParams.update(style)
plt.figure()
plt.bar([0.6, 1.6, 2.6], [10, 20, 30])
plt.xticks([1, 2, 3])
plt.xlim(0.5, 3.5)
plt.ylim(0, 35)
plt.savefig('test.pdf', dpi=300)
I'm running seaborn 0.7.0 and matplotlib 1.5.1 in python 3.4.4 from Anaconda 2.3.0 on 64 bit Windows. The backend used is QT4Agg.
It's not a huge problem as those pixels are not very prominent. But it seems to me no tick rendering should take place at all in the 0 length case.