I have this Python code to plotting a figure:
matplotlib.rcParams['axes.unicode_minus'] = False
fig = plt.figure()
ax = fig.add_subplot(111)
I draw each plot running a loop along x and y like this:
ax.plot(x, y, dotFormat)
ax.errorbar(x, y, yerr=errorStd, fmt=dotFormat)
Finally, I set the axes and show the chart with the interactive navigation:
ax.grid(True)
ax.set_title(chartTitle)
fontsize=10
ax.set_ylabel(yLabel, fontsize=fontsize+2)
ax.set_xlabel(xLabel+'\n', fontsize=fontsize+2)
ax.set_yticklabels(ax.get_yticks(), fontsize=fontsize)
ax.set_xticks(range(len(xMinorLabels)), minor=True)
ax.set_xticklabels(xMinorLabels, minor=True, rotation=90, fontsize=fontsize-5)
ax.set_xticks(xMajorPosition, minor=False)
ax.set_xticklabels(xMajorLabels, minor=False, rotation=90, fontsize=fontsize-4)
plt.show()
If I use the tool zoom-to-rectangle and the Y-axis doesn't work property, because the same dot before zooming in is under 5, and after zooming in it is over 5.
What is happening with the y-axis when I use the zoom tool? Is a bug in the interactive navigation of matplotlib library? Without this tool, the library is useless for huge charts.
Thanks in advance!