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

plotly backend not rendering tiles consistently #5571

Open
sandhujasmine opened this issue Dec 20, 2022 · 0 comments
Open

plotly backend not rendering tiles consistently #5571

sandhujasmine opened this issue Dec 20, 2022 · 0 comments
Labels
TRIAGE Needs triaging

Comments

@sandhujasmine
Copy link
Collaborator

Thanks for contacting us! Please read and follow these instructions carefully, then delete this introductory text to keep your issue easy to read. Note that the issue tracker is NOT the place for usage questions and technical assistance; post those at Discourse instead. Issues without the required information below may be closed immediately.

ALL software version info

(this library, plus any other relevant software, e.g. bokeh, python, notebook, OS, browser, etc)
Issue exposed in latest version of the plotly tile_sources docs

Description of expected behavior and the observed behavior

The CartoMidnight and CartoEco are deprecated tile sources so I expect those to fail; however, I'd expect the following tile sources to render. They work fine in Bokeh examples

Plotly rendered example from docs
image

Bokeh rendered example from docs
image

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

Here's an example notebook that shows a weird coupling between the cells.
image

posting the example ipynb below

{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "582383c3",
   "metadata": {},
   "outputs": [],
   "source": [
    "import holoviews as hv\n",
    "from holoviews import opts\n",
    "hv.extension('plotly')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "3da0231e",
   "metadata": {},
   "outputs": [],
   "source": [
    "# NOTE: `hv.element.tiles.tile_sources` is filtering out the deprecated maps so 20 sources are valid\n",
    "# first: let's look at only the last 4 plots\n",
    "ts = [kv[1]().relabel(kv[0]) for i, kv in enumerate(hv.element.tiles.tile_sources.items()) if i >= 10]\n",
    "hv.Layout(ts).opts(\n",
    "     opts.Tiles(xaxis=None, yaxis=None, width=225, height=225),\n",
    "     opts.Layout(hspacing=10, vspacing=40)\n",
    ").cols(4)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "4d38f230",
   "metadata": {},
   "outputs": [],
   "source": [
    "ts = [ts().relabel(name) for name, ts in hv.element.tiles.tile_sources.items()]\n",
    "hv.Layout(ts).opts(\n",
    "     opts.Tiles(xaxis=None, yaxis=None, width=225, height=225),\n",
    "     opts.Layout(hspacing=10, vspacing=40)\n",
    ").cols(4)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "6553663c",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.9.15"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}

Stack traceback and/or browser JavaScript console output

Screenshots or screencasts of the bug in action

running 2nd cell works fine on its own
image

running the 3rd cell alters the images in 2nd cell
image

@sandhujasmine sandhujasmine added the TRIAGE Needs triaging label Dec 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
TRIAGE Needs triaging
Projects
None yet
Development

No branches or pull requests

1 participant