Skip to content
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

Unable to set color for Path rendered from Polygons #1412

Open
1 task done
philipc2 opened this issue Sep 12, 2024 · 8 comments
Open
1 task done

Unable to set color for Path rendered from Polygons #1412

philipc2 opened this issue Sep 12, 2024 · 8 comments

Comments

@philipc2
Copy link
Contributor

philipc2 commented Sep 12, 2024

Software Version Info

Software Version Info
accessible-pygments       0.0.5                    pypi_0    pypi
alabaster                 0.7.16                   pypi_0    pypi
antimeridian              0.3.6                    pypi_0    pypi
anyio                     4.4.0                    pypi_0    pypi
argon2-cffi               23.1.0                   pypi_0    pypi
argon2-cffi-bindings      21.2.0          py311h2bbff1b_0  
arrow                     1.3.0                    pypi_0    pypi
asttokens                 2.4.1                    pypi_0    pypi
asv                       0.6.4           py311hda3d55a_0    conda-forge
asv_runner                0.2.1              pyhd8ed1ab_0    conda-forge
async-lru                 2.0.4           py311haa95532_0  
attrs                     24.2.0                   pypi_0    pypi
aws-c-auth                0.7.25               he6981b3_4    conda-forge
aws-c-cal                 0.7.2                h0240d57_1    conda-forge
aws-c-common              0.9.25               h2466b09_0    conda-forge
aws-c-compression         0.2.18               h0240d57_8    conda-forge
aws-c-event-stream        0.4.2               h330dd76_20    conda-forge
aws-c-http                0.8.7                h065a16f_2    conda-forge
aws-c-io                  0.14.18              h3095dc9_2    conda-forge
aws-c-mqtt                0.10.4              h1efefa3_16    conda-forge
aws-c-s3                  0.6.4                h9116173_6    conda-forge
aws-c-sdkutils            0.1.19               h0240d57_0    conda-forge
aws-checksums             0.1.18               h0240d57_8    conda-forge
aws-crt-cpp               0.27.5               h55e8508_5    conda-forge
aws-sdk-cpp               1.11.379             h2205d66_2    conda-forge
babel                     2.16.0                   pypi_0    pypi
beautifulsoup4            4.12.3          py311haa95532_0  
bleach                    6.1.0              pyhd8ed1ab_0    conda-forge
blosc                     1.21.6               h85f69ea_0    conda-forge
bokeh                     3.4.2              pyhd8ed1ab_0    conda-forge
brotli                    1.1.0                hcfcfb64_1    conda-forge
brotli-bin                1.1.0                hcfcfb64_1    conda-forge
brotli-python             1.1.0           py311h12c1d0e_1    conda-forge
build                     1.2.1                    pypi_0    pypi
bzip2                     1.0.8                h2466b09_7    conda-forge
c-ares                    1.33.0               h2466b09_0    conda-forge
ca-certificates           2024.7.2             haa95532_0  
cached-property           1.5.2                hd8ed1ab_1    conda-forge
cached_property           1.5.2              pyha770c72_1    conda-forge
cachetools                5.4.0                    pypi_0    pypi
cartopy                   0.23.0          py311hcf9f919_1    conda-forge
certifi                   2024.7.4        py311haa95532_0  
cffi                      1.17.0          py311he736701_0    conda-forge
cfgv                      3.3.1              pyhd8ed1ab_0    conda-forge
cftime                    1.6.4           py311h0a17f05_0    conda-forge
chardet                   5.2.0                    pypi_0    pypi
charset-normalizer        3.3.2              pyhd8ed1ab_0    conda-forge
click                     8.1.7           win_pyh7428d3b_0    conda-forge
cloudpickle               3.0.0              pyhd8ed1ab_0    conda-forge
colorama                  0.4.6              pyhd8ed1ab_0    conda-forge
colorcet                  3.1.0              pyhd8ed1ab_0    conda-forge
comm                      0.2.2                    pypi_0    pypi
contourpy                 1.2.1           py311h005e61a_0    conda-forge
coverage                  7.6.1           py311he736701_0    conda-forge
cycler                    0.12.1             pyhd8ed1ab_0    conda-forge
cytoolz                   0.12.3          py311ha68e1ae_0    conda-forge
dask                      2024.8.0           pyhd8ed1ab_0    conda-forge
dask-core                 2024.8.0           pyhd8ed1ab_0    conda-forge
dask-expr                 1.1.10             pyhd8ed1ab_0    conda-forge
datashader                0.16.3             pyhd8ed1ab_0    conda-forge
debugpy                   1.8.5                    pypi_0    pypi
decorator                 5.1.1              pyhd3eb1b0_0  
defusedxml                0.7.1              pyhd3eb1b0_0  
distlib                   0.3.8              pyhd8ed1ab_0    conda-forge
distributed               2024.8.0           pyhd8ed1ab_0    conda-forge
docutils                  0.21.2                   pypi_0    pypi
exceptiongroup            1.2.2              pyhd8ed1ab_0    conda-forge
executing                 2.0.1                    pypi_0    pypi
fastjsonschema            2.20.0                   pypi_0    pypi
filelock                  3.15.4             pyhd8ed1ab_0    conda-forge
fonttools                 4.53.1          py311he736701_0    conda-forge
fqdn                      1.5.1                    pypi_0    pypi
freetype                  2.12.1               hdaf720e_2    conda-forge
fsspec                    2024.6.1           pyhff2d567_0    conda-forge
geopandas                 1.0.1                    pypi_0    pypi
geos                      3.12.2               h5a68840_1    conda-forge
geoviews                  1.12.0                   pypi_0    pypi
gmpy2                     2.1.5           py311h4963c0e_1    conda-forge
h11                       0.14.0                   pypi_0    pypi
h2                        4.1.0              pyhd8ed1ab_0    conda-forge
h5netcdf                  1.3.0              pyhd8ed1ab_0    conda-forge
h5py                      3.11.0          nompi_py311h67016bb_102    conda-forge
hdf4                      4.2.15               h5557f11_7    conda-forge
hdf5                      1.14.3          nompi_h2b43c12_105    conda-forge
holoviews                 1.19.1             pyhd8ed1ab_0    conda-forge
hpack                     4.0.0              pyh9f0ad1d_0    conda-forge
httpcore                  1.0.5                    pypi_0    pypi
httpx                     0.27.0                   pypi_0    pypi
hvplot                    0.1.dev706+ga7eb415          pypi_0    pypi
hyperframe                6.0.1              pyhd8ed1ab_0    conda-forge
identify                  2.6.0              pyhd8ed1ab_0    conda-forge
idna                      3.7                pyhd8ed1ab_0    conda-forge
imagesize                 1.4.1                    pypi_0    pypi
importlib-metadata        8.2.0              pyha770c72_0    conda-forge
importlib_metadata        8.2.0                hd8ed1ab_0    conda-forge
iniconfig                 2.0.0              pyhd8ed1ab_0    conda-forge
intel-openmp              2024.2.0           h57928b3_980    conda-forge
ipykernel                 6.29.5                   pypi_0    pypi
ipython                   8.26.0                   pypi_0    pypi
ipywidgets                8.1.3                    pypi_0    pypi
isoduration               20.11.0                  pypi_0    pypi
jedi                      0.19.1          py311haa95532_0  
jinja2                    3.1.4              pyhd8ed1ab_0    conda-forge
joblib                    1.4.2              pyhd8ed1ab_0    conda-forge
json5                     0.9.25             pyhd8ed1ab_0    conda-forge
jsonpointer               3.0.0                    pypi_0    pypi
jsonschema                4.23.0                   pypi_0    pypi
jsonschema-specifications 2023.12.1                pypi_0    pypi
jupyter-client            8.6.2                    pypi_0    pypi
jupyter-console           6.6.3                    pypi_0    pypi
jupyter-lsp               2.2.5                    pypi_0    pypi
jupyter-server            2.14.2                   pypi_0    pypi
jupyter-server-terminals  0.5.3                    pypi_0    pypi
jupyter_client            8.6.0           py311haa95532_0  
jupyter_core              5.7.2           py311haa95532_0  
jupyter_events            0.10.0          py311haa95532_0  
jupyter_server            2.14.1          py311haa95532_0  
jupyter_server_terminals  0.4.4           py311haa95532_1  
jupyterlab                4.2.4                    pypi_0    pypi
jupyterlab-pygments       0.3.0                    pypi_0    pypi
jupyterlab-server         2.27.3                   pypi_0    pypi
jupyterlab-spellchecker   0.8.4                    pypi_0    pypi
jupyterlab-widgets        3.0.11                   pypi_0    pypi
jupyterlab_pygments       0.1.2                      py_0  
jupyterlab_server         2.25.1          py311haa95532_0  
jupytext                  1.16.4                   pypi_0    pypi
kiwisolver                1.4.5           py311h005e61a_1    conda-forge
krb5                      1.21.3               hdf4eb48_0    conda-forge
lcms2                     2.16                 h67d730c_0    conda-forge
lerc                      4.0.0                h63175ca_0    conda-forge
libabseil                 20240116.2      cxx17_he0c23c2_1    conda-forge
libaec                    1.1.3                h63175ca_0    conda-forge
libarrow                  17.0.0           h009c9d4_7_cpu    conda-forge
libarrow-acero            17.0.0           he0c23c2_7_cpu    conda-forge
libarrow-dataset          17.0.0           he0c23c2_7_cpu    conda-forge
libarrow-substrait        17.0.0           h1f0e801_7_cpu    conda-forge
libblas                   3.9.0              23_win64_mkl    conda-forge
libbrotlicommon           1.1.0                hcfcfb64_1    conda-forge
libbrotlidec              1.1.0                hcfcfb64_1    conda-forge
libbrotlienc              1.1.0                hcfcfb64_1    conda-forge
libcblas                  3.9.0              23_win64_mkl    conda-forge
libcrc32c                 1.1.2                h0e60522_0    conda-forge
libcurl                   8.9.1                h18fefc2_0    conda-forge
libdeflate                1.21                 h2466b09_0    conda-forge
libevent                  2.1.12               h3671451_1    conda-forge
libexpat                  2.6.2                h63175ca_0    conda-forge
libffi                    3.4.2                h8ffe710_5    conda-forge
libgoogle-cloud           2.28.0               h5e7cea3_0    conda-forge
libgoogle-cloud-storage   2.28.0               he5eb982_0    conda-forge
libgrpc                   1.62.2               h5273850_0    conda-forge
libhwloc                  2.11.1          default_h8125262_1000    conda-forge
libiconv                  1.17                 hcfcfb64_2    conda-forge
libjpeg-turbo             3.0.0                hcfcfb64_1    conda-forge
liblapack                 3.9.0              23_win64_mkl    conda-forge
libnetcdf                 4.9.2           nompi_h92078aa_114    conda-forge
libparquet                17.0.0           ha915800_7_cpu    conda-forge
libpng                    1.6.43               h19919ed_0    conda-forge
libprotobuf               4.25.3               h503648d_0    conda-forge
libre2-11                 2023.09.01           hf8d8778_2    conda-forge
libsodium                 1.0.18               h62dcd97_0  
libsqlite                 3.46.0               h2466b09_0    conda-forge
libssh2                   1.11.0               h7dfc565_0    conda-forge
libthrift                 0.20.0               ha2b3283_0    conda-forge
libtiff                   4.6.0                hb151862_4    conda-forge
libutf8proc               2.8.0                h82a8f57_0    conda-forge
libwebp-base              1.4.0                hcfcfb64_0    conda-forge
libxcb                    1.16                 hcd874cb_0    conda-forge
libxml2                   2.12.7               h0f24e4e_4    conda-forge
libzip                    1.10.1               h1d365fa_3    conda-forge
libzlib                   1.3.1                h2466b09_1    conda-forge
linkify-it-py             2.0.3              pyhd8ed1ab_0    conda-forge
llvmlite                  0.43.0          py311h7deaa30_0    conda-forge
locket                    1.0.0              pyhd8ed1ab_0    conda-forge
lz4                       4.3.3           py311haddf500_0    conda-forge
lz4-c                     1.9.4                hcfcfb64_0    conda-forge
m2w64-gcc-libgfortran     5.3.0                         6    conda-forge
m2w64-gcc-libs            5.3.0                         7    conda-forge
m2w64-gcc-libs-core       5.3.0                         7    conda-forge
m2w64-gmp                 6.1.0                         2    conda-forge
m2w64-libwinpthread-git   5.0.0.4634.697f757               2    conda-forge
markdown                  3.6                pyhd8ed1ab_0    conda-forge
markdown-it-py            3.0.0              pyhd8ed1ab_0    conda-forge
markupsafe                2.1.5           py311ha68e1ae_0    conda-forge
matplotlib-base           3.9.1           py311h8f1b1e4_2    conda-forge
matplotlib-inline         0.1.7              pyhd8ed1ab_0    conda-forge
mdit-py-plugins           0.4.1              pyhd8ed1ab_0    conda-forge
mdurl                     0.1.2              pyhd8ed1ab_0    conda-forge
mistune                   3.0.2                    pypi_0    pypi
mkl                       2024.1.0           h66d3029_694    conda-forge
mpc                       1.3.1                h4ff82f8_0    conda-forge
mpfr                      4.2.1                h64bf75a_1    conda-forge
mpir                      3.0.0             he025d50_1002    conda-forge
msgpack-python            1.0.8           py311h3257749_0    conda-forge
msys2-conda-epoch         20160418                      1    conda-forge
multipledispatch          0.6.0              pyhd8ed1ab_1    conda-forge
munkres                   1.1.4              pyh9f0ad1d_0    conda-forge
mypy                      1.11.1                   pypi_0    pypi
mypy-extensions           1.0.0                    pypi_0    pypi
nbclient                  0.10.0                   pypi_0    pypi
nbconvert                 7.16.4                   pypi_0    pypi
nbformat                  5.10.4                   pypi_0    pypi
nbsphinx                  0.9.5                    pypi_0    pypi
nest-asyncio              1.6.0           py311haa95532_0  
netcdf4                   1.7.1           nompi_py311hbdc12eb_101    conda-forge
nodeenv                   1.9.1              pyhd8ed1ab_0    conda-forge
notebook                  7.2.1                    pypi_0    pypi
notebook-shim             0.2.4                    pypi_0    pypi
numba                     0.60.0          py311h0673bce_0    conda-forge
numpy                     2.0.1           py311h35ffc71_0    conda-forge
openjpeg                  2.5.2                h3d672ee_0    conda-forge
openssl                   3.3.1                h2466b09_2    conda-forge
orc                       2.0.1                h7e885a9_1    conda-forge
overrides                 7.7.0                    pypi_0    pypi
packaging                 24.1               pyhd8ed1ab_0    conda-forge
pandas                    2.2.2           py311hcf9f919_1    conda-forge
pandocfilters             1.5.1                    pypi_0    pypi
panel                     1.4.5              pyhd8ed1ab_0    conda-forge
param                     2.1.1              pyhff2d567_0    conda-forge
parameterized             0.9.0                    pypi_0    pypi
parso                     0.8.4                    pypi_0    pypi
partd                     1.4.2              pyhd8ed1ab_0    conda-forge
pathlib                   1.0.1           py311h1ea47a8_7    conda-forge
pillow                    10.4.0          py311h5592be9_0    conda-forge
pip                       24.2               pyhd8ed1ab_0    conda-forge
platformdirs              4.2.2              pyhd8ed1ab_0    conda-forge
pluggy                    1.5.0              pyhd8ed1ab_0    conda-forge
pre-commit                3.8.0              pyha770c72_0    conda-forge
pre_commit                3.8.0                hd8ed1ab_0    conda-forge
proj                      9.4.1                hd9569ee_1    conda-forge
prometheus-client         0.20.0                   pypi_0    pypi
prometheus_client         0.14.1          py311haa95532_0  
prompt-toolkit            3.0.47                   pypi_0    pypi
prompt_toolkit            3.0.43               hd3eb1b0_0  
psutil                    6.0.0           py311he736701_0    conda-forge
pthread-stubs             0.4               hcd874cb_1001    conda-forge
pthreads-win32            2.9.1                hfa6e2cd_3    conda-forge
pure-eval                 0.2.3                    pypi_0    pypi
pure_eval                 0.2.2              pyhd3eb1b0_0  
pyarrow                   17.0.0          py311h06a5be4_1    conda-forge
pyarrow-core              17.0.0          py311hdea38fa_1_cpu    conda-forge
pyarrow-hotfix            0.6                pyhd8ed1ab_0    conda-forge
pycparser                 2.22               pyhd8ed1ab_0    conda-forge
pyct                      0.5.0              pyhd8ed1ab_0    conda-forge
pydata-sphinx-theme       0.15.4                   pypi_0    pypi
pyfma                     0.1.6                    pypi_0    pypi
pygments                  2.18.0                   pypi_0    pypi
pympler                   1.1                pyhd8ed1ab_0    conda-forge
pyogrio                   0.9.0                    pypi_0    pypi
pyparsing                 3.1.2              pyhd8ed1ab_0    conda-forge
pyproj                    3.6.1           py311h93f6e28_8    conda-forge
pyproject-api             1.7.1                    pypi_0    pypi
pyproject-hooks           1.1.0                    pypi_0    pypi
pyshp                     2.3.1              pyhd8ed1ab_0    conda-forge
pysocks                   1.7.1              pyh0701188_6    conda-forge
pytest                    8.3.2              pyhd8ed1ab_0    conda-forge
pytest-console-scripts    1.4.1                    pypi_0    pypi
pytest-cov                5.0.0              pyhd8ed1ab_0    conda-forge
python                    3.11.9          h631f459_0_cpython    conda-forge
python-dateutil           2.9.0              pyhd8ed1ab_0    conda-forge
python-fastjsonschema     2.16.2          py311haa95532_0  
python-json-logger        2.0.7           py311haa95532_0  
python-tzdata             2024.1             pyhd8ed1ab_0    conda-forge
python_abi                3.11                    4_cp311    conda-forge
pytz                      2024.1             pyhd8ed1ab_0    conda-forge
pyviz_comms               3.0.3              pyhd8ed1ab_0    conda-forge
pywin32                   306                      pypi_0    pypi
pywinpty                  2.0.13                   pypi_0    pypi
pyyaml                    6.0.2           py311he736701_0    conda-forge
pyzmq                     26.1.0                   pypi_0    pypi
qhull                     2020.2               hc790b64_5    conda-forge
qtconsole                 5.5.2                    pypi_0    pypi
qtpy                      2.4.1                    pypi_0    pypi
re2                       2023.09.01           hd3b24a8_2    conda-forge
referencing               0.35.1                   pypi_0    pypi
requests                  2.32.3             pyhd8ed1ab_0    conda-forge
retrying                  1.3.3              pyhd8ed1ab_3    conda-forge
rfc3339-validator         0.1.4           py311haa95532_0  
rfc3986-validator         0.1.1           py311haa95532_0  
rpds-py                   0.20.0                   pypi_0    pypi
ruff                      0.4.10                   pypi_0    pypi
scikit-learn              1.5.1           py311hdcb8d17_0    conda-forge
scipy                     1.14.0          py311hd4686c6_1    conda-forge
send2trash                1.8.3                    pypi_0    pypi
setuptools                72.1.0             pyhd8ed1ab_0    conda-forge
shapely                   2.0.5           py311hf837ac7_0    conda-forge
six                       1.16.0             pyh6c4a22f_0    conda-forge
snakeviz                  2.2.0                    pypi_0    pypi
snappy                    1.2.1                h23299a8_0    conda-forge
sniffio                   1.3.1                    pypi_0    pypi
snowballstemmer           2.2.0                    pypi_0    pypi
sortedcontainers          2.4.0              pyhd8ed1ab_0    conda-forge
soupsieve                 2.6                      pypi_0    pypi
spatialpandas             0.4.10             pyhd8ed1ab_1    conda-forge
sphinx                    7.4.7                    pypi_0    pypi
sphinx-click              6.0.0                    pypi_0    pypi
sphinxcontrib-applehelp   2.0.0                    pypi_0    pypi
sphinxcontrib-devhelp     2.0.0                    pypi_0    pypi
sphinxcontrib-htmlhelp    2.1.0                    pypi_0    pypi
sphinxcontrib-jsmath      1.0.1                    pypi_0    pypi
sphinxcontrib-qthelp      2.0.0                    pypi_0    pypi
sphinxcontrib-serializinghtml 2.0.0                    pypi_0    pypi
sqlite                    3.46.0               h2466b09_0    conda-forge
stack-data                0.6.3                    pypi_0    pypi
stack_data                0.2.0              pyhd3eb1b0_0  
tabulate                  0.9.0              pyhd8ed1ab_1    conda-forge
tbb                       2021.12.0            hc790b64_3    conda-forge
tblib                     3.0.0              pyhd8ed1ab_0    conda-forge
terminado                 0.18.1                   pypi_0    pypi
threadpoolctl             3.5.0              pyhc1e730c_0    conda-forge
tinycss2                  1.3.0                    pypi_0    pypi
tk                        8.6.13               h5226925_1    conda-forge
toml                      0.10.2             pyhd8ed1ab_0    conda-forge
tomli                     2.0.1              pyhd8ed1ab_0    conda-forge
toolz                     0.12.1             pyhd8ed1ab_0    conda-forge
tornado                   6.4.1           py311he736701_0    conda-forge
tox                       4.18.0                   pypi_0    pypi
tqdm                      4.66.5             pyhd8ed1ab_0    conda-forge
traitlets                 5.14.3             pyhd8ed1ab_0    conda-forge
types-python-dateutil     2.9.0.20240316           pypi_0    pypi
typing-extensions         4.11.0          py311haa95532_0  
typing_extensions         4.11.0          py311haa95532_0  
tzdata                    2024a                h0c530f3_0    conda-forge
uc-micro-py               1.0.3              pyhd8ed1ab_0    conda-forge
ucrt                      10.0.22621.0         h57928b3_0    conda-forge
ukkonen                   1.0.1           py311h005e61a_4    conda-forge
uri-template              1.3.0                    pypi_0    pypi
urllib3                   2.2.2              pyhd8ed1ab_1    conda-forge
uxarray                   2024.8.3.dev41+g4e6ab59f.d20240912          pypi_0    pypi
vc                        14.3                h8a93ad2_20    conda-forge
vc14_runtime              14.40.33810         ha82c5b3_20    conda-forge
virtualenv                20.26.3            pyhd8ed1ab_0    conda-forge
vs2015_runtime            14.40.33810         h3bf8584_20    conda-forge
wcwidth                   0.2.13                   pypi_0    pypi
webcolors                 24.8.0                   pypi_0    pypi
webencodings              0.5.1              pyhd8ed1ab_2    conda-forge
websocket-client          1.8.0           py311haa95532_0  
wheel                     0.44.0             pyhd8ed1ab_0    conda-forge
widgetsnbextension        4.0.11                   pypi_0    pypi
win_inet_pton             1.1.0              pyhd8ed1ab_6    conda-forge
winpty                    0.4.3                         4  
xarray                    2024.7.0           pyhd8ed1ab_0    conda-forge
xorg-libxau               1.0.11               hcd874cb_0    conda-forge
xorg-libxdmcp             1.1.3                hcd874cb_0    conda-forge
xyzservices               2024.6.0           pyhd8ed1ab_0    conda-forge
xz                        5.2.6                h8d14728_0    conda-forge
yaml                      0.2.5                h8ffe710_2    conda-forge
zeromq                    4.3.5                hd77b12b_0  
zict                      3.0.0              pyhd8ed1ab_0    conda-forge
zipp                      3.20.0             pyhd8ed1ab_0    conda-forge
zlib                      1.3.1                h2466b09_1    conda-forge
zstandard                 0.23.0          py311h53056dc_0    conda-forge
zstd                      1.5.6                h0ea2cb4_0    conda-forge    

