Note that this package is now deprecated with the advent of hvPlot https://hvplot.pyviz.org/
- 'intelligent' resizing and activation of tools in addition to grid lines
- a straightforward method of saving to file
.apply(plot, 'name_of_file')
- immediate application of a minimalistic style to plots
- keywords like
xlim
,ylim
,xlabel
,ylabel
,title
can be used - user forgiving parsing of toolbar and legend locs
- automatic discretization of color bars
- color maps (color tables) from NCAR Command Language (NCL)
- And more!
Here's some motivation to get started!
curves = hv.Curve(df, 'day', 'min_temp_f', label='Max Temp', group='KCMI') * \
hv.Curve(df, 'day', 'max_temp_f', label='Min Temp', group='KCMI')
curves # curve without mod
from holoext.xbokeh import Mod
Mod().apply(curves)
This automatically increases figure size, applies a minimalistic look, and adds the hover tool, albeit hidden in the toolbar.
However, these mods are not fixed in stone; you can easily adjust it:
Mod(width=300, height=300, tools='default')
If you would like to show the hover tool in the toolbar, it's easily done too:
Mod(show_hover=True)
mod_curves = Mod(
xlabel='Date', ylabel='Temperature [F]',
tools=['xpan', 'xwheel_zoom', 'save', 'reset', 'hover']
).apply(curves, save='html_output/kcmi_2016_2017_temps')
mod_curves
Check out the gallery to see it work for all types of plots like these!
Method 1
pip install holoext
- Ensure your packages version (
pip list
) match with ones listed in requirements.txt
Method 2
- Type
git clone https://github.com/ahuang11/holoext
- Go into holoext folder (where setup.py is)
- Type
pip install -e .