[Matplotlib-users] Totaly new to matplotlib
ben.v.root at gmail.com
Thu Feb 4 17:16:18 EST 2016
Don't worry, we all started from somewhere, but it is important to
understand the distinction. This has nothing to do with python, by the way.
`plt.gca()` returns the "current"/"active" axes object. Meanwhile, your
function does its plotting on an axes object called "ax". These may or may
not be the same thing -- you just simply don't know. So, your function
should continue to perform its plotting commands on the "ax" variable, not
on the result from `plt.gca()`.
Note though, it is perfectly valid what you have in the beginning of the
function what called `plt.gca()` if "ax" was not supplied by the user. But
you should continue to use "ax" throughout the function so that all actions
happen to the same variable.
I hope that makes it clearer.
On Thu, Feb 4, 2016 at 5:00 PM, Stevo <stm6386 at gmail.com> wrote:
> Please for give me for not being experienced enough in python to understand
> the significance of the difference of that but I have changed it .. thank
> Loving Python
> View this message in context:
> Sent from the matplotlib - users mailing list archive at Nabble.com.
> Matplotlib-users mailing list
> Matplotlib-users at python.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Matplotlib-users