Description of expected behavior and the observed behavior

I am attempting to use hvPlot to plot the edges of Polygons stored in a GeoDataFrame using gdf.hvplot.paths(). I would like to simply change the color of the edges.

Complete, minimal, self-contained example code that reproduces the issue

import geopandas as gp
import holoviews as hv
import hvplot.pandas
# Any GeoDataFrame with Polygons
gdf = ... 

# using HoloViews
hv.Path(gdf).opts(color='black')

image

# using hvPlot
gdf.hvplot.paths(color='black')

image

This is all with the matplotlib backend. Using bokeh actually makes the Paths not show up at all.

hv.extension('bokeh')
gdf.hvplot.paths()

image

  • I may be interested in making a pull request to address this
@ahuang11
Copy link
Collaborator

ahuang11 commented Sep 12, 2024

Have you tried opts(color="black") or line_color

Also, can you share a minimal GDF?

For bokeh, have you tried clearing all output, restarting the kernel, saving, exiting, re-opening, and running? I suspect it's related to: #1359

@philipc2
Copy link
Contributor Author

@philipc2
Copy link
Contributor Author

philipc2 commented Sep 12, 2024

Running a clean, restarted notebook with the following code doesn't produce any output.

import geopandas as gp
import hvplot.pandas 
import holoviews as hv

