holoviz / hvplot

A high-level plotting API for pandas, dask, xarray, and networkx built on HoloViews
https://hvplot.holoviz.org
BSD 3-Clause "New" or "Revised" License
1.14k stars 109 forks source link

option to remove invisible output from importing hvplot.pandas/xarray #1284

Open michaelaye opened 9 months ago

michaelaye commented 9 months ago

Is your feature request related to a problem? Please describe.

It's a (small) annoyance that every import hvplot.pandas or import hvplot.xarray creates some kind of invisible return object, even when using the logo=False option.

In Jupyter notebook it's a very small annoyance, as it's just one line of invisible output (Figure 1). But inside vscode this one line becomes somehow several lines of output (Figure), which is a tad more annoying.

Describe the solution you'd like

An option to remove any output from importing holoviews/hvplot.

Describe alternatives you've considered

I tried logo=False to no avail.

Additional context

image image

I discovered an interesting dependence on order sequence:

  1. hv.extension("bokeh", logo=False)
  2. import hvplot.pandas

This version doesn't create output for the hvplot.pandas anymore.

  1. import hvplot.pandas
  2. hv.extension("bokeh", logo=False)

This version creates output for both calls.

Version info

hvplot: 0.9.2 holoviews: 1.18.3

maximlt commented 8 months ago

Hi @michaelaye, I agree, this isn't great.

I've asked if there's a way to hide these in VSCode (https://github.com/microsoft/vscode-jupyter/discussions/15303).

On a somewhat related note, I've actually been thinking that hvPlot should also display the little logo like HoloViews does. I'm not sure why logo=False was set originally, perhaps because hvPlot only supported the Bokeh backend. Now it supports Matplotlib and Plotly too it'd make more sense to add it. Making it more obvious also makes it less likely for users to delete it (which can cause various problems). @michaelaye would you be fine with hvPlot showing the logos on import and on hvplot.extension calls?

For reference:

michaelaye commented 8 months ago

if it anyway creates a line of output, i guess it might as well just show what's actually going on, but a really quiet way of operating should be possible as well.

mg3146 commented 6 months ago

Hi - was there ever a solution to this? it seems to low-key drive me nuts for whatever reason.

maximlt commented 6 months ago

As far as I can see it is still an open issue on VSCode's side https://github.com/microsoft/vscode/issues/214886. Though I haven't dug into what hvPlot could do to improve that. My feeling is not much.

michaelaye commented 5 months ago

yay, it's in the works! :)

maximlt commented 5 months ago

Thanks for pinging them! It'd be great to see this fixed!