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

Makeaxis.set_scale private#1917

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

Merged
mdboom merged 2 commits intomatplotlib:masterfromtacaswell:priv_axis.set_scale
May 13, 2013

Conversation

tacaswell
Copy link
Member

Addressesfixes#1871 by makingaxis.set_scale private and adding a wrapper function with depreciation warning.

…d addinga wrapper function with depreciation warning.
@pelson
Copy link
Member

It seems odd to me that there should be aget_scale but noset_scale. I'm also mildly bothered by the fact that methods outside of Axis have to call the "private" methods. I don't have any suggestions here, just airing my thoughts...

Thanks for doing this@tacaswell .

@mdboom
Copy link
Member

Yeah -- marking as 1.3.x, but I want to think on this for a bit. I can't help thinking there might be a better way.

@tacaswell
Copy link
MemberAuthor

Currently all of the calls to_set_scale are in methods ofaxes object methods, so it's not that bad.

My thoughts on this are colored by c++ style friend relationships. I don't see how anaxis is useful outside of anaxes or anaxes is useful without anaxis so the has-a and is-a relationships get fuzzy.

@@ -683,6 +685,17 @@ def get_scale(self):
return self._scale.name

def set_scale(self, value, **kwargs):
"""
Deprecatted 1.3.
Copy link
Member

Choose a reason for hiding this comment

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

Typo: deprecated

@tacaswell
Copy link
MemberAuthor

Sorry about the spelling errors, did not realize the spell checker was not working.

I copied the import ofmplDeprecation out ofaxes.py, should I make a PR to fix that too?

@NelleV
Copy link
Member

@tacaswell Yes please. That must be a left over when mplDeprecation was in theinit.py file.

mdboom added a commit that referenced this pull requestMay 13, 2013
@mdboommdboom merged commitfb2da34 intomatplotlib:masterMay 13, 2013
@tacaswelltacaswell deleted the priv_axis.set_scale branchMay 13, 2013 17:57
tacaswell added a commit to tacaswell/matplotlib that referenced this pull requestJan 10, 2015
tacaswell added a commit to tacaswell/matplotlib that referenced this pull requestJan 22, 2015
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
v1.3.x
Development

Successfully merging this pull request may close these issues.

set_scale and set_xscale
4 participants
@tacaswell@pelson@mdboom@NelleV

[8]ページ先頭

©2009-2025 Movatter.jp