-
Notifications
You must be signed in to change notification settings - Fork 9
Feature/plotting dataset first #438
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 all commits
Commits
Show all changes
176 commits
Select commit
Hold shift + click to select a range
cc7de38
Feature/398 feature facet plots in results (#419)
FBumann fedd6b6
Feature/398 feature facet plots in results heatmaps (#418)
FBumann 84aa03d
Feature/398 feature facet plots in results charge state (#417)
FBumann 51da844
Fix Error handling in plot_heatmap()
FBumann b94f223
Feature/398 feature facet plots in results pie (#421)
FBumann b2b8eb7
6. Optimized time-step check
FBumann c747faf
Typo
FBumann bf4e33d
Improve type handling
FBumann 0c5764c
Update other tests
FBumann 59ada64
Handle backwards compatability
FBumann b56ed12
Add better error messages if both new and old api are used
FBumann 980d7de
Add old api explicitly
FBumann 9aea60e
Add old api explicitly
FBumann 922a95f
Improve consistency and properly deprectae the indexer parameter
FBumann bd88fb1
Remove amount of new tests
FBumann f156d3a
Remove amount of new tests
FBumann ab9e4a8
Fix CONTRIBUTING.md
FBumann a77b942
Remove old test file
FBumann 18ba271
Add tests/test_heatmap_reshape.py
FBumann 894533c
Add tests/test_heatmap_reshape.py
FBumann 30ab7ec
Remove unused method
FBumann 4763c29
- Implemented dashed line styling for "mixed" variables (variables …
FBumann e180e88
- Added fill parameter to module-level plot_heatmap function (line …
FBumann 9c3c580
- Added np.random.seed(42) for reproducible test results
FBumann 5938829
Improve Error Message if too many dims for matplotlib
FBumann 33cd72a
Improve Error Message if too many dims for matplotlib
FBumann 505edca
Improve Error Message if too many dims for matplotlib
FBumann 33c4bec
Rename _apply_indexer_to_data() to _apply_selection_to_data()
FBumann b37dc6a
Bugfix
FBumann 9ce25ab
Update CHANGELOG.md
FBumann bbad6cb
Catch edge case in with_plotly()
FBumann 92d0590
Add strict=True
FBumann ae05346
Improve scenario_example.py
FBumann 904be27
Improve scenario_example.py
FBumann 2c8bd7f
Change logging level in essage about time reshape
FBumann 55dfde9
Update CHANGELOG.md
FBumann 770615c
Add XarrayColorMapper
FBumann f1a395f
Add XarrayColorMapper to CalculationResults
FBumann 00010af
Renamed variable
FBumann 0e42a17
Add test file
FBumann 2aeecd8
Improve integration of the ColorMapper
FBumann 3c1a9c0
Improve integration of the ColorMapper
FBumann 8c2c933
Update resolve_colors and move to plotting.py
FBumann 0644e9f
Temporalily add example script to show/document intended usage
FBumann 78e1894
Add method create_color_mapper
FBumann 3d4788a
Improve docstring
FBumann 60c44a9
Remove example file again
FBumann a269ed7
Update CHANGELOG.md
FBumann c4a675c
Add create_color_mapper to SegmentedResults
FBumann 60bc43b
Add create_color_mapper to complex_example
FBumann f5cc7ab
Missed some renames
FBumann 601f849
Fix warning in plot_charge_state()
FBumann 9ad5c24
Allow for discrete color assignments with rules
FBumann ced84d4
Remove some half baked validation
FBumann 7ac3781
Add more color families
FBumann 483b8df
Use 1:7 colors for more distinct colors
FBumann 6a5293c
Add color mapper to complex example
FBumann 2589819
Update CHANGELOG.md
FBumann b83fc4e
Merge remote-tracking branch 'origin/main' into feature/plotting-colors
FBumann 26d27b6
Convert numpy style docstrings to google style
FBumann 78c59d1
Use re.search instead of re.match
FBumann f6b31fb
Update tests
FBumann 567c6a0
Applying ordering to Dataset as well
FBumann 35b6259
This approach:
FBumann e4c104e
Improve Error Message
FBumann 565ef26
Enable sorting fpr Datasets
FBumann 211a743
completed the integration of XarrayColorMapper into both with_plotly …
FBumann 8033aed
simplified with_matplotlib significantly
FBumann 1017238
Update plotting methods to focus on xr.DataArray only
FBumann 329876e
Remove duplication
FBumann a536809
Remove duplication
FBumann 5972ffe
Make check faster
FBumann 67672ec
Make check faster
FBumann 0c2bac4
Make check faster
FBumann d26ed42
Fixx plotting issues
FBumann aad4fb4
Switch back to Dataset first
FBumann 83c1b1d
Remove redundant code
FBumann e275f4e
XarrayColorMapper is now Dataset-only!
FBumann 7623285
Update tests accordingly
FBumann 5d8d83d
Fix issue in aggregation.py with new plotting
FBumann fc81107
Fix issue plotting in examples (using dataframes)
FBumann 6a7b639
Fix issue plotting in examples (using dataframes)
FBumann 5b40a2a
Fix issue plotting scalar Datasets
FBumann 988aa10
Improve labeling of plots
FBumann 0e5baf0
Improve handling of time reshape in plots
FBumann 764b1c2
Update usage of plotting methods
FBumann e9bbe11
Update pie plots to use Dataset instead of DataFrame
FBumann 53c1259
Makde charge state line in plots black always
FBumann a0d958b
Improve examples
FBumann ee3b528
Make plotting methods much more flexible
FBumann 695d259
Add test
FBumann 790c0fc
Add plotting kwargs to plotting functions
FBumann 0249d60
add imshow kwargs
FBumann a207242
Fix nans in plots
FBumann e4c5a46
Replace XarrayColorMapper with ComponentColorManager
FBumann a583240
Add repr and str method
FBumann f9c28e5
Added tests
FBumann 7f6d875
Add caching to ColorManager
FBumann 6e6997f
Test caching
FBumann 9f8fa1c
Change default colormap and improve colormap settings
FBumann 7b436f1
Automatically initiallize the ColorManager
FBumann 7a8933e
Use Dark24 as the default colormap
FBumann 1861e69
Rename auto_group_components() to apply_colors()
FBumann 695228c
Use ColorManager in examples
FBumann 66185d3
Fix tests
FBumann 97c1b85
Extend config to cover plotting settings
FBumann d9606be
Centralize behaviour
FBumann 606e81b
More config options
FBumann 54f2d1b
More config options
FBumann fbe491a
More config options
FBumann 46ed8ca
Rename config parameter
FBumann 0211ef9
Improve color defaults
FBumann 1e72171
Removed 'auto' and Simplified Color Resolution
FBumann c0c792f
Fix ColorProcessor to accept qualitative colorscales
FBumann 6612157
Fix ColorProcessor to accept qualitative colorscales
FBumann 6bcee9c
Remove old test
FBumann cd650a0
Simplified tests
FBumann 009e740
Update examples and CHANGELOG.md
FBumann 07fbad8
Update method name
FBumann d95056e
Update examples
FBumann eb6b996
extended ComponentColorManager to support flow-level color distinctio
FBumann a56d207
Change default flow shading
FBumann 043e408
Improve Setup_colors
FBumann 97c5c19
Use external dependency for color handling
FBumann f20652f
Make colour dependency optional
FBumann 4092a73
streamlined the ColorManager configuration API
FBumann 1ea66e4
streamlined the ColorManager configuration API
FBumann a5f43a5
Update usages of new api
FBumann cd5146e
Merge remote-tracking branch 'refs/remotes/origin/main' into feature/…
FBumann 5e6e628
Update CHANGELOG.md
FBumann 8592e07
Update examples
FBumann 5ea9bf4
use turbo as the new default sequential colormap
FBumann 93bd4fb
Add support for direct mappings of components
FBumann 684e0c8
Add support for direct mappings of components
FBumann 43a9196
Add configurable flow_variation
FBumann 837f70a
Update tests
FBumann 4c58cbb
Make color getter mroe robust
FBumann cf97881
Make color getter mroe robust
FBumann 2836aa2
Temp
FBumann c634da7
Update default colormap
FBumann d109bf8
Update default colormap to default colorscale
FBumann 1bbee1b
Update default Improve colorscale handling
FBumann c921859
Update default color families
FBumann e455c6f
Update plotly template
FBumann 1192caa
Update example
FBumann 617b77f
Simplify test
FBumann e1ac8a0
Update color family defaults
FBumann 6cf8851
Simplify documentation
FBumann f8bcf60
Typo
FBumann b4ef8c2
Make matplotlib backend switch more robst
FBumann f52eae0
Update setup_colors() in SegmentedCalculationResults
FBumann ab2957e
Fix example
FBumann 5c0e398
Update CHANGELOG.md
FBumann c583c42
Simplify export_figure()
FBumann 0d2b8ae
Merge remote-tracking branch 'origin/main' into feature/plotting-colors
FBumann 67cb5a1
Update Examples and CHANGELOG.md
FBumann a01a7e2
Simplified Config
FBumann c636bd9
Simplified Colormanagement
FBumann f7ee19f
Simplified Colormanagement
FBumann 950f8e0
Simplified Colormanagement
FBumann 31a3cc6
Add element name itself to color dict
FBumann 87608b0
Fix examples
FBumann c958c4c
Bugfix
FBumann 309ecfa
Bugfix
FBumann 09ddf80
Remove coloring related stuff
FBumann 2921ff3
Reverse color and CONFIG related changes in plotting.py
FBumann b4584d4
Reverse color and CONFIG related changes in plotting.py
FBumann ac62b87
Reverse color and CONFIG related changes in plotting.py
FBumann a96fd80
Reverse color and CONFIG related changes in plotting.py
FBumann 3793fbe
Reverse color and CONFIG related changes in plotting.py
FBumann 407aa79
Update CHANGELOG.md
FBumann 33bcd3b
Update CHANGELOG.md
FBumann 8274162
Remove duplicate resolve color calls
FBumann 34b9a75
Improve pie plot
FBumann 2e06d44
Simplify pie plot
FBumann 0d857f0
Simplify pie plot
FBumann 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
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.
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.
🧩 Analysis chain
Verify DataFrame index structure for xarray conversion.
The explicit
to_xarray()calls convert pandas DataFrames to xarray Datasets before passing them toplotting.with_plotly. Sincewith_plotlyaccepts bothxr.Dataset | pd.DataFrameand has internal conversion logic, ensure that:self.original_dataandself.aggregated_data) is properly named (e.g., 'time') for correct xarray dimension naming.with_plotlyrequires, or clarify whether the internal conversion inwith_plotlywould handle DataFrames differently.Run the following script to verify the DataFrame structure and resulting xarray conversion:
Also applies to: 156-156
🏁 Script executed:
Length of output: 1032
🏁 Script executed:
Length of output: 248
🏁 Script executed:
Length of output: 3063
🏁 Script executed:
Length of output: 5776
Remove redundant explicit
.to_xarray()calls — pass DataFrames directly towith_plotly.The explicit
.to_xarray()conversions at lines 153 and 156 are unnecessary. Thewith_plotlyfunction already handles DataFrame-to-Dataset conversion internally via_ensure_dataset()(line 473 inplotting.py), which calls.to_xarray()on DataFrames automatically. Passing DataFrames directly simplifies the code without changing behavior:instead of:
Apply this change to both lines 153 and 156.
🤖 Prompt for AI Agents