epsproc.plot.hvPlotters module¶
ePSproc plotting functions with Holoviews + Bokeh.
Aim: simple plotters for different datatypes, interactive in Jupyter Notebook + HTML formats.
15/07/20 Debugged, still pretty basic but running. 05/07/20 v1 in development.
See
- https://epsproc.readthedocs.io/en/dev/tests/basicPlotting_dev_XC_030720.html
- Plotting test notebooks (/tests/plottingDev) for more.
- Dev code: http://localhost:8888/notebooks/github/ePSproc/epsproc/tests/plottingDev/basicPlotting_dev_280620.ipynb
Todo
- Plotting style mapping & options. Currently having HV issues here.
- Currently set only for XC datatypes from single dataSet, will want to enable stacking etc. here.
- Errorbar or spread plots, currently having issues getting these working for multidim data.
-
epsproc.plot.hvPlotters.
XCplot
(dataXS, lineDashList={'L': 'dashed', 'M': 'solid', 'V': 'dashed'})[source]¶ Plot XC data using Holoviews.
Currently optional stuff hard-coded here, will produce plots [sigma, beta] showing all data. Rather crude, needs some more style mapping.
Parameters: - dataXS (Xarray) – Xarray dataarray containing XC data in standard format.
- lineDashList (dict, optional, default = {'L': 'dashed', 'M': 'solid', 'V': 'dashed'}) – Set line types for calculation gauge.
Returns: layout
Return type: hv object
Examples
>>> plotObj, _,_ = XCplot(dataXS[0]) >>> plotObj
-
epsproc.plot.hvPlotters.
hvdsConv
(dataXS)[source]¶ Basic conversion for XS data from Xarray to Holoviews.
This will drop stacked Sym dims, and sum of Total to reduce - may not be appropriate in all cases?
-
epsproc.plot.hvPlotters.
setPlotters
(hvBackend='bokeh', width=500)[source]¶ Set some plot options - Seaborn style + HV defaults.
May have some issues with scope here - TBC. Should just run on function import?
Update: now moved to module import.
Parameters: - hvBackend (str or list of strs, optional, default = 'bokeh') – Backend(s) for holoviews to load. Can call bokeh, matplotlib or plotly
- width (int, optional, default = 500) – Setting for plot width, in pixels.