Skip to content
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

Plotting routines #27

Open
3 tasks
phockett opened this issue Apr 30, 2020 · 14 comments
Open
3 tasks

Plotting routines #27

phockett opened this issue Apr 30, 2020 · 14 comments

Comments

@phockett
Copy link
Owner

phockett commented Apr 30, 2020

To do:

  • Better line plots - Holoviews with Bokeh back end? See tests in geometric_method_dev_low-level_E-fields_200320.ipynb, plus XeF2 test notebooks & old data processing notebooks.
  • Consolidate improved plotting routines for all Xarray objects.
  • Update modified Seaborn routines used in lmPlot(), this currently needs Seaborn==0.9.0
@phockett
Copy link
Owner Author

Improved XC plotting with Holoviews + Bokeh: https://epsproc.readthedocs.io/en/dev/tests/basicPlotting_dev_XC_030720.html

Functionalised version now in plot/hvPlotters.py

@phockett
Copy link
Owner Author

phockett commented Feb 3, 2021

Also: fix horrible plotting code now propagated and bodged into class functions. This is fragile depending on data type and dimensions. Needs unifying.

@phockett
Copy link
Owner Author

phockett commented Jan 14, 2022

Now added general curve plotting routine with Holoviews, see 6030520

Main routine is hvPlotters.curvePlot(). This needs to be further wrapped for specific common plots and class use.

Update: see https://epsproc.readthedocs.io/en/dev/tests/hvPlotters_fn_tests_150720_v250122.html for some usage examples.

Also: in many cases hvPlot() is easiest/quickest from Xarray, e.g. https://epsproc.readthedocs.io/en/dev/tests/hvPlotters_fn_tests_150720_v250122.html#hvPlot-pipeline

See also OCS dev work for simplified BLM plotter routine, may be better than current methods. https://phockett.github.io/ePSdata/OCS-preliminary/OCS_orbs8-11_AFBLMs_VM-ADMs_140122-JAKE_tidy.html#AFBLMs-for-aligned-case

UPDATE: also plotters in https://phockett.github.io/ePSdata/OCS-preliminary/OCS_orbs8-11_AFBLMs_VM-ADMs_140122-JAKE_tidy-replot-200722_v5.html

@phockett
Copy link
Owner Author

phockett commented Jan 27, 2022

Improved basicPlotters.BLMplot() routine and added Holoviews backend, see 6bcc112

TODO:

phockett added a commit that referenced this issue Apr 7, 2022
For Plotly display, see #27.

Not sure where the current versions arise from, frozen at first build?
@phockett
Copy link
Owner Author

phockett commented Apr 7, 2022

Fixed Plotly rendering issue in bfd3771 (updates sphinx_rtd_theme >= 1.0.0 in requirements-RTD.txt).

UPDATE 14/11/22: this is NOT working on dev branch docs, not sure why. HV rendering on latest (master) branch is OK however. May just need to force a clean build?

UPDATE 13/07/23: further testing on 3d-AFPAD-dev branch.

UPDATE 06/03/24:

@phockett
Copy link
Owner Author

phockett commented Aug 12, 2022

Quick hack fix for missing facetDims case for Plotly plotters in sphPlot.sphPlotPL() when calling from ep.classes.base.padPlot(). Pretty ugly however, and breaks subplots for 1D case - needs more work.

See 216cfd3

@phockett
Copy link
Owner Author

For some further dev and notes see recent MF recon manuscript notebooks, https://github.com/phockett/Extracting-Molecular-Frame-Photoionization-Dynamics-from-Experimental-Data/tree/submission050922#readme

@phockett
Copy link
Owner Author

phockett commented Nov 2, 2022

Implemented better HV backend for BLMplot() class version, see 5fcb027.

This needs some work, but improves/fixes previous implementation.

NOTE issue with (l,m) stacking introducing invalid coords, as per note at https://epsproc.readthedocs.io/en/dev/tests/hvPlotters_fn_tests_150720_v250122.html#BLMplot()-with-HV-backend. May have fixed this elsewhere? Combination of XR restack and Holoviews selection routines? Need to define mask or selectors on HV object?

@phockett
Copy link
Owner Author

Holoviews surface plotting

@phockett
Copy link
Owner Author

phockett commented Mar 14, 2023

Plotly PAD plotting routine updated with axes options in 1c8ea8c

  • Implements basic createAxesPL() routine.
  • Calls from sphPlotPL().

TODO: currently not allowing for all args to be passed, and now just plotting axes as default case. Need to implement global styling as note above (#27 (comment)) via dict per plotter or similar.

UPDATE 16/03/23: further improvements to Plotly plotting with facet options. Also allow for basic **kwargs passing from calling functions and class wrapper, as of b3ce530

UPDATE 12/07/23: modified fix for conditional only, otherwise may break computational-only function runs, see aaa13d4.

@phockett
Copy link
Owner Author

TODO: improve on last fix above by adding also "returnFlag" option to avoid forced plotting!

@phockett
Copy link
Owner Author

Matplotlib versions for MolPlot - currently fails for >v3.5. This sometimes gives cascaded errors in notebooks, and sometimes seems to only affect MolPlot output.

Ah, looks like issue is Arrow3D class, needs patching for Matplotlib >v3.5, see https://stackoverflow.com/a/74122407

TODO: add to ePSproc with conditional patching depending on MPL version.

@phockett
Copy link
Owner Author

Multijob .plotGetCroComp() working with Holoviews as of 16de8a3.

TODO: fix for Ehv use too, currently only working for Eke coords. For Ehv can't swap in restacked data, and if set and used pre-stacking end up with weird HVplot results due to NaNs/discontinuities in data. May have fixed this issue elsewhere already?

@phockett
Copy link
Owner Author

To fix: Holoviews implementation in self.padPlot (for base class) stacking bug - seems to sometimes fail to stack by label? Issue with Xarray ordering, or just random?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant