Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Autoscaling and limits in mplot3d.#1289

Merged
dmcdougall merged 4 commits intomatplotlib:v1.2.xfrom
WeatherGod:mplot3d/autoscale_fix
Dec 3, 2012
Merged

Autoscaling and limits in mplot3d.#1289
dmcdougall merged 4 commits intomatplotlib:v1.2.xfrom
WeatherGod:mplot3d/autoscale_fix

Conversation

@WeatherGod
Copy link
Copy Markdown
Member

Due to time constraints in releasing v1.2.0, I would understand if this doesn't make it in for the release.

    * Fixes improper setting of x,y,z limits not turning off autoscaling
    * Adds units support to z-axis
    * Adds shared axis support for z-axis
    * Closes matplotlib#783
Comment thread lib/mpl_toolkits/mplot3d/axes3d.py Outdated
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

If z-axis sharing is supported, why not just remove these three lines?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Whoops, I thought I got all the cruft. I will take care of that.

@dmcdougall
Copy link
Copy Markdown
Member

Does this suffer from the problems reported in #1110? If so, #1145 fixed it for the 2D case. Maybe it's worth taking a look at the diff there?

@WeatherGod
Copy link
Copy Markdown
Member Author

Axes3D can't do twinx/y yet because of the way the axis and axis ticks and labels are drawn. Support for that will have to come much further down the road.

@dmcdougall
Copy link
Copy Markdown
Member

Sweet. Cheers for clarification.

@pelson
Copy link
Copy Markdown
Member

pelson commented Sep 21, 2012

My biggest concern with mplot3d in general is that I don't think there are any tests? At the very least, would you be willing to add a simple test case for this change?

@WeatherGod
Copy link
Copy Markdown
Member Author

Oh, I whole-heartedly agree that one of mplot3d's main problems is the lack of tests. I have been putting off making such tests because I have never been satisfied with the appearance of the figures. What I do whenever I make an invasive change like this is that I run all of the mplot3d examples (plus others I have) and make sure that they still produce expected results.

My one remaining hurdle I have before I am really willing to sit down and create baseline images is getting the 3d axes to take up a significantly larger portion of the subaxes. Right now, everything looks crammed. That should be the last major visual change for mplot3d toolkit. Unfortunately, it is not quite possible to do this, although some changes that have happened over the summer should get us most of the way there.

@WeatherGod
Copy link
Copy Markdown
Member Author

Now that v1.2.0 is out, I want to merge this bugfix into the maintenance branch and master. Objections?

@dmcdougall
Copy link
Copy Markdown
Member

My feeling is that this should be merged, but just into master. It's not entirely a bugfix, it adds support for things that weren't previously supported.

@WeatherGod
Copy link
Copy Markdown
Member Author

On Tue, Nov 13, 2012 at 10:23 AM, Damon McDougall
[email protected]:

My feeling is that this should be merged, but just into master. It's not
entirely a bugfix, it adds support for things that weren't previously
supported.

It is a bugfix in the sense that there is a specific bug being fixed. It
is just that the process of fixing that bug also enabled other things that
weren't working before. There is technically no new functionality, just
making the functions do what they claimed to do.

@dmcdougall
Copy link
Copy Markdown
Member

@WeatherGod Alright. I'd like to play with it first though. I haven't done that yet.

@dmcdougall
Copy link
Copy Markdown
Member

@WeatherGod Tried this out -- it seems to behave like the 2D case for the example in #783. I haven't tried the units support.

How does everyone else feel about this going into the v1.2.x branch?

Comment thread lib/mpl_toolkits/mplot3d/axes3d.py Outdated
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Is there any reason you didn't make this a """ docstring?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Most of the PEP8 violations here are a result of my copying and pasting from axes.py. Thanks for catching these and I will fix them all (as well as do PEP8 work for mplot3d in a separate PR).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants