plotly / plotly/plotly.py

Plolty graph not showing up in JupyterLab 4.3.1 on MacBook

Abierto
#4,899 2 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

bug P3
Lenguaje dominante
Python
Estrellas
18.8k
Forks
2.8k
Merge medio
16 h 26 min
PR fusionados (30 d)
21

Descripción

mamba create -n jupyter jupyterlab pandas plotly
mamba activate jupyter
jupyter lab
import plotly.express as px
import plotly.io as pio

# Ensure Plotly renders in the notebook
pio.renderers.default = "notebook"

# Example data
data = {
    "Category": ["A", "A", "A", "B", "B", "B", "C", "C", "C"],
    "Value": [10, 15, 13, 20, 22, 25, 30, 28, 35]
}

# Create a DataFrame
import pandas as pd
df = pd.DataFrame(data)

# Create the boxplot
fig = px.box(df, x="Category", y="Value", title="Boxplot Example")

# Show the plot
fig.show()

Image

environment.yml

name: jupyter
channels:
  - conda-forge
dependencies:
  - anyio=4.6.2.post1
  - appnope=0.1.4
  - argon2-cffi=23.1.0
  - argon2-cffi-bindings=21.2.0
  - arrow=1.3.0
  - asttokens=2.4.1
  - async-lru=2.0.4
  - attrs=24.2.0
  - babel=2.16.0
  - beautifulsoup4=4.12.3
  - bleach=6.2.0
  - brotli-python=1.1.0
  - bzip2=1.0.8
  - ca-certificates=2024.8.30
  - cached-property=1.5.2
  - cached_property=1.5.2
  - certifi=2024.8.30
  - cffi=1.17.1
  - charset-normalizer=3.4.0
  - comm=0.2.2
  - debugpy=1.8.8
  - decorator=5.1.1
  - defusedxml=0.7.1
  - entrypoints=0.4
  - exceptiongroup=1.2.2
  - executing=2.1.0
  - fqdn=1.5.1
  - h11=0.14.0
  - h2=4.1.0
  - hpack=4.0.0
  - httpcore=1.0.7
  - httpx=0.27.2
  - hyperframe=6.0.1
  - icu=75.1
  - idna=3.10
  - importlib-metadata=8.5.0
  - importlib_resources=6.4.5
  - ipykernel=6.29.5
  - ipython=8.29.0
  - isoduration=20.11.0
  - jedi=0.19.2
  - jinja2=3.1.4
  - json5=0.9.28
  - jsonpointer=3.0.0
  - jsonschema=4.23.0
  - jsonschema-specifications=2024.10.1
  - jsonschema-with-format-nongpl=4.23.0
  - jupyter-lsp=2.2.5
  - jupyter_client=8.6.3
  - jupyter_core=5.7.2
  - jupyter_events=0.10.0
  - jupyter_server=2.14.2
  - jupyter_server_terminals=0.5.3
  - jupyterlab=4.3.1
  - jupyterlab_pygments=0.3.0
  - jupyterlab_server=2.27.3
  - krb5=1.21.3
  - libblas=3.9.0
  - libcblas=3.9.0
  - libcxx=19.1.4
  - libedit=3.1.20191231
  - libexpat=2.6.4
  - libffi=3.4.2
  - libgfortran=5.0.0
  - libgfortran5=13.2.0
  - liblapack=3.9.0
  - libopenblas=0.3.28
  - libsodium=1.0.20
  - libsqlite=3.47.0
  - libuv=1.49.2
  - libzlib=1.3.1
  - llvm-openmp=19.1.4
  - markupsafe=3.0.2
  - matplotlib-inline=0.1.7
  - mistune=3.0.2
  - nbclient=0.10.0
  - nbconvert-core=7.16.4
  - nbformat=5.10.4
  - ncurses=6.5
  - nest-asyncio=1.6.0
  - nodejs=22.11.0
  - notebook-shim=0.2.4
  - numpy=2.1.3
  - openssl=3.4.0
  - overrides=7.7.0
  - packaging=24.2
  - pandas=2.2.3
  - pandocfilters=1.5.0
  - parso=0.8.4
  - pexpect=4.9.0
  - pickleshare=0.7.5
  - pip=24.3.1
  - pkgutil-resolve-name=1.3.10
  - platformdirs=4.3.6
  - plotly=5.24.1
  - prometheus_client=0.21.0
  - prompt-toolkit=3.0.48
  - psutil=6.1.0
  - ptyprocess=0.7.0
  - pure_eval=0.2.3
  - pycparser=2.22
  - pygments=2.18.0
  - pyobjc-core=10.3.1
  - pyobjc-framework-cocoa=10.3.1
  - pysocks=1.7.1
  - python=3.12.7
  - python-dateutil=2.9.0.post0
  - python-fastjsonschema=2.20.0
  - python-json-logger=2.0.7
  - python-tzdata=2024.2
  - python_abi=3.12
  - pytz=2024.1
  - pyyaml=6.0.2
  - pyzmq=26.2.0
  - readline=8.2
  - referencing=0.35.1
  - requests=2.32.3
  - rfc3339-validator=0.1.4
  - rfc3986-validator=0.1.1
  - rpds-py=0.21.0
  - send2trash=1.8.3
  - setuptools=75.5.0
  - six=1.16.0
  - sniffio=1.3.1
  - soupsieve=2.5
  - stack_data=0.6.2
  - tenacity=9.0.0
  - terminado=0.18.1
  - tinycss2=1.4.0
  - tk=8.6.13
  - tomli=2.1.0
  - tornado=6.4.1
  - traitlets=5.14.3
  - types-python-dateutil=2.9.0.20241003
  - typing-extensions=4.12.2
  - typing_extensions=4.12.2
  - typing_utils=0.1.0
  - tzdata=2024b
  - uri-template=1.3.0
  - urllib3=2.2.3
  - wcwidth=0.2.13
  - webcolors=24.8.0
  - webencodings=0.5.1
  - websocket-client=1.8.0
  - wheel=0.45.0
  - xz=5.2.6
  - yaml=0.2.5
  - zeromq=4.3.5
  - zipp=3.21.0
  - zlib=1.3.1
  - zstandard=0.23.0
  - zstd=1.5.6

Guía de contribución

Abrir la guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Línea de trabajo

Reproduce el ejemplo en el entorno mamba proporcionado con JupyterLab 4.3.1, centrándote en la configuración pio.renderers.default = "notebook" y fig.show(). Rastrea el punto de entrada de renderizado de notebooks de Plotly y compara la salida con un renderer que funcione; se considerará terminado cuando el boxplot se renderice en la configuración de JupyterLab indicada y la regresión esté cubierta por una prueba adecuada.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
jupyter-notebook, plotly, python
Área
data-visualization
Tipo de issue
Error
Dificultad
4/5
Tiempo estimado
3-5 días
Estado de actividad
Estancado
Claridad
Necesita aclaración
Aptitud para principiantes
25/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.