When was axes kwarg rmoved?

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

When was axes kwarg rmoved?

Vicki Brown
I'm hoping someone can tell me (point me to the ChanegLog for) when he axes kwarg was removed from matplotlib.pyplot.clabel, matplotlib.pyplot.contou, and matplotlib.pyplot.contourf. 

My search has turned up nothing.

I have code in an exercise for a class that called:

    plt.contourf(xx, yy, Z, cmap=ccolor, alpha=.2, axes=ax)
    cs2 = plt.contour(xx, yy, Z, cmap=ccolor, alpha=.6, axes=ax)
    plt.clabel(cs2, fmt = '%2.1f', colors = 'k', fontsize=14, axes=ax)

when run, this raised errors.

I've changed it to

    ax.contourf(xx, yy, Z, cmap=ccolor, alpha=.2)
    cs2 = ax.contour(xx, yy, Z, cmap=ccolor, alpha=.6)
    ax.clabel(cs2, fmt = '%2.1f', colors = 'k', fontsize=14)

and the errors are gone. However, a confirming reference would be helpful.

-- Vicki

Vicki Brown
cfcl.com/vlb




_______________________________________________
Matplotlib-users mailing list
[hidden email]
https://mail.python.org/mailman/listinfo/matplotlib-users
Reply | Threaded
Open this post in threaded view
|

Re: When was axes kwarg rmoved?

Benjamin Root
I don't think it ever was a keyword argument. Now, there have been some bugs fixed recently where unused keyword arguments were going through without emitting an error, which caused confusion when kwargs were misspelled. Perhaps this is the change that is impacting you. To be clear, I don't think it never would have done anything in the past.

I hope this helps!
Cheers!
Ben Root

On Fri, Oct 25, 2019 at 9:40 PM Vicki Brown <[hidden email]> wrote:
I'm hoping someone can tell me (point me to the ChanegLog for) when he axes kwarg was removed from matplotlib.pyplot.clabel, matplotlib.pyplot.contou, and matplotlib.pyplot.contourf. 

My search has turned up nothing.

I have code in an exercise for a class that called:

    plt.contourf(xx, yy, Z, cmap=ccolor, alpha=.2, axes=ax)
    cs2 = plt.contour(xx, yy, Z, cmap=ccolor, alpha=.6, axes=ax)
    plt.clabel(cs2, fmt = '%2.1f', colors = 'k', fontsize=14, axes=ax)

when run, this raised errors.

I've changed it to

    ax.contourf(xx, yy, Z, cmap=ccolor, alpha=.2)
    cs2 = ax.contour(xx, yy, Z, cmap=ccolor, alpha=.6)
    ax.clabel(cs2, fmt = '%2.1f', colors = 'k', fontsize=14)

and the errors are gone. However, a confirming reference would be helpful.

-- Vicki

Vicki Brown
cfcl.com/vlb



_______________________________________________
Matplotlib-users mailing list
[hidden email]
https://mail.python.org/mailman/listinfo/matplotlib-users

_______________________________________________
Matplotlib-users mailing list
[hidden email]
https://mail.python.org/mailman/listinfo/matplotlib-users
Reply | Threaded
Open this post in threaded view
|

Re: When was axes kwarg rmoved?

Vicki Brown
Thanks. That could be what was happening!

On Oct 25, 2019, at 21:06 , Benjamin Root <[hidden email]> wrote:

I don't think it ever was a keyword argument. Now, there have been some bugs fixed recently where unused keyword arguments were going through without emitting an error, which caused confusion when kwargs were misspelled. Perhaps this is the change that is impacting you. To be clear, I don't think it never would have done anything in the past.

I hope this helps!
Cheers!
Ben Root

On Fri, Oct 25, 2019 at 9:40 PM Vicki Brown <[hidden email]> wrote:
I'm hoping someone can tell me (point me to the ChanegLog for) when he axes kwarg was removed from matplotlib.pyplot.clabel, matplotlib.pyplot.contou, and matplotlib.pyplot.contourf. 

My search has turned up nothing.

I have code in an exercise for a class that called:

    plt.contourf(xx, yy, Z, cmap=ccolor, alpha=.2, axes=ax)
    cs2 = plt.contour(xx, yy, Z, cmap=ccolor, alpha=.6, axes=ax)
    plt.clabel(cs2, fmt = '%2.1f', colors = 'k', fontsize=14, axes=ax)

