Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

make plt.subplot() act as plt.subplot(111)#1475

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Closed

Conversation

ivanov
Copy link
Member

Since plt.subplots() make an assumption of what you want when you call
it without arguments, and as does plt.axes(), there's no reason why
plt.subplot() shouldn't make the same assumption.

Since plt.subplots() make an assumption of what you want when you callit without arguments, and as does plt.axes(), there's no reason whyplt.subplot() shouldn't make the same assumption.
@@ -1,3 +1,5 @@
2012-11-09 Make plt.subplot() without arguments act as subplot(111) - PI

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

I don't think we are usingCHANGELOG any more. I think this should go inwhats_new.rst instead.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

I have no problem with updating CHANGELOG, although it is getting sparse to do so now. But this definitely should go into whats_new.rst.

Copy link
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Ok, but on the first line (after the title) ofwhats_new.rst says:

This page just covers the highlights -- for the full story, see the`CHANGELOG <http://matplotlib.org/_static/CHANGELOG>`_

EDIT: got my wires crossed and thought this comment was about a different PR. Now updated this PR as well

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Thanks.

My guess is that it will go into 1.3 (or whatever the new version is called), since 1.2.1 should be for critical bugfixes.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

My feeling is that "What's new" is for high-level user-visible changes (sort of like an advertisment for the new release), and CHANGELOG (which I believe we are still using) is for smaller details that users need to know about. We also have api_changes for things where we know users need to change their code. (I don't think this falls into that category becausesubplots() would have raised an exception before and now does something new).

@dmcdougall
Copy link
Member

I like this. How does everyone else feel?

@WeatherGod
Copy link
Member

+1 on this harmless syntaxical sugar.

@mdboom
Copy link
Member

+1 on the idea.

@dmcdougall
Copy link
Member

Merged.

@@ -768,6 +771,10 @@ def subplot(*args, **kwargs):
.. plot:: mpl_examples/pylab_examples/subplot_demo.py

"""
# if subplot called without arguments, create subplot(1,1,1)
if len(args)==0:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

It's merged so it doesn't matter, but in future we are trying to standardise the code base towards PEP8 which recommends spaces between operators (and after commas).

I'm not worried about getting this sorted (it will get picked up eventually by an automatable tool).

Cheers,

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

5 participants
@ivanov@dmcdougall@WeatherGod@mdboom@pelson

[8]ページ先頭

©2009-2025 Movatter.jp