gdf = gp.read_file("quad-hex.shp")

gdf.hvplot.paths()

This occurs with rasterize set to True and False also.

The same code using matplotlib does show the plot.

import geopandas as gp
import hvplot.pandas 
import holoviews as hv

gdf = gp.read_file("quad-hex.shp")

hv.extension("matplotlib")
gdf.hvplot.paths()

@philipc2
Copy link
Contributor Author

Have you tried opts(color="black") or line_color

Also, can you share a minimal GDF?

For bokeh, have you tried clearing all output, restarting the kernel, saving, exiting, re-opening, and running? I suspect it's related to: #1359

Both of those parameters don't impact the plot. The same "blue" one is rendered.

@hoxbro
Copy link
Member

hoxbro commented Sep 12, 2024

Could be related to #792

@philipc2
Copy link
Contributor Author

The following does let me know change the edge color, but the plot is a path.Polygons instead of a path.Paths. It is still not rendering with bokeh though.

hv.extension("matplotlib")
gdf.hvplot(edgecolor='red')
image

@philipc2
Copy link
Contributor Author

Could be related to #792

Possibly, there's some strange behavior when I set geo=True

hv.extension("matplotlib")
gdf.hvplot.paths(geo=True, title="Geo True") + gdf.hvplot.paths(geo=False, title="Geo False") 
image

@philipc2
Copy link
Contributor Author

Creating a GeoDataFrame with the exterior of each Polygon also doesn't seem to change the result

# GeoDataFrame containing the LINEARRING of each Polygon
gdf_exterior = gp.GeoDataFrame({"geometry": gdf[['geometry']].exterior.values})

hv.extension("matplotlib")
gdf_exterior.hvplot.paths(color='red')

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants