-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Replace dataset scatter with the dataarray version #5622
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 40 commits
Commits
Show all changes
174 commits
Select commit
Hold shift + click to select a range
3557771
Add dataset line plot
Illviljan fd822cd
Update dataset_plot.py
Illviljan 516c0d0
Update dataset_plot.py
Illviljan da30687
Handle when hue is not None
Illviljan 7127229
sort and add linewidth
Illviljan 133ccd5
variant with dataarray
Illviljan 295352a
Use the dataarray variant.
Illviljan 798d2b9
Merge branch 'master' into Illviljan-dataset_line_plot
Illviljan 4f1ddc2
copy doc from dataarray
Illviljan ed31db7
Update dataset_plot.py
Illviljan fb7e9db
Update dataset_plot.py
Illviljan e10d5ca
allow adding any number of extra coords
Illviljan 474928f
Explain how ds will becom darray
Illviljan 54bd639
Update dataset_plot.py
Illviljan f58c52a
Merge branch 'master' into Illviljan-dataset_line_plot
Illviljan a8edc08
Update dataset_plot.py
Illviljan 9c416f2
use coords for coords
Illviljan 3ade6c4
Merge branch 'master' into Illviljan-dataset_line_plot
Illviljan c14ae47
Merge branch 'master' into Illviljan-dataset_line_plot
Illviljan 93b50e2
Merge branch 'master' into Illviljan-dataset_line_plot
Illviljan 7110220
Explain goal of moving ds plots to da
Illviljan 76d42e5
Merge branch 'master' into Illviljan-dataset_line_plot
Illviljan b8c749d
Merge branch 'main' into Illviljan-dataset_line_plot
Illviljan 3e90c1f
Merge branch 'main' into Illviljan-dataset_line_plot
Illviljan 72c8e81
Update dataset_plot.py
Illviljan 79dd87a
Update dataset_plot.py
Illviljan 7b8fe1d
Update dataset_plot.py
Illviljan bf8b0ea
handle non-existant coords
Illviljan 424a006
Update dataset_plot.py
Illviljan fe5bece
Look through the kwargs to find extra coords
Illviljan 8d5f5c6
output of legend labels has changed
Illviljan a26992c
pop plt, comment out error test
Illviljan 61ba8db
Merge branch 'Illviljan-dataset_line_plot' into remove_dataset_scatter
Illviljan f130b85
Update dataset_plot.py
Illviljan 89515ef
Update facetgrid.py
Illviljan a7ee9f6
move some funcs to utils
Illviljan 450c075
add the funcs to the moved place
Illviljan d70184a
Merge branch 'main' into remove_dataset_scatter
Illviljan 5efcf12
various bugfixes
Illviljan ac60266
improve ds to da wrapper
Illviljan d33a8da
Filter kwargs
Illviljan c17a9bd
normalize args to be able to filter the correct args
Illviljan d6f2a10
Update plot.py
Illviljan a1ecc96
Update plot.py
Illviljan c2a7bae
Update dataset_plot.py
Illviljan 2d06afa
Some fixes to string colorbar
Illviljan 5c1fec0
Update plot.py
Illviljan 0acb212
Check if hue is str
Illviljan 087d789
Fix some failing tests
Illviljan cc572d2
Update dataset_plot.py
Illviljan d197c1f
Merge branch 'main' into remove_dataset_scatter
Illviljan 6568963
Add more relevant params higher up
Illviljan 579d2d9
Merge branch 'main' into remove_dataset_scatter
Illviljan 05c30ae
use hue in facetgrid, normalize data
Illviljan 4a8d8fe
Update plot.py
Illviljan bdff764
Move parts of scatter to a decorator
Illviljan e28ab8f
Merge branch 'main' into remove_dataset_scatter
Illviljan bf43580
Update plot.py
Illviljan 9cb9fcd
Update plot.py
Illviljan e075a1f
Merge branch 'main' into remove_dataset_scatter
Illviljan e879a44
get scatter to work with decorator
Illviljan e970ce9
use correct name
Illviljan 8cd9438
Add a Normalize class
Illviljan 861b677
Merge branch 'main' into remove_dataset_scatter
Illviljan fb8a19e
skip use of Literal
Illviljan 172b05d
remove test code
Illviljan b95bda6
fix lint errors
Illviljan bc4dc89
more linting fixes
Illviljan 2d8f2d8
doctests fixing
Illviljan 31230b5
Merge branch 'main' into remove_dataset_scatter
Illviljan 5f1aeb7
Update utils.py
Illviljan 2876920
Update plot.py
Illviljan e902bca
Update utils.py
Illviljan f118fca
Update plot.py
Illviljan 0c3c49b
Update facetgrid.py
Illviljan 3d77461
revert some old ideas
Illviljan 358d788
Update utils.py
Illviljan f6eec55
Update plot.py
Illviljan cb7d7df
trim unused code
Illviljan a0694a3
use to_numpy instead
Illviljan 96c9d55
more pint compats
Illviljan 3e042c1
Merge branch 'main' into remove_dataset_scatter
Illviljan f610676
Merge branch 'main' into remove_dataset_scatter
Illviljan e9de8d3
work on facetgrid legends
Illviljan 7c3d29e
Merge branch 'main' into remove_dataset_scatter
Illviljan a697d10
Merge branch 'main' into remove_dataset_scatter
Illviljan 53a1715
facetgrid colorbar tweaks
Illviljan 881365d
Merge branch 'main' into remove_dataset_scatter
Illviljan 48c0cde
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] a10d4ce
Merge branch 'main' into remove_dataset_scatter
Illviljan 154c4b9
Merge branch 'main' into remove_dataset_scatter
Illviljan a907832
Merge branch 'main' into remove_dataset_scatter
Illviljan 8a7953e
Categoricals starts on 1 and is bounded 0,2
Illviljan 8eee758
Handle None in Normalize
Illviljan b341236
Fix labels
Illviljan ac06a5d
Merge branch 'main' into remove_dataset_scatter
Illviljan 9c7f787
Update plot.py
Illviljan d3afaf0
determine guide
Illviljan 9789340
Merge branch 'main' into remove_dataset_scatter
Illviljan 9828274
fix plt
Illviljan 4791adf
Update facetgrid.py
Illviljan 6ba3fbc
Don't be able to plot empty legends
Illviljan 31a6d4f
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 69766be
try out linecollection so lines behaves similar to scatter
Illviljan e35d0d9
linecollections half working
Illviljan c7c7483
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 5464544
Update utils.py
Illviljan 817a4bb
Update plot.py
Illviljan 1fa025e
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 1961bb7
A few variations of linecollection
Illviljan 4ff6d9f
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] d4fd066
Update plot.py
Illviljan 12924fc
Merge branch 'main' into remove_dataset_scatter
Illviljan 15b970d
line to utils
Illviljan 41cd57a
Merge branch 'main' into remove_dataset_scatter
Illviljan a58e595
line plot changes
Illviljan 6501393
Merge branch 'main' into remove_dataset_scatter
Illviljan ecc7d7c
reshape to get hues working
Illviljan ce4af29
Merge branch 'main' into remove_dataset_scatter
Illviljan d227bb3
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 5fb6cf6
line edits legend not nice on line plots yet
Illviljan 8f74c18
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] b4bdb66
Update tutorial.py
Illviljan 76ea202
Merge branch 'remove_dataset_scatter' of https://github.com/Illviljan…
Illviljan dab55fc
doc changes, tuple to dict
Illviljan 783f3cc
nice line plots and working legend
Illviljan 101a03a
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 8a1b310
comment out some variants
Illviljan 475473b
Merge branch 'remove_dataset_scatter' of https://github.com/Illviljan…
Illviljan cd8d722
some cleanup
Illviljan a70ae67
Guess some dims if they weren't defined
Illviljan 8978648
None is supposed to pass as well
Illviljan e6b3c2c
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] d995745
make precommit happy
Illviljan 7882668
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] f9c5aa6
Update plot.py
Illviljan 9ef1a90
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 80956b0
add hist, step
Illviljan 87498e0
handle step using repeat, remove pint errors
Illviljan a945b21
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] cd26332
handle pint
Illviljan a38d95c
fix some tests
Illviljan 589c61e
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 263d21b
Merge branch 'main' into remove_dataset_scatter
Illviljan ca77598
use isel instead to be independent of categoricals or not
Illviljan b9bb100
allow multiple primitives and filter duplicates
Illviljan a4e5b14
Update test_plot.py
Illviljan eb4264c
Copy data inside instead at init.
Illviljan caa9485
Histograms has counted values along y, switch around x and y labels.
Illviljan 58c32f8
output as numpy array
Illviljan e490ec8
histogram outputs primitive only
Illviljan 8ed977c
Merge branch 'main' into remove_dataset_scatter
Illviljan 59212d4
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 43a86a0
Merge branch 'main' into remove_dataset_scatter
Illviljan 088bb87
Update utils.py
Illviljan 1f87e66
Merge branch 'main' into remove_dataset_scatter
Illviljan 69ee60a
Merge branch 'main' into remove_dataset_scatter
Illviljan 9ab511d
Merge branch 'main' into remove_dataset_scatter
Illviljan 5d9d37d
Update facetgrid.py
Illviljan fa21c40
use add_labels inputs, explicit indexes now handles attrs
Illviljan 76b7e90
colorbar in correct position
Illviljan e164eee
Update plot.py
Illviljan 77fefd8
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] cb2c5ca
Merge branch 'main' into remove_dataset_scatter
Illviljan a09d933
Avoid always stacking
Illviljan 8ffc404
linecollection fixes
Illviljan 91808f7
Merge branch 'main' into remove_dataset_scatter
Illviljan ff419d1
Update plot.py
Illviljan 7454372
Merge branch 'main' into remove_dataset_scatter
Illviljan d1ee8f6
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 0f6d2fb
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 1023f5d
Merge branch 'main' into remove_dataset_scatter
Illviljan ca921b7
Merge branch 'main' into remove_dataset_scatter
Illviljan 5e8ce16
use mpls step functions
Illviljan 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
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
Oops, something went wrong.
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.
That feels a bit brittle. What if
extend="both"
andds.both
exists?Uh oh!
There was an error while loading. Please reload this page.
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.
Good spot! Any ideas how to get around this?
This part adds the dataarrays to coords. So if extend had a name matching a dataarray then we would have one "unnecessary" coord that wouldn't be used in the plotfuncs.
This could be costly if it for example was a large dask array being computed but hopefully not the end of the world/RAM.
One idea is to maintain a list of keyword arguments that can have variable names. I don't think it's especially elegant, and what to do with unnamed arguments?
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.
Maybe a list of arguments and passing
locals()
instead ofargs
andkwargs
? Not a beauty either...