when run, this raised errors.

I've changed it to

    ax.contourf(xx, yy, Z, cmap=ccolor, alpha=.2)
    cs2 = ax.contour(xx, yy, Z, cmap=ccolor, alpha=.6)
    ax.clabel(cs2, fmt = '%2.1f', colors = 'k', fontsize=14)

and the errors are gone. However, a confirming reference would be helpful.

-- Vicki

Vicki Brown
cfcl.com/vlb



_______________________________________________
Matplotlib-users mailing list
[hidden email]
https://mail.python.org/mailman/listinfo/matplotlib-users

-- Vicki

Vicki Brown
cfcl.com/vlb




_______________________________________________
Matplotlib-users mailing list
[hidden email]
https://mail.python.org/mailman/listinfo/matplotlib-users
Reply | Threaded
Open this post in threaded view
|

Re: When was axes kwarg rmoved?

tcaswell
Vicki,

https://github.com/matplotlib/matplotlib/pull/9111 is trying to _add_ the ability to pass the axes into the pyplot methods via keyword.   From your question, I infer that you would like this functionality to exist?

Tom

On Sat, Oct 26, 2019 at 12:28 AM Vicki Brown <[hidden email]> wrote:
Thanks. That could be what was happening!

On Oct 25, 2019, at 21:06 , Benjamin Root <[hidden email]> wrote:

I don't think it ever was a keyword argument. Now, there have been some bugs fixed recently where unused keyword arguments were going through without emitting an error, which caused confusion when kwargs were misspelled. Perhaps this is the change that is impacting you. To be clear, I don't think it never would have done anything in the past.

I hope this helps!
Cheers!
Ben Root

On Fri, Oct 25, 2019 at 9:40 PM Vicki Brown <[hidden email]> wrote:
I'm hoping someone can tell me (point me to the ChanegLog for) when he axes kwarg was removed from matplotlib.pyplot.clabel, matplotlib.pyplot.contou, and matplotlib.pyplot.contourf. 

My search has turned up nothing.

I have code in an exercise for a class that called:

    plt.contourf(xx, yy, Z, cmap=ccolor, alpha=.2, axes=ax)
    cs2 = plt.contour(xx, yy, Z, cmap=ccolor, alpha=.6, axes=ax)
    plt.clabel(cs2, fmt = '%2.1f', colors = 'k', fontsize=14, axes=ax)

when run, this raised errors.

I've changed it to

    ax.contourf(xx, yy, Z, cmap=ccolor, alpha=.2)
    cs2 = ax.contour(xx, yy, Z, cmap=ccolor, alpha=.6)
    ax.clabel(cs2, fmt = '%2.1f', colors = 'k', fontsize=14)

and the errors are gone. However, a confirming reference would be helpful.

-- Vicki

Vicki Brown
cfcl.com/vlb



_______________________________________________
Matplotlib-users mailing list
[hidden email]
https://mail.python.org/mailman/listinfo/matplotlib-users

-- Vicki

Vicki Brown
cfcl.com/vlb



_______________________________________________
Matplotlib-users mailing list
[hidden email]
https://mail.python.org/mailman/listinfo/matplotlib-users


--
Thomas Caswell
[hidden email]

_______________________________________________
Matplotlib-users mailing list
[hidden email]
https://mail.python.org/mailman/listinfo/matplotlib-users
Reply | Threaded
Open this post in threaded view
|

Re: When was axes kwarg rmoved?

Vicki Brown
Tha would actually be useful. Many methods have it, others don't. Consistency is good and why have two methods when one will suffice?

- V.

On Oct 31, 2019, at 07:46 , Thomas Caswell <[hidden email]> wrote:

Vicki,

https://github.com/matplotlib/matplotlib/pull/9111 is trying to _add_ the ability to pass the axes into the pyplot methods via keyword.   From your question, I infer that you would like this functionality to exist?

Tom

On Sat, Oct 26, 2019 at 12:28 AM Vicki Brown <[hidden email]> wrote:
Thanks. That could be what was happening!

On Oct 25, 2019, at 21:06 , Benjamin Root <[hidden email]> wrote:

I don't think it ever was a keyword argument. Now, there have been some bugs fixed recently where unused keyword arguments were going through without emitting an error, which caused confusion when kwargs were misspelled. Perhaps this is the change that is impacting you. To be clear, I don't think it never would have done anything in the past.

I hope this helps!
Cheers!
Ben Root

