Open philipc2 opened 1 month ago
To clarify, do you mean the horizontal black line?
To clarify, do you mean the horizontal black line?
Correct. The black outline around the plot.
Workaround might be .opts(padding=0.1)
(not sure if that actually works)
If I were to take a wild guess on how to fix it, I think you need to find where/what draws the globe's outline, and then have it apply_extent=True
or apply_ranges=True
import holoviews as hv
hv.Curve([0, 1, 2]) * hv.Curve([3, 4, 5]).opts(apply_ranges=False)
^ here, the red line doesn't show up because when apply_ranges=False is set, it's not included in its bounds calculation.
This appears to be the code that sets up the outline's projection.
I've tried to add combinations of apply_extent=True
and apply_ranges=True
to the Shape
and GeoShape
respectively with no visual changes.
Made a modification that scales the boundary in the Y
direction which should help debug what changes need to me made to have the outline show up in the figure.
def initialize_plot(self, ranges=None, plot=None, plots=None, source=None):
opts = {} if isinstance(self, HvOverlayPlot) else {'source': source}
fig = super().initialize_plot(ranges, plot, plots, **opts)
if self.geographic and self.show_bounds and not self.overlaid:
from . import GeoShapePlot
# ========================================================================================
from shapely.affinity import scale
# scale bounds in the Y direction to test apply_ranges
bounds = scale(self.projection.boundary, yfact=1.5, origin=(0, 0))
# ======================================================================================
shape = Shape(bounds, crs=self.projection).options(fill_alpha=0)
shapeplot = GeoShapePlot(shape, projection=self.projection,
overlaid=True,
renderer=self.renderer)
shapeplot.geographic = False
shapeplot.initialize_plot(plot=fig)
self._set_unwrap_lons(self.current_frame)
return fig
What if you changed the padding slightly?
What if you changed the padding slightly?
Padding of the boundary shape or the entire figure?
ALL software version info
(this library, plus any other relevant software, e.g. bokeh, python, notebook, OS, browser, etc should be added within the dropdown below.)
Software Version Info
```plaintext # Name Version Build Channel abseil-cpp 20211102.0 h6b3803e_1 conda-forge accessible-pygments 0.0.5 pypi_0 pypi alabaster 1.0.0 pypi_0 pypi antimeridian 0.3.8 pyhd8ed1ab_0 conda-forge anyio 4.2.0 py311hca03da5_0 anywidget 0.9.13 pyhd8ed1ab_0 conda-forge appnope 0.1.2 py311hca03da5_1001 archspec 0.2.3 pyhd3eb1b0_0 argon2-cffi 21.3.0 pyhd3eb1b0_0 argon2-cffi-bindings 21.2.0 py311h80987f9_0 arrow 1.3.0 pypi_0 pypi arrow-cpp 14.0.2 hc7aafb3_1 asttokens 2.0.5 pyhd3eb1b0_0 asv 0.6.4.dev13+gee3b187 pypi_0 pypi asv-runner 0.2.1 pypi_0 pypi async-lru 2.0.4 py311hca03da5_0 attrs 23.1.0 py311hca03da5_0 aws-c-auth 0.6.19 h80987f9_0 aws-c-cal 0.5.20 h80987f9_0 aws-c-common 0.8.5 h80987f9_0 aws-c-compression 0.2.16 h80987f9_0 aws-c-event-stream 0.2.15 h313beb8_0 aws-c-http 0.6.25 h80987f9_0 aws-c-io 0.13.10 h80987f9_0 aws-c-mqtt 0.7.13 h80987f9_0 aws-c-s3 0.1.51 h80987f9_0 aws-c-sdkutils 0.1.6 h80987f9_0 aws-checksums 0.1.13 h80987f9_0 aws-crt-cpp 0.18.16 h313beb8_0 aws-sdk-cpp 1.10.55 h313beb8_0 babel 2.16.0 pypi_0 pypi beautifulsoup4 4.12.3 py311hca03da5_0 blas 2.122 openblas conda-forge blas-devel 3.9.0 22_osxarm64_openblas conda-forge bleach 6.1.0 pyhd8ed1ab_0 conda-forge blosc 1.21.5 h9c252e8_1 conda-forge bokeh 3.5.2 pypi_0 pypi boltons 23.0.0 py311hca03da5_0 boost-cpp 1.82.0 h48ca7d4_2 bottleneck 1.3.7 py311hb9f6ed7_0 branca 0.7.2 pyhd8ed1ab_0 conda-forge brotli 1.0.9 h80987f9_8 brotli-bin 1.0.9 h80987f9_8 brotli-python 1.0.9 py311h313beb8_8 build 0.9.0 pypi_0 pypi bzip2 1.0.8 h80987f9_6 c-ares 1.32.2 h99b78c6_0 conda-forge ca-certificates 2024.8.30 hf0a4a13_0 conda-forge cairo 1.16.0 h302bd0f_5 cartopy 0.22.0 py311h7aedaa7_0 certifi 2024.8.30 pyhd8ed1ab_0 conda-forge cffi 1.16.0 py311h80987f9_1 cfgv 3.4.0 pypi_0 pypi cfitsio 3.470 ha83d327_7 conda-forge cftime 1.6.2 py311ha0d4635_0 charset-normalizer 3.3.2 pyhd8ed1ab_0 conda-forge click 8.1.7 unix_pyh707e725_0 conda-forge click-plugins 1.1.1 py_0 conda-forge cligj 0.7.2 pyhd8ed1ab_1 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.1 py311hca03da5_0 conda 24.9.1 py311h267d04e_0 conda-forge conda-libmamba-solver 24.1.0 pyhd3eb1b0_0 conda-package-handling 2.3.0 py311hca03da5_0 conda-package-streaming 0.10.0 py311hca03da5_0 contourpy 1.2.0 py311h48ca7d4_0 cycler 0.12.1 pyhd8ed1ab_0 conda-forge cyrus-sasl 2.1.28 h9131b1a_1 cytoolz 0.12.2 py311h80987f9_0 dask 2024.7.0 pyhd8ed1ab_0 conda-forge dask-core 2024.7.0 pyhd8ed1ab_0 conda-forge dask-expr 1.1.7 pyhd8ed1ab_0 conda-forge datashader 0.16.3 pyhd8ed1ab_0 conda-forge debugpy 1.6.7 py311h313beb8_0 decorator 5.1.1 pyhd3eb1b0_0 defusedxml 0.7.1 pyhd3eb1b0_0 distlib 0.3.8 pypi_0 pypi distributed 2024.7.0 pyhd8ed1ab_0 conda-forge distro 1.9.0 py311hca03da5_0 docutils 0.21.2 pypi_0 pypi executing 0.8.3 pyhd3eb1b0_0 expat 2.6.3 hf9b8971_0 conda-forge filelock 3.15.4 pypi_0 pypi fiona 1.9.1 py311habcf648_0 conda-forge fmt 9.1.0 hffc8910_0 conda-forge folium 0.17.0 pyhd8ed1ab_0 conda-forge fontconfig 2.14.1 hee714a5_2 fonttools 4.25.0 pyhd3eb1b0_0 fqdn 1.5.1 pypi_0 pypi freetype 2.10.4 h17b34a0_1 conda-forge freexl 2.0.0 ha3de405_0 frozendict 2.4.2 py311hca03da5_0 fsspec 2024.6.1 pyhff2d567_0 conda-forge gdal 3.6.2 py311h950983f_4 geocat-datafiles 2022.03.0 pyha770c72_0 conda-forge geopandas 1.0.1 pypi_0 pypi geos 3.9.1 h9f76cd9_2 conda-forge geotiff 1.7.0 h41f0982_3 geoviews 1.13.0 pypi_0 pypi gettext 0.21.0 h13f89a0_1 gflags 2.2.2 hc88da5d_1004 conda-forge giflib 5.2.2 h93a5062_0 conda-forge glib 2.78.4 h313beb8_0 glib-tools 2.78.4 h313beb8_0 glog 0.5.0 h5c6a83d_0 conda-forge grpc-cpp 1.48.2 hc60591f_1 gst-plugins-base 1.14.1 h313beb8_1 gstreamer 1.14.1 h80987f9_1 hdf4 4.2.13 h5e329fb_3 hdf5 1.12.1 h05c076b_3 holoviews 1.19.1 pyhd8ed1ab_0 conda-forge hvplot 0.11.0 pypi_0 pypi icu 73.1 h313beb8_0 identify 2.6.0 pypi_0 pypi idna 3.7 pyhd8ed1ab_0 conda-forge imagesize 1.4.1 pypi_0 pypi importlib-metadata 8.0.0 pyha770c72_0 conda-forge importlib_metadata 8.0.0 hd8ed1ab_0 conda-forge iniconfig 1.1.1 pyhd3eb1b0_0 ipykernel 6.28.0 py311hca03da5_0 ipython 8.25.0 py311hca03da5_0 ipywidgets 8.1.2 py311hca03da5_0 isoduration 20.11.0 pypi_0 pypi jedi 0.19.1 py311hca03da5_0 jinja2 3.1.4 pyhd8ed1ab_0 conda-forge joblib 1.4.2 pyhd8ed1ab_0 conda-forge jpeg 9e h1a8c8d9_3 conda-forge json-c 0.16 hc449e50_0 conda-forge json5 0.9.6 pyhd3eb1b0_0 jsonpatch 1.33 py311hca03da5_1 jsonpointer 2.1 pyhd3eb1b0_0 jsonschema 4.19.2 py311hca03da5_0 jsonschema-specifications 2023.7.1 py311hca03da5_0 jupyter 1.0.0 py311hca03da5_9 jupyter-cache 1.0.0 pypi_0 pypi jupyter-lsp 2.2.0 py311hca03da5_0 jupyter_client 8.6.0 py311hca03da5_0 jupyter_console 6.6.3 py311hca03da5_0 jupyter_core 5.7.2 py311hca03da5_0 jupyter_events 0.10.0 py311hca03da5_0 jupyter_server 2.14.1 py311hca03da5_0 jupyter_server_terminals 0.4.4 py311hca03da5_1 jupyterlab 4.0.11 py311hca03da5_0 jupyterlab-spellchecker 0.8.4 pypi_0 pypi jupyterlab_pygments 0.1.2 py_0 jupyterlab_server 2.25.1 py311hca03da5_0 jupyterlab_widgets 3.0.10 py311hca03da5_0 kealib 1.5.0 hba2eb73_1 kiwisolver 1.4.4 py311h313beb8_0 krb5 1.20.1 h69eda48_0 conda-forge lcms2 2.12 hba8e193_0 lerc 3.0 hc377ac9_0 libarchive 3.6.2 h62fee54_3 libblas 3.9.0 22_osxarm64_openblas conda-forge libboost 1.82.0 h0bc93f9_2 libboost-headers 1.82.0 hce30654_6 conda-forge libbrotlicommon 1.0.9 h80987f9_8 libbrotlidec 1.0.9 h80987f9_8 libbrotlienc 1.0.9 h80987f9_8 libcblas 3.9.0 22_osxarm64_openblas conda-forge libclang 14.0.6 default_h1b80db6_1 libclang13 14.0.6 default_h24352ff_1 libcurl 8.7.1 h3e2b118_0 libcxx 18.1.8 h167917d_0 conda-forge libdeflate 1.17 h80987f9_1 libedit 3.1.20230828 h80987f9_0 libev 4.33 h93a5062_2 conda-forge libevent 2.1.12 h2757513_1 conda-forge libexpat 2.6.3 hf9b8971_0 conda-forge libffi 3.4.4 hca03da5_1 libgdal 3.6.2 h0413ea8_4 libgfortran 5.0.0 13_2_0_hd922786_3 conda-forge libgfortran5 13.2.0 hf226fd6_3 conda-forge libglib 2.78.4 h0a96307_0 libiconv 1.16 h80987f9_3 libkml 1.3.0 h1eb4d9f_1018 conda-forge liblapack 3.9.0 22_osxarm64_openblas conda-forge liblapacke 3.9.0 22_osxarm64_openblas conda-forge libllvm14 14.0.6 h7ec7a93_3 libmamba 1.5.8 haeffa04_2 libmambapy 1.5.8 py311h1c5506f_2 libnetcdf 4.8.1 h0fce390_4 libnghttp2 1.57.0 h62f6fdd_0 libopenblas 0.3.27 openmp_h517c56d_1 conda-forge libpng 1.6.39 h80987f9_0 libpq 12.17 h02f6b3c_0 libprotobuf 3.20.3 h514c7bf_0 libsodium 1.0.18 h1a28f6b_0 libsolv 0.7.24 h514c7bf_1 libspatialindex 2.0.0 h00cdb27_0 conda-forge libspatialite 5.1.0 h87e580a_0 libsqlite 3.46.0 hfb93653_0 conda-forge libssh2 1.11.0 h3e2b118_0 libthrift 0.15.0 h73c2103_2 libtiff 4.5.1 h313beb8_0 libwebp-base 1.4.0 h93a5062_0 conda-forge libxml2 2.10.4 h0b34f26_2 libzip 1.8.0 h62fee54_1 libzlib 1.2.13 hfb2fe0b_6 conda-forge linkify-it-py 2.0.3 pyhd8ed1ab_0 conda-forge llvm-openmp 18.1.8 hde57baf_0 conda-forge llvmlite 0.43.0 py311h313beb8_0 locket 1.0.0 pyhd8ed1ab_0 conda-forge lonboard 0.9.3 pyh5bfe37b_0 conda-forge lz4 4.3.2 py311h80987f9_0 lz4-c 1.9.4 hb7217d7_0 conda-forge mapclassify 2.8.0 pyhd8ed1ab_0 conda-forge markdown 3.6 pyhd8ed1ab_0 conda-forge markdown-it-py 3.0.0 pyhd8ed1ab_0 conda-forge markupsafe 2.1.3 py311h80987f9_0 matplotlib-base 3.8.4 py311h7aedaa7_0 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 menuinst 2.1.1 py311hca03da5_0 minizip 4.0.3 ha89c15f_0 mistune 2.0.4 py311hca03da5_0 msgpack-python 1.0.3 py311h48ca7d4_0 multipledispatch 0.6.0 py_0 conda-forge munch 4.0.0 pyhd8ed1ab_0 conda-forge munkres 1.1.4 pyh9f0ad1d_0 conda-forge mysql 5.7.24 ha71a6ea_2 myst-nb 1.1.2 pypi_0 pypi myst-parser 4.0.0 pypi_0 pypi nbclient 0.8.0 py311hca03da5_0 nbconvert 7.10.0 py311hca03da5_0 nbformat 5.9.2 py311hca03da5_0 nbsphinx 0.9.5 pypi_0 pypi ncurses 6.4 h313beb8_0 nest-asyncio 1.6.0 py311hca03da5_0 netcdf4 1.6.2 py311h55fefbe_0 networkx 3.3 pyhd8ed1ab_1 conda-forge nodeenv 1.9.1 pypi_0 pypi notebook 7.0.8 py311hca03da5_2 notebook-shim 0.2.3 py311hca03da5_0 nspr 4.35 hb7217d7_0 conda-forge nss 3.100 hc6e9f88_0 conda-forge numba 0.60.0 py311h7aedaa7_0 numexpr 2.8.7 py311h6dc990b_0 numpy 1.26.4 py311he598dae_0 numpy-base 1.26.4 py311hfbfe69c_0 openblas 0.3.27 openmp_h560b219_1 conda-forge openjpeg 2.4.0 h0ed58ac_2 openssl 3.3.2 h8359307_0 conda-forge orc 1.7.4 hdca1487_1 overrides 7.4.0 py311hca03da5_0 packaging 24.1 pyhd8ed1ab_0 conda-forge palettable 3.3.3 pyhd8ed1ab_0 conda-forge pandas 2.0.3 pypi_0 pypi pandocfilters 1.5.0 pyhd3eb1b0_0 panel 1.5.2 pypi_0 pypi param 2.1.1 pyhff2d567_0 conda-forge parso 0.8.3 pyhd3eb1b0_0 partd 1.4.2 pyhd8ed1ab_0 conda-forge pcre2 10.42 hb066dcc_1 pep517 0.13.1 pypi_0 pypi pexpect 4.8.0 pyhd3eb1b0_3 pillow 10.4.0 py311h80987f9_0 pip 24.0 py311hca03da5_0 pixman 0.43.4 hebf3989_0 conda-forge platformdirs 3.10.0 py311hca03da5_0 pluggy 1.0.0 py311hca03da5_1 ply 3.11 py311hca03da5_0 pooch 1.8.2 pyhd8ed1ab_0 conda-forge poppler 22.12.0 h52f4003_3 poppler-data 0.4.12 hd8ed1ab_0 conda-forge pre-commit 3.7.1 pypi_0 pypi proj 9.3.1 h805f6d4_0 prometheus_client 0.14.1 py311hca03da5_0 prompt-toolkit 3.0.43 py311hca03da5_0 prompt_toolkit 3.0.43 hd3eb1b0_0 psutil 5.9.0 py311h80987f9_0 psygnal 0.11.1 pyhd8ed1ab_0 conda-forge ptyprocess 0.7.0 pyhd3eb1b0_2 pure_eval 0.2.2 pyhd3eb1b0_0 pyarrow 14.0.2 py311ha07b5f9_0 pyarrow-hotfix 0.6 pyhd8ed1ab_0 conda-forge pybind11-abi 4 hd8ed1ab_3 conda-forge pycosat 0.6.6 py311h80987f9_1 pycparser 2.21 pyhd3eb1b0_0 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 pypi_0 pypi pyogrio 0.9.0 pypi_0 pypi pyparsing 3.0.9 pyhd8ed1ab_0 conda-forge pyproj 3.6.1 py311h041c639_0 pyproject-hooks 1.1.0 pypi_0 pypi pyproject_hooks 1.0.0 py311hca03da5_0 pyqt 5.15.10 py311h313beb8_0 pyqt5-sip 12.13.0 py311h80987f9_0 pyshp 2.3.1 pyhd8ed1ab_0 conda-forge pysocks 1.7.1 pyha2e5f31_6 conda-forge pytest 7.4.4 py311hca03da5_0 python 3.11.8 hdf0ec26_0_cpython conda-forge python-dateutil 2.9.0 pyhd8ed1ab_0 conda-forge python-fastjsonschema 2.16.2 py311hca03da5_0 python-json-logger 2.0.7 py311hca03da5_0 python-tzdata 2024.1 pyhd8ed1ab_0 conda-forge python_abi 3.11 5_cp311 conda-forge pytz 2024.1 pyhd8ed1ab_0 conda-forge pyviz_comms 3.0.2 pyhd8ed1ab_1 conda-forge pyyaml 6.0.1 py311h80987f9_0 pyzmq 25.1.2 py311h313beb8_0 qhull 2020.2 h420ef59_5 conda-forge qt-main 5.15.2 h0917680_10 qtconsole 5.5.1 py311hca03da5_0 qtpy 2.4.1 py311hca03da5_0 re2 2022.04.01 h6b3803e_0 conda-forge readline 8.2 h1a28f6b_0 referencing 0.30.2 py311hca03da5_0 reproc 14.2.4.post0 h93a5062_1 conda-forge reproc-cpp 14.2.4.post0 h965bd2d_1 conda-forge requests 2.32.3 pyhd8ed1ab_0 conda-forge retrying 1.3.3 py_2 conda-forge rfc3339-validator 0.1.4 py311hca03da5_0 rfc3986-validator 0.1.1 py311hca03da5_0 rpds-py 0.10.6 py311hf0e4da2_0 rtree 1.3.0 py311hc46b6d3_2 conda-forge ruamel.yaml 0.17.21 py311h80987f9_0 scikit-learn 1.4.2 py311h7aedaa7_1 scipy 1.13.1 py311hac8794a_0 send2trash 1.8.2 py311hca03da5_0 setuptools 69.5.1 py311hca03da5_0 shapely 2.0.1 py311h3713c0e_0 sip 6.7.12 py311h313beb8_0 six 1.16.0 pyh6c4a22f_0 conda-forge snappy 1.2.1 hd02b534_0 conda-forge sniffio 1.3.0 py311hca03da5_0 snowballstemmer 2.2.0 pypi_0 pypi sortedcontainers 2.4.0 pyhd8ed1ab_0 conda-forge soupsieve 2.5 py311hca03da5_0 spatialpandas 0.4.10 pyhd8ed1ab_1 conda-forge sphinx 8.0.2 pypi_0 pypi sphinx-autosummary-accessors 2023.4.0 pypi_0 pypi sphinx-book-theme 1.1.3 pypi_0 pypi sphinx-design 0.6.1 pypi_0 pypi sphinx-remove-toctrees 1.0.0.post1 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 sqlalchemy 2.0.35 pypi_0 pypi sqlite 3.45.3 h80987f9_0 stack_data 0.2.0 pyhd3eb1b0_0 tabulate 0.9.0 pypi_0 pypi tbb 2021.8.0 h48ca7d4_0 tblib 3.0.0 pyhd8ed1ab_0 conda-forge terminado 0.17.1 py311hca03da5_0 threadpoolctl 3.5.0 pyhc1e730c_0 conda-forge tiledb 2.3.3 hb4a6b97_3 tinycss2 1.2.1 py311hca03da5_0 tk 8.6.14 h6ba3021_0 toolz 0.12.1 pyhd8ed1ab_0 conda-forge tornado 6.4.1 py311h80987f9_0 tqdm 4.66.4 pyhd8ed1ab_0 conda-forge traitlets 5.14.3 pyhd8ed1ab_0 conda-forge truststore 0.8.0 py311hca03da5_0 types-python-dateutil 2.9.0.20240906 pypi_0 pypi typing-extensions 4.11.0 py311hca03da5_0 typing_extensions 4.11.0 py311hca03da5_0 tzdata 2024a h04d1e81_0 uc-micro-py 1.0.3 pyhd8ed1ab_0 conda-forge uri-template 1.3.0 pypi_0 pypi uriparser 0.9.8 h00cdb27_0 conda-forge urllib3 2.2.2 pyhd8ed1ab_0 conda-forge utf8proc 2.6.1 h80987f9_1 uxarray 2024.8.3.dev168+g8a1cdc40.d20241010 pypi_0 pypi virtualenv 20.26.3 pypi_0 pypi watchfiles 0.24.0 py311h481aa64_1 conda-forge wcwidth 0.2.5 pyhd3eb1b0_0 webcolors 24.8.0 pypi_0 pypi webencodings 0.5.1 pyhd8ed1ab_2 conda-forge websocket-client 1.8.0 py311hca03da5_0 wheel 0.43.0 py311hca03da5_0 widgetsnbextension 4.0.10 py311hca03da5_0 wrapt 1.16.0 py311h460d6c5_1 conda-forge xarray 2024.6.0 pyhd8ed1ab_1 conda-forge xerces-c 3.2.4 h313beb8_1 xyzservices 2024.6.0 pyhd8ed1ab_0 conda-forge xz 5.4.6 h80987f9_1 yaml 0.2.5 h3422bc3_2 conda-forge yaml-cpp 0.8.0 h13dd4ca_0 conda-forge zeromq 4.3.5 h313beb8_0 zict 3.0.0 pyhd8ed1ab_0 conda-forge zipp 3.19.2 pyhd8ed1ab_0 conda-forge zlib 1.2.13 hfb2fe0b_6 conda-forge zstandard 0.22.0 py311h1a4646a_0 zstd 1.5.5 hd90d995_2 ```Description of expected behavior and the observed behavior
Slight clipping with projected plots near the bottom of the figure when using "bokeh" backend.
Complete, minimal, self-contained example code that reproduces the issue
Screenshots or screencasts of the bug in action
This is the default zoom frame
Zooming out slightly shows the clipped border on the bottom of the frame
Using the MPL backend, the default zoom contains the entire figure.