Skip to content

Renamed API from .plot to .holoplot #20

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

Merged
merged 4 commits into from
Jun 4, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions doc/homepage.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"source": [
"## Usage\n",
"\n",
"HoloPlot replaces the static PNG-based plotting that comes with [Pandas](http://pandas.pydata.org) and other data libraries with interactive [Bokeh](http://bokeh.pydata.org)-based plotting that supports panning, zooming, hovering, and clickable/selectable legends:"
"HoloPlot provides an alternative for the static plotting API provided by [Pandas](http://pandas.pydata.org) and other libraries, with an interactive [Bokeh](http://bokeh.pydata.org)-based plotting API that supports panning, zooming, hovering, and clickable/selectable legends:"
]
},
{
Expand All @@ -39,7 +39,7 @@
"df = pd.DataFrame(np.random.randn(1000, 4), index=idx, columns=list('ABCD')).cumsum()\n",
"\n",
"import holoplot.pandas\n",
"df.plot()"
"df.holoplot()"
]
},
{
Expand Down Expand Up @@ -99,8 +99,8 @@
"\n",
"streaming_df = Random(freq='5ms') \n",
"\n",
"streaming_df.plot(backlog=100, height=400, width=500) +\\\n",
"streaming_df.plot.hexbin(x='x', y='z', backlog=2000, height=400, width=500);"
"streaming_df.holoplot(backlog=100, height=400, width=500) +\\\n",
"streaming_df.holoplot.hexbin(x='x', y='z', backlog=2000, height=400, width=500);"
]
},
{
Expand Down Expand Up @@ -128,7 +128,7 @@
"\n",
"air_temp = load_dataset('air_temperature').air\n",
"\n",
"air_temp.isel(time=slice(0, 3)).plot(groupby='time', cmap='viridis', dynamic=False, width=500, height=300)"
"air_temp.isel(time=slice(0, 3)).holoplot(groupby='time', cmap='viridis', dynamic=False, width=500, height=300)"
]
},
{
Expand Down
28 changes: 14 additions & 14 deletions examples/user_guide/Gridded_Data.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
"outputs": [],
"source": [
"air1d = air.isel(lat=10, lon=10)\n",
"air1d.plot()"
"air1d.holoplot()"
]
},
{
Expand All @@ -62,7 +62,7 @@
"outputs": [],
"source": [
"air1d_sel = air1d.isel(time=slice(0, 200))\n",
"air1d_sel.plot(color='purple') * air1d_sel.plot.scatter(marker='o', color='blue', size=15)"
"air1d_sel.holoplot(color='purple') * air1d_sel.holoplot.scatter(marker='o', color='blue', size=15)"
]
},
{
Expand All @@ -80,7 +80,7 @@
"metadata": {},
"outputs": [],
"source": [
"air.isel(lon=10, lat=[19, 21, 22]).plot.line()"
"air.isel(lon=10, lat=[19, 21, 22]).holoplot.line()"
]
},
{
Expand All @@ -96,7 +96,7 @@
"metadata": {},
"outputs": [],
"source": [
"air.isel(time=10, lon=[10, 11]).plot.line(y='lat', by='lon')"
"air.isel(time=10, lon=[10, 11]).holoplot.line(y='lat', by='lon')"
]
},
{
Expand All @@ -110,7 +110,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"By default the ``DataArray.plot()`` method generates an image if the data is two-dimensional."
"By default the ``DataArray.holoplot()`` method generates an image if the data is two-dimensional."
]
},
{
Expand All @@ -120,7 +120,7 @@
"outputs": [],
"source": [
"air2d = air.isel(time=500)\n",
"air2d.plot(width=400)"
"air2d.holoplot(width=400)"
]
},
{
Expand All @@ -136,7 +136,7 @@
"metadata": {},
"outputs": [],
"source": [
"air2d.plot.contour(width=400, levels=20) + air2d.plot.contourf(width=400, levels=4)"
"air2d.holoplot.contour(width=400, levels=20) + air2d.holoplot.contourf(width=400, levels=8)"
]
},
{
Expand All @@ -159,7 +159,7 @@
"metadata": {},
"outputs": [],
"source": [
"air.plot()"
"air.holoplot()"
]
},
{
Expand All @@ -175,7 +175,7 @@
"metadata": {},
"outputs": [],
"source": [
"air.plot.image(groupby='time', width=500)"
"air.holoplot.image(groupby='time', width=500)"
]
},
{
Expand All @@ -191,7 +191,7 @@
"metadata": {},
"outputs": [],
"source": [
"air.plot.line()"
"air.holoplot.line()"
]
},
{
Expand All @@ -214,7 +214,7 @@
"metadata": {},
"outputs": [],
"source": [
"air.sel(lat=[25, 50, 75], method='nearest').plot.kde('air', by='lat', alpha=0.5)"
"air.sel(lat=[25, 50, 75], method='nearest').holoplot.kde('air', by='lat', alpha=0.5)"
]
},
{
Expand All @@ -230,7 +230,7 @@
"metadata": {},
"outputs": [],
"source": [
"air.plot.violin('air', by='lat')"
"air.holoplot.violin('air', by='lat')"
]
},
{
Expand All @@ -250,8 +250,8 @@
"metadata": {},
"outputs": [],
"source": [
"air.plot.scatter('time', groupby=[], datashade=True, use_dask=True) *\\\n",
"air.plot.line('time', groupby=[], use_dask=True, color='indianred').aggregate(function=np.mean)"
"air.holoplot.scatter('time', groupby=[], datashade=True, use_dask=True) *\\\n",
"air.groupby('time').mean().holoplot.line('time', use_dask=True, color='indianred')"
]
},
{
Expand Down
14 changes: 7 additions & 7 deletions examples/user_guide/Introduction.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,9 @@
"source": [
"The result is a PNG image that displays easily, but is otherwise static.\n",
"\n",
"## HoloPlot .plot()\n",
"## .holoplot()\n",
"\n",
"If we instead change `%matplotlib inline` to `import holoplot.pandas`, the same call will now show an interactively explorable [Bokeh](http://bokeh.pydata.org) plot with panning, zooming, hovering, and clickable/selectable legends:"
"If we instead change `%matplotlib inline` to `import holoplot.pandas` and use the ``df.holoplot`` method, it will now display an interactively explorable [Bokeh](http://bokeh.pydata.org) plot with panning, zooming, hovering, and clickable/selectable legends:"
]
},
{
Expand All @@ -73,18 +73,18 @@
"source": [
"import holoplot.pandas\n",
"\n",
"df.plot()"
"df.holoplot()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"This interactive plot makes it much easier to explore the properties of the data, without having to write code to select ranges, columns, or data values manually.\n",
"This interactive plot makes it much easier to explore the properties of the data, without having to write code to select ranges, columns, or data values manually. Note that while pandas, dask and xarray all use the ``.holoplot`` method, ``intake`` uses HoloPlot as its main plotting API, which means that is available using ``.plot()``. \n",
"\n",
"## HoloPlot native API\n",
"\n",
"For the plot above, HoloPlot dynamically patched the Pandas `.plot()` method so that you can use the same `.plot()` syntax as with the Pandas default plotting. If you prefer to be more explicit, you can instead work directly with HoloPlot objects:"
"For the plot above, HoloPlot dynamically added the Pandas `.holoplot()` method, so that you can use the same syntax as with the Pandas default plotting. If you prefer to be more explicit, you can instead work directly with ``HoloPlot`` objects:"
]
},
{
Expand All @@ -93,11 +93,11 @@
"metadata": {},
"outputs": [],
"source": [
"import holoplot as hp\n",
"from holoplot import HoloPlot\n",
"import holoviews as hv\n",
"hv.extension('bokeh')\n",
"\n",
"plot = hp.HoloPlot(df)\n",
"plot = HoloPlot(df)\n",
"plot(y='A')"
]
},
Expand Down
Loading