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

nteract/VScode plots rendering at the bottom of the window #3353

Closed
stevenlis opened this issue Dec 27, 2018 · 8 comments
Closed

nteract/VScode plots rendering at the bottom of the window #3353

stevenlis opened this issue Dec 27, 2018 · 8 comments

Comments

@stevenlis
Copy link

Versions:
nteract : 0.12.3
holoviews : 1.11.0

Plots gernerated by holoviews rendered at the bottom of the window in nteract instead of right under each cell.
snipaste_184

snipaste_839

It does seem like a holoviews issue since bokeh behaves normally.
snipaste_583

@stevenlis
Copy link
Author

This also affects vscode python extension interactive tab:
hv

@philippjfr
Copy link
Member

philippjfr commented Feb 9, 2019

Note that there is a workaround, you can get it working by setting the HV_DOC_HTML to True:

import os
os.environ['HV_DOC_HTML'] = 'True'

import holoviews as hv

hv.extension('bokeh')

hv.renderer('bokeh').theme = 'dark_minimal'

hv.Curve([1, 2, 3])

screen shot 2019-02-09 at 7 30 42 pm

@philippjfr
Copy link
Member

That env var also works for VS Code:

screen shot 2019-02-09 at 8 03 28 pm

@philippjfr
Copy link
Member

One solution here would be to make the type of the MIME bundles dependent on whether the frontend sends back an acknowledgement when the extension is loaded. If we did that then the custom mime type would only be published in JupyterLab and classic notebook and any other frontends would receive all the components as a single 'text/html' component.

@philippjfr philippjfr added this to the v1.11.3 milestone Feb 9, 2019
@philippjfr
Copy link
Member

For further discussion you can also see the issue in nteract (nteract/nteract#3370).

@stevenlis stevenlis changed the title [nteract]plots rendering at the bottom of the window nteract/VScode plots rendering at the bottom of the window Feb 15, 2019
@philippjfr philippjfr modified the milestones: v1.11.3, v1.12.0 Mar 22, 2019
@MarcSkovMadsen
Copy link
Collaborator

MarcSkovMadsen commented Apr 8, 2020

Just for the record. The code showcased by @philippjfr for holoviews in VS Code does not work for me.

I get

image

import os
os.environ['HV_DOC_HTML'] = 'True'

import holoviews as hv

hv.extension('bokeh')

hv.renderer('bokeh').theme = 'dark_minimal'

hv.Curve([1, 2, 3])

I get the same error when trying to use Panel

import panel as pn
pn.extension()
pn.Column("# Hello Panel World")

I believe this is a regression as I remember that I have tried it out successfully previously.

I'm using Holoviews 1.13.2. and VS Code 1.43.2

@MarcSkovMadsen
Copy link
Collaborator

Bokeh code works though

from bokeh.plotting import figure, show
from bokeh.io import output_notebook
output_notebook()
plot = figure(plot_width=300, plot_height=300)
plot.line(x=[1,2,3], y=[1,2,3])
show(plot)

image

@philippjfr
Copy link
Member

@MarcSkovMadsen Could you open a new issue in Panel?

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