deephaven / deephaven-ipywidgets

Deephaven Community IPython Widget Library
BSD 3-Clause "New" or "Revised" License
4 stars 4 forks source link

Plots require a `.show()` call to render #15

Open alexpeters1208 opened 1 year ago

alexpeters1208 commented 1 year ago

Description

When creating Deephaven plots in the IDE and Jupyter, plots require a .show() method to render. It is unclear why this is necessary, and we should evaluate whether we can eliminate this call altogether.

Steps to reproduce

In the IDE (or Jupyter, having started a server), run:

from deephaven import time_table from deephaven.plot.figure import Figure

realtime_table = time_table("00:00:00.25").update(["X = i", "Y = Math.sin(0.1 * i)"]) realtime_plot = Figure().plot_xy(series_name="Sine Wave", t=realtime_table, x="X", y="Y")

You will not see any plot render. If you change the last line to

realtime_plot = Figure().plot_xy(series_name="Sine Wave", t=realtime_table, x="X", y="Y").show()

you will now see a rendered plot. It would be good if this call were not required, as it is not required to make tables render and the interface for the two should not feel substantially different.

Versions