HoloPlot Announcement
A high-level plotting API for the PyData ecosystem built on HoloViews.
We are very pleased to announce the public release of a new library called HoloPlot, which is closely modeled on the pandas plot API but is designed to work with a number of libraries:
idx = pd.date_range('1/1/2000', periods=1000)
df = pd.DataFrame(np.random.randn(1000, 4), index=idx, columns=list('ABCD')).cumsum()
df.plot()
columns = ['Burglary rate', 'Larceny-theft rate', 'Robbery rate', 'Violent Crime rate']
crime.plot.violin(y=columns, group_label='Type of crime', value_label='Rate per 100k')
Installation¶
HoloPlot supports Python 2.7, 3.5, 3.6 and 3.7 on Linux, Windows, or Mac and can be installed with conda:
conda install -c pyviz holoplot
or with pip:
pip install holoplot
For JupyterLab support, the jupyterlab_holoviews extension is also required::
jupyter labextension install @pyviz/jupyterlab_holoviews
Usage¶
The simplest way of using HoloPlot is by importing the appropriate module, which will patch the corresponding library. For example to replace the pandas plot interface with holoplot simply run:
import holoplot.pandas
Alternatively a more explicit way to patch the library is to call the patch
method:
holoplot.patch('pandas')
Finally HoloPlot may be used without any patching by wrapping the data in a HoloPlot object:
plot = holoplot.HoloPlot(df)
plot()
Streaming Plots¶
from streamz.dataframe import Random
import holoplot.streamz
streaming_df = Random(freq='5ms')
streaming_df.plot(backlog=100, height=400, width=500) +\
streaming_df.plot.hexbin(x='x', y='z', backlog=2000, height=400, width=500)
Gridded data¶
air_ds = xr.tutorial.load_dataset('air_temperature')
air_ds.air.isel(time=slice(0, 100, 20)).plot(colorbar=False, col='time', width=200, height=150, xaxis=False, yaxis=False)
holoplot.scatter_matrix(iris, c="species")
Roadmap¶
HoloPlot is a very young library and still under active development.
- Improved support for geographic plots including geopandas
- Stabilize API