How To Properly Display Sufficient Tick Markers Using Plt.savefig?
After running the code below, the axis tick markers all overlap with each other. At this time, each marker could still have good resolution when zooming popped up by plt.show(). Ho
Solution 1:
I think you can solve it by setting the size of the figure, e.g.
fig, ax = plt.subplots()
fig.set_size_inches(15., 15.)
As pointed out by @PatrickArtner in the comments, you can then also avoid the overlap of x-ticks by
plt.xticks(list(range(0, 1001, 10)), rotation=90)
instead of
plt.xticks(list(range(0, 1001,10)))
The rest of the code is completely unchanged; the output then looks reasonable (but is too large to upload here).
Post a Comment for "How To Properly Display Sufficient Tick Markers Using Plt.savefig?"