Skip to content

Commit

Permalink
Merge pull request #1 from holoviz/main
Browse files Browse the repository at this point in the history
Merge from main
  • Loading branch information
iuryt authored Sep 9, 2024
2 parents 426d531 + fe81978 commit 0fb801d
Show file tree
Hide file tree
Showing 19 changed files with 388 additions and 148 deletions.
4 changes: 0 additions & 4 deletions .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,6 @@ jobs:
run: |
echo "Deploying from ref ${GITHUB_REF#refs/*/}"
echo "tag=${GITHUB_REF#refs/*/}" >> $GITHUB_OUTPUT
- name: bokeh sampledata
run: bokeh sampledata
- name: install dev nbsite
run: pip install --pre -U nbsite
- name: conda info
Expand Down Expand Up @@ -115,8 +113,6 @@ jobs:
run: |
echo "Deploying from ref ${GITHUB_REF#refs/*/}"
echo "tag=${GITHUB_REF#refs/*/}" >> $GITHUB_OUTPUT
- name: bokeh sampledata
run: bokeh sampledata
- name: build docs
run: sphinx-build -b html doc builtdocs
- name: report failure
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ jobs:
- name: conda list
run: conda list
- name: bokeh sampledata
if: ${{ matrix.python-version == '3.9'}}
run: bokeh sampledata
- name: unit tests
run: pytest -v hvplot --cov=hvplot --cov-append
Expand Down Expand Up @@ -162,6 +163,7 @@ jobs:
- name: pip list
run: pip list
- name: bokeh sampledata
if: ${{ matrix.python-version == '3.9'}}
run: bokeh sampledata
- name: unit tests
run: pytest -v hvplot --cov=hvplot --cov-append
Expand Down
22 changes: 21 additions & 1 deletion doc/conftest.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
import dask
from importlib.util import find_spec

import dask

from packaging.version import Version
from bokeh.io.webdriver import webdriver_control


collect_ignore_glob = [
'user_guide/Streaming.ipynb',
]
Expand Down Expand Up @@ -45,3 +49,19 @@
# From Dask 2024.3.0 they now use `dask_expr` by default
# https://github.com/dask/dask/issues/10995
dask.config.set({'dataframe.query-planning': False})


# https://github.com/pydata/xarray/pull/9182
try:
import xarray as xr
except ImportError:
pass
else:
import numpy as np

if Version(np.__version__) >= Version('2.0.0') and Version(xr.__version__) <= Version(
'2024.6.0'
):
collect_ignore_glob += [
'user_guide/Gridded_Data.ipynb',
]
2 changes: 1 addition & 1 deletion doc/getting_started/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ or with `pip`:

pip install hvplot

