-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
ENH: plotting methods can unpack labeled data #4829
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
Merged
tacaswell
merged 63 commits into
matplotlib:master
from
jankatins:unpack_labeled_data_alternative
Sep 13, 2015
Merged
Changes from 1 commit
Commits
Show all changes
63 commits
Select commit
Hold shift + click to select a range
367b68f
ENH: Make implicit x in plot pandas aware
tacaswell 34b879a
ENH: plotting methods can unpack labeled data
tacaswell 9f145cc
ENH: add white-list of args/kwargs to relpace
tacaswell a1c9c34
MNT: remove unused rcparam
tacaswell 1e04469
MNT: python 2.6 does not support set literals
tacaswell d6e177f
ENH: pass at decorator which extracts a label
tacaswell 8a77f90
FIX: fix typo, slightly rename variables
tacaswell dbd3445
FIX: fix yet more typos
tacaswell 1ae230d
ENH: New version of unpack_labeled_data
jankatins ab6d39c
FIX: Update .gitignore for pycharm project files
jankatins 6e29d39
ENH: proper arguments for labeled data decorator, part 1
jankatins f488bc7
ENH: let unpack_labeled_data handle var-length *args
jankatins 1543cde
ENH: proper arguments for labeled data decorator, part 2
jankatins f4eea6e
FIX: handle 'enough' information about arg names in unpack_labeled_data
jankatins c4a6044
FIX: unbreak another corner case in unpack_labeled_data
jankatins 4d1ffb8
FIX: fix unwarranted label argument for pie() with unpack_labeled_data
jankatins c78bb92
FIX: decorate funcs which take 2d data
jankatins d3331ca
ENH: change 'label_namer' default to None
jankatins ea3e22d
PEP8: fix some of the PEP8 problems in new code
jankatins 3273673
PEP8: line wrapping fixes
tacaswell 346a014
PEP8: more line length fixes
jankatins 85d0e74
ENH: extract label from input data in `plot`
tacaswell 1f36892
MNT: add a comment about label_naming in plot(...)
jankatins 8dbb2cc
ENH: Append docs in @unpack_labeled_data
jankatins c768f0d
ENH: accept a function for arg names in @unpack_labeled_data
jankatins 385b8e3
ENH: use the new 'names via function' for @unpack_labeled_data
jankatins 812f74f
FIX: rename test file for @unpack_labeled_data
jankatins 2194e80
FIX: assert_regexp_matches is only in py2.7
jankatins 52d23c9
TST: workaround for unicode prefix in test matching
jankatins 8aa800b
PEP8: line wrapping, spacing
jankatins ecc91e5
TST: workaround for unpredictable order in list printing
jankatins b09370e
WIP: review work
tacaswell 0f781a1
TST: test the plot arg replacer directly
jankatins 77be376
FIX: add proper replace_names for some plotting methods
jankatins 7a39ef6
TST: add testcases for some decorated plot methods
jankatins a0c738e
MNT: regenerate pyplot to get the data kwarg
jankatins 7a6d44d
MNT: make boilerplate.py a bit smarter
tacaswell bb4b9f7
MNT: add python 3 version of sig parsing
tacaswell 9c1199b
ENH: add 'data' to signature in python 3.3 +
tacaswell 47ff38a
MNT: python 2.6 compatibility fix
tacaswell 00929b9
MNT: yet more compatibility fixes
tacaswell b6cb12f
ENH: add 'data' kwarg to pyplot
tacaswell 25b1d43
TST: test pyplot.pie with a data kwarg
jankatins b4f011c
ENH: remove arbitrary long args if used with data
jankatins 61eb622
FIX: small (non-code) fixups
jankatins e838a25
MNT: put test helper functions into their proper place
jankatins 55ed86e
TST: Test with pandas installed on 2.7
jankatins 9846b9c
DOC: Add a whatsnew entry for labeled data improvements
jankatins 2b2092d
MNT: use IPython's signature if needed + available
tacaswell 572c1e2
Merge pull request #4 from tacaswell/unpack_labeled_data_alternative
jankatins e2cf264
MNT: use already imported version variables
tacaswell 67fda44
PRF: only try to use IPython if already imported
tacaswell 59f3917
Merge pull request #5 from tacaswell/unpack_labeled_data_alternative
jankatins 1c9feb8
FIX: guard signature import better
tacaswell 1d00767
MNT: use built-in logic for unwrapping
tacaswell c454983
MNT: rename get_index_y -> index_of
tacaswell 0d6cd40
MNT: enable unpacking on 2D inputs
tacaswell 0734b86
MNT: invert logic of _has_varargs
tacaswell 5fbe4b0
Merge pull request #6 from tacaswell/unpack_labeled_data_alternative
jankatins f34aed0
MNT: simplify identifying valid style codes
tacaswell a051b57
MNT: rearrange testing helper functions
tacaswell 8271952
MNT: expose hist(..., weight='key') to data kwarg
tacaswell 0b4fc7c
DOC: edits to whats_new entry
tacaswell 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
Next
Next commit
ENH: Make implicit x in plot pandas aware
Try to grab `y.index` before returning `np.arange(len(y))`
- Loading branch information
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.
Perhaps this could be just named
index_of
?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 don't think either names suit this function, both imply it returns just the index, rather than the indices and the original values...
Which prompts the question, what does this function do that
enumerate
does not?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.
@OceanWolf It does 'the right thing' with
pd.Series
. This is also a place holder where we can put more brains to deal with other types of labeled data that knows what it's index is (and is not accessible viaobj.index
). Eventually we should probably make this pluggable (like the units framework).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 a commit to change this to
index_of
which I agree is better, but still not perfect. It returns both the index and the values (the original name was going for 'get (index, y)' so something that sounds like it should return both would be better (with_index
sounds like it should be a context manager,indexed
is too ambiguous).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.
get_y_for_x
? If there is no index, it also adds a range, so...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.
@JanSchulz if you squint enough range is the 'index' for a unlabeled array.