Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Correct setup of margins for logarithmic plots #2263

Closed
wants to merge 3 commits into from

Conversation

mowa-lepota
Copy link

The current formula for setting margins is false in case of log plots. Here is a tested suggestion handling the special case. Please see if this can be backported to the current release candidate (perhaps even beyond), as it seems mandatory to have a correct way of setting margins for log plots.

@WeatherGod
Copy link
Member

My concern about this code is that this would produce different results depending on whether the log scaling was set before or after the plotting command. Now, that is more an indictment against how we handle autoscaling rather than your code and so it probably shouldn't be a reason against including this.

Note that you would most likely need to update test images, and if this change doesn't break any test images, then tests need to be added.

@WeatherGod
Copy link
Member

Also, perhaps we should think about delegating the responsibility of determining such autoscaling over to the scales rather than what could potentially become a huge if/elif/else statement if more scales are supported.

@mdboom
Copy link
Member

mdboom commented Jul 31, 2013

The domain of the axis is already determined by the scale's locator -- see the call to xlocator.view_limits right where this change is here. We should fix it in the LogLocator, and also have the locator used even for tight bounds.

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.

None yet

4 participants