-
-
Notifications
You must be signed in to change notification settings - Fork 54
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
Adding support for rotating mpl selectors of Ellipse,RectanglePixelRegion #390
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,11 +3,12 @@ | |
try: | ||
import matplotlib | ||
HAS_MATPLOTLIB = True | ||
MPL_VERSION = getattr(matplotlib, '__version__', None) | ||
if MPL_VERSION is None: | ||
MPL_VERSION = matplotlib._version.version | ||
MPL_VERSION = MPL_VERSION.split('.') | ||
MPL_VER_STR = getattr(matplotlib, '__version__', None) | ||
if MPL_VER_STR is None: | ||
MPL_VER_STR = matplotlib._version.version | ||
MPL_VERSION = MPL_VER_STR.split('.') | ||
MPL_VERSION = 10 * int(MPL_VERSION[0]) + int(MPL_VERSION[1]) | ||
except ImportError: | ||
HAS_MATPLOTLIB = False | ||
MPL_VER_STR = 'None' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is it possible to streamline the matplotilb version checking? Something like what astropy uses for numpy version checks (see https://github.com/astropy/astropy/blob/main/astropy/utils/compat/numpycompat.py)?
and then use it the code with:
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks for reviewing; will look into it. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks. Let me know when this is ready for a (final?) review. |
||
MPL_VERSION = 0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will need to be be moved to version 0.8.