-
-
Notifications
You must be signed in to change notification settings - Fork 8k
ENH: Added FuncNorm and PiecewiseNorm classes in colors #7294
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
Closed
Closed
Changes from 1 commit
Commits
Show all changes
33 commits
Select commit
Hold shift + click to select a range
2d90c5a
Added ArbitaryNorm and RootNorm classes in colors, as well as example…
57aad3d
PEP8 formatting on examples, plotting using the object oriented appro…
f818aff
Added title/description to the examples
ffe1b9d
Class attributes are now hidden
1d22b90
Major update: complete refactorization of code. A much more powerful …
b5801ea
Corrected lambda function syntax that was not compatible with python …
e93d82d
Added FuncNorm: now everything inherits from this. Changed the name o…
3749b0a
Forgot to uncomment an import
de62491
Improved the auto-tick feature, and corrected some pep8 issues
d148756
Improved examples, created a new file for generating sample data.'
alvarosg 5373a98
Corrected a double line, and removed a comment
alvarosg 13edeab
Tests for FuncNorm added, and bug corrected in FuncNorm
alvarosg 21d5cd0
Added compatibility for python 3 string check, added tests for Piecew…
alvarosg d359a4e
Added tests on all classes, including all public methods
alvarosg 4622829
Change type of arrays in tests from int to float
alvarosg 30ff404
Corrected wrong `super()` for RootNorm
alvarosg df835cb
Solve problem with implicit int to float casting that was not working…
alvarosg dfaa0f8
Added documentation in the numpydoc format
alvarosg a386395
Improve style in the examples. Corrected intending problem in the doc…
alvarosg b9dafb0
Added example in `FuncNorm` docstring
alvarosg d10be73
Finished with the examples in the docstrings
alvarosg c85a14c
Implemented clipping behavoir. Refactored _func_parser
alvarosg 7597ddd
It now allows some string functions with parameters. Added a test for…
alvarosg 7fce503
Forgot to add a file...
alvarosg bcd7dd0
Forgot to add another file...
alvarosg a71e1e9
Improved tests, documentation, and exceptions
alvarosg 33f57d1
Removed test_colors.py from __init__.py after including parametrize
alvarosg 9687173
Moved the string function parser to its own class in cbook. Added tes…
alvarosg 46395aa
Improved documentation
63dab61
Added new example
8abf2c2
Added example for PiecewiseNorm, and MirrorPiecewiseNorm. String in t…
alvarosg b4ecdb2
Removed sampledata.py no longer necessary, and changed examples in do…
alvarosg 42007ee
Added examples for MirrorRootNorm and RootNorm
alvarosg File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Solve problem with implicit int to float casting that was not working…
… for numpy 1.6
- Loading branch information
commit df835cb38e077c656d2c8ed270869846abbfcc66
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
These should probably either be broken into separate tests or parameterized cause if one of the tests fails, it would likely require going back to the source to figure which subcategories failed.
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.
I guess the line of the assert is always shown, but in any case, could you show me an example of parameterized, please?
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.
But assert doesn't spit error messages, so you're kind of left guessing what specific thing that assert was trying to test.
http://doc.pytest.org/en/latest/parametrize.html and test_category.py has lots of mpl examples.
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.
I have now included a test class for each of the implemented classes, and each assert in a separate name method. It also includes a parametric test to replace the loop I had before.
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.
However, the parametric test is not working, for some reason. Do you know, if apart from using the decorator, I have to do anything else? All other tests in the file are single method very basic tests (which is why I did it like that originally)
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.
Thanks @QuLogic, it should build now!