On Fri, Oct 25, 2019 at 9:40 PM Vicki Brown <[hidden email]> wrote:
I'm hoping someone can tell me (point me to the ChanegLog for) when he axes kwarg was removed from matplotlib.pyplot.clabel, matplotlib.pyplot.contou, and matplotlib.pyplot.contourf. 

My search has turned up nothing.

I have code in an exercise for a class that called:

    plt.contourf(xx, yy, Z, cmap=ccolor, alpha=.2, axes=ax)
    cs2 = plt.contour(xx, yy, Z, cmap=ccolor, alpha=.6, axes=ax)
    plt.clabel(cs2, fmt = '%2.1f', colors = 'k', fontsize=14, axes=ax)

when run, this raised errors.

I've changed it to

    ax.contourf(xx, yy, Z, cmap=ccolor, alpha=.2)
    cs2 = ax.contour(xx, yy, Z, cmap=ccolor, alpha=.6)
    ax.clabel(cs2, fmt = '%2.1f', colors = 'k', fontsize=14)

and the errors are gone. However, a confirming reference would be helpful.

-- Vicki

Vicki Brown
cfcl.com/vlb



_______________________________________________
Matplotlib-users mailing list
[hidden email]
https://mail.python.org/mailman/listinfo/matplotlib-users

-- Vicki

Vicki Brown
cfcl.com/vlb



_______________________________________________
Matplotlib-users mailing list
[hidden email]
https://mail.python.org/mailman/listinfo/matplotlib-users


--
Thomas Caswell
[hidden email]

-- Vicki

Vicki Brown
cfcl.com/vlb




_______________________________________________
Matplotlib-users mailing list
[hidden email]
https://mail.python.org/mailman/listinfo/matplotlib-users
Reply | Threaded
Open this post in threaded view
|

Re: When was axes kwarg rmoved?

Benjamin Root
Just to be clear, no methods have this right now. I am not sure why you think "many methods have it". This is a design proposal. This will also not eliminate any methods, contrary to your "why have two methods when one will suffice". The ultimate goal of the design proposal (at least, how I view it) is to begin to unify how plotting APIs look across packages.

Ben Root


On Thu, Oct 31, 2019 at 11:50 AM Vicki Brown <[hidden email]> wrote:
Tha would actually be useful. Many methods have it, others don't. Consistency is good and why have two methods when one will suffice?

- V.

On Oct 31, 2019, at 07:46 , Thomas Caswell <[hidden email]> wrote:

Vicki,

https://github.com/matplotlib/matplotlib/pull/9111 is trying to _add_ the ability to pass the axes into the pyplot methods via keyword.   From your question, I infer that you would like this functionality to exist?

Tom

On Sat, Oct 26, 2019 at 12:28 AM Vicki Brown <[hidden email]> wrote:
Thanks. That could be what was happening!

On Oct 25, 2019, at 21:06 , Benjamin Root <[hidden email]> wrote:

I don't think it ever was a keyword argument. Now, there have been some bugs fixed recently where unused keyword arguments were going through without emitting an error, which caused confusion when kwargs were misspelled. Perhaps this is the change that is impacting you. To be clear, I don't think it never would have done anything in the past.

I hope this helps!
Cheers!
Ben Root

On Fri, Oct 25, 2019 at 9:40 PM Vicki Brown <[hidden email]> wrote:
I'm hoping someone can tell me (point me to the ChanegLog for) when he axes kwarg was removed from matplotlib.pyplot.clabel, matplotlib.pyplot.contou, and matplotlib.pyplot.contourf. 

My search has turned up nothing.

I have code in an exercise for a class that called:

    plt.contourf(xx, yy, Z, cmap=ccolor, alpha=.2, axes=ax)
    cs2 = plt.contour(xx, yy, Z, cmap=ccolor, alpha=.6, axes=ax)
    plt.clabel(cs2, fmt = '%2.1f', colors = 'k', fontsize=14, axes=ax)

when run, this raised errors.

I've changed it to

    ax.contourf(xx, yy, Z, cmap=ccolor, alpha=.2)
    cs2 = ax.contour(xx, yy, Z, cmap=ccolor, alpha=.6)
    ax.clabel(cs2, fmt = '%2.1f', colors = 'k', fontsize=14)

and the errors are gone. However, a confirming reference would be helpful.

-- Vicki

Vicki Brown
cfcl.com/vlb



