[Matplotlib-users] Replacing deprecated use of pyplot.subplot
rory.yorke at gmail.com
Sat Feb 3 00:00:29 EST 2018
Paul Hobson <pmhobson at gmail.com> writes:
>> In general, especially for library code, you should avoid relying on the
>> pyplot state machine.
OK, thanks. Eric said much the same in his reply.
Thanks for the example code, that helps. It seems like the recommended
overall approach is "if axes are provided, used them, else create new ones;
return the axes used".
For now we'll use the approach I've implemented, perhaps with Eric's
suggested improvement. I'll propose creating a new suite of plot
functions (there are several specialized plots we do: Bode, Nichols,
etc.) that adopt the no-state-machine approach.
Thanks, both to you and Eric.
More information about the Matplotlib-users