I'm not too sure, so take my advice with a grain of salt. I would recommend to make a couple of lines comments, in case they somehow interfere with ax.set_ylim(). what does @render.plot do?