_______________________________________________
Matplotlib-users mailing list
[hidden email]
https://mail.python.org/mailman/listinfo/matplotlib-users

-- Vicki

Vicki Brown
cfcl.com/vlb



_______________________________________________
Matplotlib-users mailing list
[hidden email]
https://mail.python.org/mailman/listinfo/matplotlib-users


--
Thomas Caswell
[hidden email]

-- Vicki

Vicki Brown
cfcl.com/vlb




_______________________________________________
Matplotlib-users mailing list
[hidden email]
https://mail.python.org/mailman/listinfo/matplotlib-users
Reply | Threaded
Open this post in threaded view
|

Re: When was axes kwarg rmoved?

Vicki Brown
My apologies. I'm VERY new to this and my wording was imprecise

Many _pandas methods_ have the ax argument.

>> why have two methods when one will suffice

Why force he user o go find another method when hey've already used one and only need to add one bit.

(beter wording? No?)

>> The ultimate goal of the design proposal (at least, how I view it) is to begin to unify how plotting APIs look across packages.

aka "consistency".

(you have an awesome name, btw. ;-)

On Oct 31, 2019, at 09:16 , Benjamin Root <[hidden email]> wrote:

Just to be clear, no methods have this right now. I am not sure why you think "many methods have it". This is a design proposal. This will also not eliminate any methods, contrary to your "why have two methods when one will suffice". The ultimate goal of the design proposal (at least, how I view it) is to begin to unify how plotting APIs look across packages.

Ben Root


On Thu, Oct 31, 2019 at 11:50 AM Vicki Brown <[hidden email]> wrote:
Tha would actually be useful. Many methods have it, others don't. Consistency is good and why have two methods when one will suffice?

- V.

On Oct 31, 2019, at 07:46 , Thomas Caswell <[hidden email]> wrote:

Vicki,

https://github.com/matplotlib/matplotlib/pull/9111 is trying to _add_ the ability to pass the axes into the pyplot methods via keyword.   From your question, I infer that you would like this functionality to exist?

Tom

On Sat, Oct 26, 2019 at 12:28 AM Vicki Brown <[hidden email]> wrote:
Thanks. That could be what was happening!

On Oct 25, 2019, at 21:06 , Benjamin Root <[hidden email]> wrote:

I don't think it ever was a keyword argument. Now, there have been some bugs fixed recently where unused keyword arguments were going through without emitting an error, which caused confusion when kwargs were misspelled. Perhaps this is the change that is impacting you. To be clear, I don't think it never would have done anything in the past.

I hope this helps!
Cheers!
Ben Root

On Fri, Oct 25, 2019 at 9:40 PM Vicki Brown <[hidden email]> wrote:
I'm hoping someone can tell me (point me to the ChanegLog for) when he axes kwarg was removed from matplotlib.pyplot.clabel, matplotlib.pyplot.contou, and matplotlib.pyplot.contourf. 

My search has turned up nothing.

I have code in an exercise for a class that called:

    plt.contourf(xx, yy, Z, cmap=ccolor, alpha=.2, axes=ax)
    cs2 = plt.contour(xx, yy, Z, cmap=ccolor, alpha=.6, axes=ax)
    plt.clabel(cs2, fmt = '%2.1f', colors = 'k', fontsize=14, axes=ax)

when run, this raised errors.

I've changed it to

    ax.contourf(xx, yy, Z, cmap=ccolor, alpha=.2)
    cs2 = ax.contour(xx, yy, Z, cmap=ccolor, alpha=.6)
    ax.clabel(cs2, fmt = '%2.1f', colors = 'k', fontsize=14)

and the errors are gone. However, a confirming reference would be helpful.

-- Vicki

Vicki Brown
cfcl.com/vlb



_______________________________________________
Matplotlib-users mailing list
[hidden email]
https://mail.python.org/mailman/listinfo/matplotlib-users

-- Vicki

Vicki Brown
cfcl.com/vlb



_______________________________________________
Matplotlib-users mailing list
[hidden email]
https://mail.python.org/mailman/listinfo/matplotlib-users


--
Thomas Caswell
[hidden email]

-- Vicki

Vicki Brown
cfcl.com/vlb




-- Vicki

Vicki Brown
cfcl.com/vlb




_______________________________________________
Matplotlib-users mailing list
[hidden email]
https://mail.python.org/mailman/listinfo/matplotlib-users