For versions of `jupyterlab>=3.0` the necessary extension is automatically bundled in the `pyviz_comms` package, which must be >=2.0. However note that for version of `jupyterlab<3.0` you must also manually install the JupyterLab extension with:
Note that `hvplot` needs to run in a Jupyter environment to automatically show output plots. However, if you are using a raw Python or IPython console, it is still possible to [show the plots](https://hvplot.holoviz.org/user_guide/Viewing.html#python-command-prompt-scripts) with `hvplot.show()` or [save the plots](https://hvplot.holoviz.org/user_guide/Viewing.html#saving-plots) even if you cannot view them interactively. For versions of `jupyterlab>=3.0` the necessary extension is automatically bundled in the `pyviz_comms` package, which must be >=2.0. However note that for version of `jupyterlab<3.0` you must also manually install the JupyterLab extension with:

conda install jupyterlab
jupyter labextension install @pyviz/jupyterlab_pyviz
Expand Down
File renamed without changes.
14 changes: 14 additions & 0 deletions doc/user_guide/Customization.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,16 @@
" hover_cols (default=[]): list or str\n",
" Additional columns to add to the hover tool or 'all' which will\n",
" includes all columns (including indexes if use_index is True).\n",
" hover_tooltips list[str] or list[tuple]:\n",
" A list of dimensions to be displayed in the hover tooltip. See\n",
" [HoloViews docs](https://holoviews.org/user_guide/Plotting_with_Bokeh.html#hover-tools)\n",
" or [Bokeh docs](https://docs.bokeh.org/en/latest/docs/user_guide/interaction/tools.html#hovertool)\n",
" for more info on structuring.\n",
" hover_formatters:\n",
" A dict of formatting options for the hover tooltip.\n",
" hover_mode (default='mouse'):\n",
" The hover mode determines how the hover tool is activated;\n",
" select from 'mouse', 'vline', or 'hline'.\n",
" invert (default=False): boolean\n",
" Swaps x- and y-axis\n",
" frame_width/frame_height: int\n",
Expand Down Expand Up @@ -104,6 +114,10 @@
" rot: number\n",
" Rotates the axis ticks along the x-axis by the specified\n",
" number of degrees.\n",
" subcoordinate_y: bool or dict\n",
" Whether to enable sub-coordinate y systems for this plot. Accepts also a\n",
" dictionary of related options to pass down to HoloViews,\n",
" e.g. `{'subcoordinate_scale': 2}`.\n",
" shared_axes (default=True): boolean\n",
" Whether to link axes between plots\n",
" transforms (default={}): dict\n",
Expand Down
27 changes: 27 additions & 0 deletions doc/user_guide/Timeseries_Data.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
"metadata": {},
"outputs": [],
"source": [
"import numpy as np\n",
"import hvplot.pandas # noqa\n",
"from bokeh.sampledata.sea_surface_temperature import sea_surface_temperature as sst\n",
"\n",
Expand Down Expand Up @@ -84,6 +85,32 @@
"sst.hvplot(autorange=\"y\")"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Subcoordinate y-axis\n",
"\n",
"hvPlot enables you to create overlays where each element has its own distinct y-axis subcoordinate system, which is particularly useful to analyse multiple timeseries. To activate this feature that automatically distributes overlay elements along the y-axis, set the `subcoordinate_y` keyword to `True`. `subcoordinate_y` also accepts a dictionary of related options, for example set `subcoordinate_y={'subcoordinate_scale': 2}` to increase the scale of each sub-plot, resulting in each curve's vertical range overlapping 50% with its adjacent elements. Additionally, the y-axis wheel-zoom will apply to each curve's respective sub-coordinate y-axis, rather than the global coordinate frame. More information about this feature can be found in [HoloViews' documentation](https://holoviews.org/user_guide/Customizing_Plots.html#subcoordinate-y-axis)."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"For demonstration purposes, we'll temporarily add a new column of 'sensors' that splits up the temperature data into several series."
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"sensor = np.random.choice(['s1', 's2', 's3', 's4'], size=len(sst))\n",
"sst.assign(sensor=sensor).hvplot(by='sensor', subcoordinate_y=True)"
]
},
{
"cell_type": "markdown",
"metadata": {},
Expand Down
1 change: 1 addition & 0 deletions envs/py3.10-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ channels:
dependencies:
- python=3.10
- bokeh>=3.1
- bokeh_sampledata
- cartopy
- colorcet>=2
- dask
Expand Down
1 change: 1 addition & 0 deletions envs/py3.11-docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ channels:
dependencies:
- python=3.11
- bokeh>=3.1
- bokeh_sampledata
- cartopy
- colorcet>=2
- dask>=2021.3.0
Expand Down
1 change: 1 addition & 0 deletions envs/py3.11-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ channels:
dependencies:
- python=3.11
- bokeh>=3.1
- bokeh_sampledata
- cartopy
- colorcet>=2
- dask
Expand Down
1 change: 1 addition & 0 deletions envs/py3.12-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ channels:
dependencies:
- python=3.12
- bokeh>=3.1
- bokeh_sampledata
- cartopy
- colorcet>=2
- dask
Expand Down
Loading

0 comments on commit 0fb801d

Please sign in to comment.