In the case where the figure has multiple subplots, it would be great to have a setaxis option which specifies exactly which axis to plot onto by parsing in a pyplot axis object. You may also want to consider the fact that one may not want the current axis to change just because a splot command was used, in this case it would be best to only temporarily change the axis for the scope of the function . Each plot function could then set the current axis with a call similar to:
if (setaxis != None):
curaxis = plt.gca() # gets the current axis
plt.sca(setaxis) # sets the axis to the one specified
make plots
if (setaxis != None):
plt.sca(curaxis) # return to the previous current axis
In the case where the figure has multiple subplots, it would be great to have a setaxis option which specifies exactly which axis to plot onto by parsing in a pyplot axis object. You may also want to consider the fact that one may not want the current axis to change just because a splot command was used, in this case it would be best to only temporarily change the axis for the scope of the function . Each plot function could then set the current axis with a call similar to: