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

Suggested functionality for "multi" #3

Closed
AstroRobin opened this issue Nov 27, 2018 · 1 comment
Closed

Suggested functionality for "multi" #3

AstroRobin opened this issue Nov 27, 2018 · 1 comment
Assignees
Labels
addition New feature or request

Comments

@AstroRobin
Copy link
Collaborator

The "multi" flag is good so that you don't accidentally invert an axis twice (i.e. do nothing) or similar toggle a grid twice. The problem I see is that all the other plotting features (limits, titles, labels) are locked up, doomed to the same fate as grid and invert.

A simple way to get around double toggling the inversion is to use yaxis_inverted() which returns true if the axis is already inverted. You can check if the inversion operation has already been done and if so, do nothing.

The grid property is a little bit harder and requires dangerously checking some private variables, it seems this is the only solution, however. The following code should work to detect either major or minor grids:
xGridOn = ax.xaxis._gridOnMajor or ax.xaxis._gridOnMinor
yGridOn = ax.yaxis._gridOnMajor or ax.yaxis._gridOnMinor

Some basic tests show that this works well in practice.

@AstroRobin AstroRobin reopened this Nov 27, 2018
@MBravoS MBravoS self-assigned this Nov 27, 2018
@MBravoS MBravoS added the addition New feature or request label Nov 27, 2018
@MBravoS MBravoS added this to Removal of "multi" variable in Modifications to current code Nov 28, 2018
Modifications to current code automation moved this from To Do to Done Mar 15, 2019
@AstroRobin AstroRobin reopened this Mar 15, 2019
Modifications to current code automation moved this from Done to To Do Mar 15, 2019
@MBravoS
Copy link
Owner

MBravoS commented Apr 10, 2019

Removed as of 0.2.5.0

@MBravoS MBravoS closed this as completed Apr 10, 2019
Modifications to current code automation moved this from To Do to Done Apr 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
addition New feature or request
Development

No branches or pull requests

2 participants