diff --git a/docs/source/conf.py b/docs/source/conf.py index 8d17c97ae..3d611a949 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -49,6 +49,7 @@ sphinx_gallery_conf = { "gallery_dirs": "_gallery", + "notebook_extensions": {}, # remove the download notebook button "backreferences_dir": "_gallery/backreferences", "doc_module": ("fastplotlib",), "image_scrapers": ("pygfx",), diff --git a/docs/source/user_guide/guide.rst b/docs/source/user_guide/guide.rst index 073fa806c..4f3dc64cb 100644 --- a/docs/source/user_guide/guide.rst +++ b/docs/source/user_guide/guide.rst @@ -667,28 +667,61 @@ There are several spaces to consider when using ``fastplotlib``: For more information on the various spaces used by rendering engines please see this `article `_ -Using ``fastplotlib`` in an interactive shell ---------------------------------------------- +JupyterLab and IPython +---------------------- -There are multiple ways to use ``fastplotlib`` in interactive shells, such as ipython. +In ``jupyter lab`` you have the option to embed ``Figures`` in regular output cells, on the side with ``sidecar``, +or show figures in separate Qt windows. Note: Once you have selected a display mode, we do not recommend switching to +a different display mode. Restart the kernel to reliably choose a different display mode. By default, fastplotlib +figures will be embedded in the notebook cell's output. -1) Jupyter +The `quickstart example notebook `_ +is also a great place to start. -On ``jupyter lab`` the jupyter backend (i.e. ``jupyter_rfb``) is normally selected. This works via -client-server rendering. Images generated on the server are streamed to the client (Jupyter) via a jpeg byte stream. -Events (such as mouse or keyboard events) are then streamed in the opposite direction prompting new images to be generated -by the server if necessary. This remote-frame-buffer approach makes the rendering process very fast. ``fastplotlib`` viusalizations -can be displayed in cell output or on the side using ``sidecar``. +Notebooks and remote rendering +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -A Qt backend can also optionally be used as well. If ``%gui qt`` is selected before importing ``fastplotlib`` then this backend -will be used instead. +To display the ``Figure`` in the notebook output, the ``fig.show()`` call must be the last line in the code cell. Or +you can use ipython's display call: ``display(fig.show())``. -Lastly, users can also force using ``glfw`` by specifying this as an argument when instantiating a ``Figure`` (i.e. ``Figure(canvas="gflw"``). +To display the figure on the side: ``fig.show(sidecar=True)`` -.. note:: - Do not mix between gui backends. For example, if you start the notebook using Qt, do not attempt to force using another backend such - as ``jupyter_rfb`` later. +You can make use of all `ipywidget layout `_ +options to display multiple figures:: + + from ipywidgets import VBox, HBox + + # stack figures vertically or horizontally + VBox([fig1.show(), fig2.show()]) + +Again the ``VBox([...])`` call must be the last line in the code cell, or you can use ``display(VBox([...]))`` + +You can combine ipywidget layouting just like any other ipywidget:: + + # display a figure on top of two figures laid out horizontally + + VBox([ + fig1.show(), + HBox([fig2.show(), fig3.show()]) + ]) + +Embedded figures will also render if you're using the notebook from a remote computer since rendering is done on the +server side and the client only receives a jpeg stream of rendered frames. This allows you to visualize very large +datasets on remote servers since the rendering is done remotely and you do not transfer any of the raw data to the +client. + +You can create dashboards or webapps with ``fastplotlib`` by running the notebook with +`voila `_. This is great for sharing visualizations of very large datasets +that are too large to share over the internet, and creating fast interactive applications for the analysis of very +large datasets. + +Qt windows in jupyter and IPython +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -2) IPython +Qt windows can also be used for displaying fastplotlib figures in an interactive jupyterlab or IPython. You must run +``%gui qt`` **before** importing ``fastplotlib`` (or ``wgpu``). This would typically be done at the very top of your +notebook. -Users can select between using a Qt backend or gflw using the same methods as above. +Note that this only works if you are using jupyterlab or ipython locally, this cannot be used for remote rendering. +You can forward windows (ex: X11 forwarding) but this is much slower than the remote rendering described in the +previous section. diff --git a/examples/controllers/specify_integers.py b/examples/controllers/specify_integers.py index 14b09b015..e74b9dd28 100644 --- a/examples/controllers/specify_integers.py +++ b/examples/controllers/specify_integers.py @@ -43,8 +43,8 @@ figure.show(maintain_aspect=False) -# NOTE: `if __name__ == "__main__"` is NOT how to use fastplotlib interactively -# please see our docs for using fastplotlib interactively in ipython and jupyter +# NOTE: fpl.loop.run() should not be used for interactive sessions +# See the "JupyterLab and IPython" section in the user guide if __name__ == "__main__": print(__doc__) fpl.loop.run() diff --git a/examples/controllers/specify_names.py b/examples/controllers/specify_names.py index fb0539c4a..0023651a7 100644 --- a/examples/controllers/specify_names.py +++ b/examples/controllers/specify_names.py @@ -40,8 +40,8 @@ figure.show(maintain_aspect=False) -# NOTE: `if __name__ == "__main__"` is NOT how to use fastplotlib interactively -# please see our docs for using fastplotlib interactively in ipython and jupyter +# NOTE: fpl.loop.run() should not be used for interactive sessions +# See the "JupyterLab and IPython" section in the user guide if __name__ == "__main__": print(__doc__) fpl.loop.run() diff --git a/examples/controllers/sync_all.py b/examples/controllers/sync_all.py index 0683a8827..3a1ee0093 100644 --- a/examples/controllers/sync_all.py +++ b/examples/controllers/sync_all.py @@ -23,8 +23,8 @@ figure.show(maintain_aspect=False) -# NOTE: `if __name__ == "__main__"` is NOT how to use fastplotlib interactively -# please see our docs for using fastplotlib interactively in ipython and jupyter +# NOTE: fpl.loop.run() should not be used for interactive sessions +# See the "JupyterLab and IPython" section in the user guide if __name__ == "__main__": print(__doc__) fpl.loop.run() diff --git a/examples/events/cmap_event.py b/examples/events/cmap_event.py index 6cd68f333..62913cb29 100644 --- a/examples/events/cmap_event.py +++ b/examples/events/cmap_event.py @@ -68,8 +68,8 @@ def cmap_changed(ev: fpl.GraphicFeatureEvent): # change the cmap of graphic image, triggers all other graphics to set the cmap figure["camera"].graphics[0].cmap = "jet" -# NOTE: `if __name__ == "__main__"` is NOT how to use fastplotlib interactively -# please see our docs for using fastplotlib interactively in ipython and jupyter +# NOTE: fpl.loop.run() should not be used for interactive sessions +# See the "JupyterLab and IPython" section in the user guide if __name__ == "__main__": print(__doc__) fpl.loop.run() diff --git a/examples/events/drag_points.py b/examples/events/drag_points.py index 9a91779d4..752430c7c 100644 --- a/examples/events/drag_points.py +++ b/examples/events/drag_points.py @@ -92,8 +92,8 @@ def end_drag(ev: pygfx.PointerEvent): figure.show() -# NOTE: `if __name__ == "__main__"` is NOT how to use fastplotlib interactively -# please see our docs for using fastplotlib interactively in ipython and jupyter +# NOTE: fpl.loop.run() should not be used for interactive sessions +# See the "JupyterLab and IPython" section in the user guide if __name__ == "__main__": print(__doc__) fpl.loop.run() diff --git a/examples/events/image_click.py b/examples/events/image_click.py index acb6cde37..729a67586 100644 --- a/examples/events/image_click.py +++ b/examples/events/image_click.py @@ -37,8 +37,8 @@ def click_event(ev: pygfx.PointerEvent): print(xy) -# NOTE: `if __name__ == "__main__"` is NOT how to use fastplotlib interactively -# please see our docs for using fastplotlib interactively in ipython and jupyter +# NOTE: fpl.loop.run() should not be used for interactive sessions +# See the "JupyterLab and IPython" section in the user guide if __name__ == "__main__": print(__doc__) fpl.loop.run() diff --git a/examples/events/image_data_event.py b/examples/events/image_data_event.py index 32f78996c..f97b1115e 100644 --- a/examples/events/image_data_event.py +++ b/examples/events/image_data_event.py @@ -48,8 +48,8 @@ def data_changed(ev: fpl.GraphicFeatureEvent): image_raw.data = img2 -# NOTE: `if __name__ == "__main__"` is NOT how to use fastplotlib interactively -# please see our docs for using fastplotlib interactively in ipython and jupyter +# NOTE: fpl.loop.run() should not be used for interactive sessions +# See the "JupyterLab and IPython" section in the user guide if __name__ == "__main__": print(__doc__) fpl.loop.run() diff --git a/examples/events/key_events.py b/examples/events/key_events.py index 6979d44d7..f8cf2f3df 100644 --- a/examples/events/key_events.py +++ b/examples/events/key_events.py @@ -77,8 +77,8 @@ def handle_event(ev: pygfx.KeyboardEvent): figure = iw.figure # ignore, this is just so the docs gallery scraper picks up the figure -# NOTE: `if __name__ == "__main__"` is NOT how to use fastplotlib interactively -# please see our docs for using fastplotlib interactively in ipython and jupyter +# NOTE: fpl.loop.run() should not be used for interactive sessions +# See the "JupyterLab and IPython" section in the user guide if __name__ == "__main__": print(__doc__) fpl.loop.run() diff --git a/examples/events/line_data_thickness_event.py b/examples/events/line_data_thickness_event.py index 4baaba42c..83f9322cb 100644 --- a/examples/events/line_data_thickness_event.py +++ b/examples/events/line_data_thickness_event.py @@ -72,8 +72,8 @@ def change_data(ev: fpl.GraphicFeatureEvent): # that causes the sine graphic's thickness to also be set from this value cosine_graphic.thickness = 10 -# NOTE: `if __name__ == "__main__"` is NOT how to use fastplotlib interactively -# please see our docs for using fastplotlib interactively in ipython and jupyter +# NOTE: fpl.loop.run() should not be used for interactive sessions +# See the "JupyterLab and IPython" section in the user guide if __name__ == "__main__": print(__doc__) fpl.loop.run() diff --git a/examples/events/lines_mouse_nearest.py b/examples/events/lines_mouse_nearest.py index 8c9601de6..8d38e9f53 100644 --- a/examples/events/lines_mouse_nearest.py +++ b/examples/events/lines_mouse_nearest.py @@ -55,8 +55,8 @@ def highlight_nearest(ev: pygfx.PointerEvent): figure.show() -# NOTE: `if __name__ == "__main__"` is NOT how to use fastplotlib interactively -# please see our docs for using fastplotlib interactively in ipython and jupyter +# NOTE: fpl.loop.run() should not be used for interactive sessions +# See the "JupyterLab and IPython" section in the user guide if __name__ == "__main__": print(__doc__) fpl.loop.run() diff --git a/examples/events/paint_image.py b/examples/events/paint_image.py index cfc2eda11..46ef43114 100644 --- a/examples/events/paint_image.py +++ b/examples/events/paint_image.py @@ -64,8 +64,8 @@ def on_pointer_up(ev: pygfx.PointerEvent): figure.show() -# NOTE: `if __name__ == "__main__"` is NOT how to use fastplotlib interactively -# please see our docs for using fastplotlib interactively in ipython and jupyter +# NOTE: fpl.loop.run() should not be used for interactive sessions +# See the "JupyterLab and IPython" section in the user guide if __name__ == "__main__": print(__doc__) fpl.loop.run() diff --git a/examples/events/scatter_click.py b/examples/events/scatter_click.py index e56dca743..3bf85558a 100644 --- a/examples/events/scatter_click.py +++ b/examples/events/scatter_click.py @@ -59,8 +59,8 @@ def highlight_point(ev: pygfx.PointerEvent): figure.show() -# NOTE: `if __name__ == "__main__"` is NOT how to use fastplotlib interactively -# please see our docs for using fastplotlib interactively in ipython and jupyter +# NOTE: fpl.loop.run() should not be used for interactive sessions +# See the "JupyterLab and IPython" section in the user guide if __name__ == "__main__": print(__doc__) fpl.loop.run() diff --git a/examples/events/scatter_hover.py b/examples/events/scatter_hover.py index 9d69dc24c..c297223d2 100644 --- a/examples/events/scatter_hover.py +++ b/examples/events/scatter_hover.py @@ -62,8 +62,8 @@ def highlight_point(ev: pygfx.PointerEvent): figure.show() -# NOTE: `if __name__ == "__main__"` is NOT how to use fastplotlib interactively -# please see our docs for using fastplotlib interactively in ipython and jupyter +# NOTE: fpl.loop.run() should not be used for interactive sessions +# See the "JupyterLab and IPython" section in the user guide if __name__ == "__main__": print(__doc__) fpl.loop.run() diff --git a/examples/events/scatter_hover_transforms.py b/examples/events/scatter_hover_transforms.py index 7f9fbb9ff..df0c3c395 100644 --- a/examples/events/scatter_hover_transforms.py +++ b/examples/events/scatter_hover_transforms.py @@ -119,8 +119,8 @@ def highlight_point(ev: pygfx.PointerEvent): figure.show(maintain_aspect=False) -# NOTE: `if __name__ == "__main__"` is NOT how to use fastplotlib interactively -# please see our docs for using fastplotlib interactively in ipython and jupyter +# NOTE: fpl.loop.run() should not be used for interactive sessions +# See the "JupyterLab and IPython" section in the user guide if __name__ == "__main__": print(__doc__) fpl.loop.run() diff --git a/examples/gridplot/gridplot.py b/examples/gridplot/gridplot.py index af4d82408..5edd6a845 100644 --- a/examples/gridplot/gridplot.py +++ b/examples/gridplot/gridplot.py @@ -26,8 +26,8 @@ figure.show() -# NOTE: `if __name__ == "__main__"` is NOT how to use fastplotlib interactively -# please see our docs for using fastplotlib interactively in ipython and jupyter +# NOTE: fpl.loop.run() should not be used for interactive sessions +# See the "JupyterLab and IPython" section in the user guide if __name__ == "__main__": print(__doc__) fpl.loop.run() diff --git a/examples/gridplot/gridplot_non_square.py b/examples/gridplot/gridplot_non_square.py index e8ce15b7b..da0bf14c3 100644 --- a/examples/gridplot/gridplot_non_square.py +++ b/examples/gridplot/gridplot_non_square.py @@ -24,8 +24,8 @@ figure.show() -# NOTE: `if __name__ == "__main__"` is NOT how to use fastplotlib interactively -# please see our docs for using fastplotlib interactively in ipython and jupyter +# NOTE: fpl.loop.run() should not be used for interactive sessions +# See the "JupyterLab and IPython" section in the user guide if __name__ == "__main__": print(__doc__) fpl.loop.run() diff --git a/examples/gridplot/gridplot_viewports_check.py b/examples/gridplot/gridplot_viewports_check.py index 496204b98..45f9d7004 100644 --- a/examples/gridplot/gridplot_viewports_check.py +++ b/examples/gridplot/gridplot_viewports_check.py @@ -30,8 +30,8 @@ figure.show() -# NOTE: `if __name__ == "__main__"` is NOT how to use fastplotlib interactively -# please see our docs for using fastplotlib interactively in ipython and jupyter +# NOTE: fpl.loop.run() should not be used for interactive sessions +# See the "JupyterLab and IPython" section in the user guide if __name__ == "__main__": print(__doc__) fpl.loop.run() diff --git a/examples/gridplot/multigraphic_gridplot.py b/examples/gridplot/multigraphic_gridplot.py index 8408f4f23..d89168ec9 100644 --- a/examples/gridplot/multigraphic_gridplot.py +++ b/examples/gridplot/multigraphic_gridplot.py @@ -110,8 +110,8 @@ def make_circle(center, radius: float, n_points: int = 75) -> np.ndarray: figure.show() -# NOTE: `if __name__ == "__main__"` is NOT how to use fastplotlib interactively -# please see our docs for using fastplotlib interactively in ipython and jupyter +# NOTE: fpl.loop.run() should not be used for interactive sessions +# See the "JupyterLab and IPython" section in the user guide if __name__ == "__main__": print(__doc__) fpl.loop.run() diff --git a/examples/guis/image_widget_imgui.py b/examples/guis/image_widget_imgui.py index 13d41af20..759d87a07 100644 --- a/examples/guis/image_widget_imgui.py +++ b/examples/guis/image_widget_imgui.py @@ -75,8 +75,8 @@ def process_image(self): figure = iw.figure -# NOTE: `if __name__ == "__main__"` is NOT how to use fastplotlib interactively -# please see our docs for using fastplotlib interactively in ipython and jupyter +# NOTE: fpl.loop.run() should not be used for interactive sessions +# See the "JupyterLab and IPython" section in the user guide if __name__ == "__main__": print(__doc__) fpl.loop.run() diff --git a/examples/guis/imgui_basic.py b/examples/guis/imgui_basic.py index eac39121c..26b5603c0 100644 --- a/examples/guis/imgui_basic.py +++ b/examples/guis/imgui_basic.py @@ -116,8 +116,8 @@ def _set_data(self): figure.show() -# NOTE: `if __name__ == "__main__"` is NOT how to use fastplotlib interactively -# please see our docs for using fastplotlib interactively in ipython and jupyter +# NOTE: fpl.loop.run() should not be used for interactive sessions +# See the "JupyterLab and IPython" section in the user guide if __name__ == "__main__": print(__doc__) fpl.loop.run() diff --git a/examples/guis/sine_cosine_funcs.py b/examples/guis/sine_cosine_funcs.py index c91a3b2e8..09a5ec990 100644 --- a/examples/guis/sine_cosine_funcs.py +++ b/examples/guis/sine_cosine_funcs.py @@ -179,8 +179,8 @@ def update(self): figure.show() -# NOTE: `if __name__ == "__main__"` is NOT how to use fastplotlib interactively -# please see our docs for using fastplotlib interactively in ipython and jupyter +# NOTE: fpl.loop.run() should not be used for interactive sessions +# See the "JupyterLab and IPython" section in the user guide if __name__ == "__main__": print(__doc__) fpl.loop.run() diff --git a/examples/heatmap/heatmap.py b/examples/heatmap/heatmap.py index 39d76ae4e..38c9b51a7 100644 --- a/examples/heatmap/heatmap.py +++ b/examples/heatmap/heatmap.py @@ -26,8 +26,8 @@ figure.show() -# NOTE: `if __name__ == "__main__"` is NOT how to use fastplotlib interactively -# please see our docs for using fastplotlib interactively in ipython and jupyter +# NOTE: fpl.loop.run() should not be used for interactive sessions +# See the "JupyterLab and IPython" section in the user guide if __name__ == "__main__": print(__doc__) fpl.loop.run() diff --git a/examples/image/image_cmap.py b/examples/image/image_cmap.py index 99a3c1969..f651f438c 100644 --- a/examples/image/image_cmap.py +++ b/examples/image/image_cmap.py @@ -22,8 +22,8 @@ image_graphic.cmap = "viridis" -# NOTE: `if __name__ == "__main__"` is NOT how to use fastplotlib interactively -# please see our docs for using fastplotlib interactively in ipython and jupyter +# NOTE: fpl.loop.run() should not be used for interactive sessions +# See the "JupyterLab and IPython" section in the user guide if __name__ == "__main__": print(__doc__) fpl.loop.run() diff --git a/examples/image/image_rgb.py b/examples/image/image_rgb.py index 5af8cee0d..187dac553 100644 --- a/examples/image/image_rgb.py +++ b/examples/image/image_rgb.py @@ -21,8 +21,8 @@ figure.show() -# NOTE: `if __name__ == "__main__"` is NOT how to use fastplotlib interactively -# please see our docs for using fastplotlib interactively in ipython and jupyter +# NOTE: fpl.loop.run() should not be used for interactive sessions +# See the "JupyterLab and IPython" section in the user guide if __name__ == "__main__": print(__doc__) fpl.loop.run() diff --git a/examples/image/image_rgbvminvmax.py b/examples/image/image_rgbvminvmax.py index 08c01a36e..02635f134 100644 --- a/examples/image/image_rgbvminvmax.py +++ b/examples/image/image_rgbvminvmax.py @@ -23,8 +23,8 @@ image_graphic.vmin = 0.5 image_graphic.vmax = 0.75 -# NOTE: `if __name__ == "__main__"` is NOT how to use fastplotlib interactively -# please see our docs for using fastplotlib interactively in ipython and jupyter +# NOTE: fpl.loop.run() should not be used for interactive sessions +# See the "JupyterLab and IPython" section in the user guide if __name__ == "__main__": print(__doc__) fpl.loop.run() diff --git a/examples/image/image_simple.py b/examples/image/image_simple.py index 31803f2f8..d0910fb82 100644 --- a/examples/image/image_simple.py +++ b/examples/image/image_simple.py @@ -20,9 +20,8 @@ figure.show() - -# NOTE: `if __name__ == "__main__"` is NOT how to use fastplotlib interactively -# please see our docs for using fastplotlib interactively in ipython and jupyter +# NOTE: fpl.loop.run() should not be used for interactive sessions +# See the "JupyterLab and IPython" section in the user guide if __name__ == "__main__": print(__doc__) fpl.loop.run() diff --git a/examples/image/image_small.py b/examples/image/image_small.py index eebc49797..732d61d74 100644 --- a/examples/image/image_small.py +++ b/examples/image/image_small.py @@ -22,9 +22,8 @@ figure.show() - -# NOTE: `if __name__ == "__main__"` is NOT how to use fastplotlib interactively -# please see our docs for using fastplotlib interactively in ipython and jupyter +# NOTE: fpl.loop.run() should not be used for interactive sessions +# See the "JupyterLab and IPython" section in the user guide if __name__ == "__main__": print(__doc__) fpl.loop.run() diff --git a/examples/image/image_vminvmax.py b/examples/image/image_vminvmax.py index 6cf13834d..e2d1c7743 100644 --- a/examples/image/image_vminvmax.py +++ b/examples/image/image_vminvmax.py @@ -23,8 +23,8 @@ image_graphic.vmin = 0.5 image_graphic.vmax = 0.75 -# NOTE: `if __name__ == "__main__"` is NOT how to use fastplotlib interactively -# please see our docs for using fastplotlib interactively in ipython and jupyter +# NOTE: fpl.loop.run() should not be used for interactive sessions +# See the "JupyterLab and IPython" section in the user guide if __name__ == "__main__": print(__doc__) fpl.loop.run() diff --git a/examples/image_widget/image_widget.py b/examples/image_widget/image_widget.py index 4fe47b7fe..a3c332182 100644 --- a/examples/image_widget/image_widget.py +++ b/examples/image_widget/image_widget.py @@ -27,8 +27,8 @@ figure = iw.figure -# NOTE: `if __name__ == "__main__"` is NOT how to use fastplotlib interactively -# please see our docs for using fastplotlib interactively in ipython and jupyter +# NOTE: fpl.loop.run() should not be used for interactive sessions +# See the "JupyterLab and IPython" section in the user guide if __name__ == "__main__": print(__doc__) fpl.loop.run() diff --git a/examples/image_widget/image_widget_grid.py b/examples/image_widget/image_widget_grid.py index f52f38bc5..41e964e95 100644 --- a/examples/image_widget/image_widget_grid.py +++ b/examples/image_widget/image_widget_grid.py @@ -34,8 +34,8 @@ subplot.toolbar = False -# NOTE: `if __name__ == "__main__"` is NOT how to use fastplotlib interactively -# please see our docs for using fastplotlib interactively in ipython and jupyter +# NOTE: fpl.loop.run() should not be used for interactive sessions +# See the "JupyterLab and IPython" section in the user guide if __name__ == "__main__": print(__doc__) fpl.loop.run() diff --git a/examples/image_widget/image_widget_single_video.py b/examples/image_widget/image_widget_single_video.py index aa601d3c1..86ca642fa 100644 --- a/examples/image_widget/image_widget_single_video.py +++ b/examples/image_widget/image_widget_single_video.py @@ -40,8 +40,8 @@ figure = iw.figure -# NOTE: `if __name__ == "__main__"` is NOT how to use fastplotlib interactively -# please see our docs for using fastplotlib interactively in ipython and jupyter +# NOTE: fpl.loop.run() should not be used for interactive sessions +# See the "JupyterLab and IPython" section in the user guide if __name__ == "__main__": print(__doc__) fpl.loop.run() diff --git a/examples/image_widget/image_widget_videos.py b/examples/image_widget/image_widget_videos.py index 7de4a9c04..399abbcff 100644 --- a/examples/image_widget/image_widget_videos.py +++ b/examples/image_widget/image_widget_videos.py @@ -36,8 +36,8 @@ figure = iw.figure -# NOTE: `if __name__ == "__main__"` is NOT how to use fastplotlib interactively -# please see our docs for using fastplotlib interactively in ipython and jupyter +# NOTE: fpl.loop.run() should not be used for interactive sessions +# See the "JupyterLab and IPython" section in the user guide if __name__ == "__main__": print(__doc__) fpl.loop.run() diff --git a/examples/image_widget/image_widget_viewports_check.py b/examples/image_widget/image_widget_viewports_check.py index 057134341..a4c0aea03 100644 --- a/examples/image_widget/image_widget_viewports_check.py +++ b/examples/image_widget/image_widget_viewports_check.py @@ -28,8 +28,8 @@ figure = iw.figure -# NOTE: `if __name__ == "__main__"` is NOT how to use fastplotlib interactively -# please see our docs for using fastplotlib interactively in ipython and jupyter +# NOTE: fpl.loop.run() should not be used for interactive sessions +# See the "JupyterLab and IPython" section in the user guide if __name__ == "__main__": print(__doc__) fpl.loop.run() diff --git a/examples/line/line.py b/examples/line/line.py index c460c84ac..fb8834759 100644 --- a/examples/line/line.py +++ b/examples/line/line.py @@ -40,8 +40,8 @@ figure.show() -# NOTE: `if __name__ == "__main__"` is NOT how to use fastplotlib interactively -# please see our docs for using fastplotlib interactively in ipython and jupyter +# NOTE: fpl.loop.run() should not be used for interactive sessions +# See the "JupyterLab and IPython" section in the user guide if __name__ == "__main__": print(__doc__) fpl.loop.run() diff --git a/examples/line/line_cmap.py b/examples/line/line_cmap.py index b2fb39779..af24f1c63 100644 --- a/examples/line/line_cmap.py +++ b/examples/line/line_cmap.py @@ -42,8 +42,8 @@ figure.show() -# NOTE: `if __name__ == "__main__"` is NOT how to use fastplotlib interactively -# please see our docs for using fastplotlib interactively in ipython and jupyter +# NOTE: fpl.loop.run() should not be used for interactive sessions +# See the "JupyterLab and IPython" section in the user guide if __name__ == "__main__": print(__doc__) fpl.loop.run() diff --git a/examples/line/line_cmap_more.py b/examples/line/line_cmap_more.py index 37fd68cdb..c7c0d80f4 100644 --- a/examples/line/line_cmap_more.py +++ b/examples/line/line_cmap_more.py @@ -49,8 +49,8 @@ figure.show(maintain_aspect=False) -# NOTE: `if __name__ == "__main__"` is NOT how to use fastplotlib interactively -# please see our docs for using fastplotlib interactively in ipython and jupyter +# NOTE: fpl.loop.run() should not be used for interactive sessions +# See the "JupyterLab and IPython" section in the user guide if __name__ == "__main__": print(__doc__) fpl.loop.run() diff --git a/examples/line/line_colorslice.py b/examples/line/line_colorslice.py index 788aa342d..2d4c0dcaa 100644 --- a/examples/line/line_colorslice.py +++ b/examples/line/line_colorslice.py @@ -83,8 +83,8 @@ zeros_graphic.cmap[75:] = "viridis" -# NOTE: `if __name__ == "__main__"` is NOT how to use fastplotlib interactively -# please see our docs for using fastplotlib interactively in ipython and jupyter +# NOTE: fpl.loop.run() should not be used for interactive sessions +# See the "JupyterLab and IPython" section in the user guide if __name__ == "__main__": print(__doc__) fpl.loop.run() diff --git a/examples/line/line_dataslice.py b/examples/line/line_dataslice.py index 92f33a109..ca0f48518 100644 --- a/examples/line/line_dataslice.py +++ b/examples/line/line_dataslice.py @@ -47,8 +47,8 @@ sinc_graphic.data[bool_key, 1] = 7 # y vals to 1 -# NOTE: `if __name__ == "__main__"` is NOT how to use fastplotlib interactively -# please see our docs for using fastplotlib interactively in ipython and jupyter +# NOTE: fpl.loop.run() should not be used for interactive sessions +# See the "JupyterLab and IPython" section in the user guide if __name__ == "__main__": print(__doc__) fpl.loop.run() diff --git a/examples/line_collection/line_collection.py b/examples/line_collection/line_collection.py index 75b56e61e..2ddfbe2ed 100644 --- a/examples/line_collection/line_collection.py +++ b/examples/line_collection/line_collection.py @@ -29,7 +29,7 @@ def make_circle(center, radius: float, n_points: int = 75) -> np.ndarray: pos_xy = np.vstack(circles) -figure = fpl.Figure(size=(700, 560)) +figure = fpl.Figure(size=(700, 560), show_tooltips=True) figure[0, 0].add_line_collection(circles, cmap="jet", thickness=5) @@ -39,8 +39,8 @@ def make_circle(center, radius: float, n_points: int = 75) -> np.ndarray: figure.show() -# NOTE: `if __name__ == "__main__"` is NOT how to use fastplotlib interactively -# please see our docs for using fastplotlib interactively in ipython and jupyter +# NOTE: fpl.loop.run() should not be used for interactive sessions +# See the "JupyterLab and IPython" section in the user guide if __name__ == "__main__": print(__doc__) fpl.loop.run() diff --git a/examples/line_collection/line_collection_cmap_values.py b/examples/line_collection/line_collection_cmap_values.py index c577609f9..59f456893 100644 --- a/examples/line_collection/line_collection_cmap_values.py +++ b/examples/line_collection/line_collection_cmap_values.py @@ -46,8 +46,8 @@ def make_circle(center, radius: float, n_points: int = 75) -> np.ndarray: figure.show() -# NOTE: `if __name__ == "__main__"` is NOT how to use fastplotlib interactively -# please see our docs for using fastplotlib interactively in ipython and jupyter +# NOTE: fpl.loop.run() should not be used for interactive sessions +# See the "JupyterLab and IPython" section in the user guide if __name__ == "__main__": print(__doc__) fpl.loop.run() diff --git a/examples/line_collection/line_collection_cmap_values_qualitative.py b/examples/line_collection/line_collection_cmap_values_qualitative.py index 7b1c0a419..399f4a93d 100644 --- a/examples/line_collection/line_collection_cmap_values_qualitative.py +++ b/examples/line_collection/line_collection_cmap_values_qualitative.py @@ -56,8 +56,8 @@ def make_circle(center, radius: float, n_points: int = 75) -> np.ndarray: figure.show() -# NOTE: `if __name__ == "__main__"` is NOT how to use fastplotlib interactively -# please see our docs for using fastplotlib interactively in ipython and jupyter +# NOTE: fpl.loop.run() should not be used for interactive sessions +# See the "JupyterLab and IPython" section in the user guide if __name__ == "__main__": print(__doc__) fpl.loop.run() diff --git a/examples/line_collection/line_collection_colors.py b/examples/line_collection/line_collection_colors.py index 1d9eff45d..b7b25e853 100644 --- a/examples/line_collection/line_collection_colors.py +++ b/examples/line_collection/line_collection_colors.py @@ -43,8 +43,8 @@ def make_circle(center, radius: float, n_points: int = 75) -> np.ndarray: figure.show() -# NOTE: `if __name__ == "__main__"` is NOT how to use fastplotlib interactively -# please see our docs for using fastplotlib interactively in ipython and jupyter +# NOTE: fpl.loop.run() should not be used for interactive sessions +# See the "JupyterLab and IPython" section in the user guide if __name__ == "__main__": print(__doc__) fpl.loop.run() diff --git a/examples/line_collection/line_stack.py b/examples/line_collection/line_stack.py index 4f0c6037d..829708cb7 100644 --- a/examples/line_collection/line_stack.py +++ b/examples/line_collection/line_stack.py @@ -54,8 +54,8 @@ def tooltip_info(ev): figure.show(maintain_aspect=False) -# NOTE: `if __name__ == "__main__"` is NOT how to use fastplotlib interactively -# please see our docs for using fastplotlib interactively in ipython and jupyter +# NOTE: fpl.loop.run() should not be used for interactive sessions +# See the "JupyterLab and IPython" section in the user guide if __name__ == "__main__": print(__doc__) fpl.loop.run() diff --git a/examples/line_collection/line_stack_3d.py b/examples/line_collection/line_stack_3d.py index 35fe48ca9..b4548c1c6 100644 --- a/examples/line_collection/line_stack_3d.py +++ b/examples/line_collection/line_stack_3d.py @@ -101,8 +101,8 @@ def animate_colors(subplot): figure[0, 0].camera.set_state(camera_state) -# NOTE: `if __name__ == "__main__"` is NOT how to use fastplotlib interactively -# please see our docs for using fastplotlib interactively in ipython and jupyter +# NOTE: fpl.loop.run() should not be used for interactive sessions +# See the "JupyterLab and IPython" section in the user guide if __name__ == "__main__": print(__doc__) fpl.loop.run() diff --git a/examples/machine_learning/covariance.py b/examples/machine_learning/covariance.py index 84c5bf531..82d30503b 100644 --- a/examples/machine_learning/covariance.py +++ b/examples/machine_learning/covariance.py @@ -87,8 +87,8 @@ def animate(): iw.show() -# NOTE: `if __name__ == "__main__"` is NOT how to use fastplotlib interactively -# please see our docs for using fastplotlib interactively in ipython and jupyter +# NOTE: fpl.loop.run() should not be used for interactive sessions +# See the "JupyterLab and IPython" section in the user guide if __name__ == "__main__": print(__doc__) fpl.loop.run() diff --git a/examples/machine_learning/kmeans.py b/examples/machine_learning/kmeans.py index 0aae8fdae..f571882ce 100644 --- a/examples/machine_learning/kmeans.py +++ b/examples/machine_learning/kmeans.py @@ -118,8 +118,8 @@ def update(ev): figure.show() -# NOTE: `if __name__ == "__main__"` is NOT how to use fastplotlib interactively -# please see our docs for using fastplotlib interactively in ipython and jupyter +# NOTE: fpl.loop.run() should not be used for interactive sessions +# See the "JupyterLab and IPython" section in the user guide if __name__ == "__main__": print(__doc__) fpl.loop.run() \ No newline at end of file diff --git a/examples/misc/cycle_animation.py b/examples/misc/cycle_animation.py index e369b957c..833321453 100644 --- a/examples/misc/cycle_animation.py +++ b/examples/misc/cycle_animation.py @@ -54,8 +54,8 @@ def cycle_colors(subplot): figure.show() -# NOTE: `if __name__ == "__main__"` is NOT how to use fastplotlib interactively -# please see our docs for using fastplotlib interactively in ipython and jupyter +# NOTE: fpl.loop.run() should not be used for interactive sessions +# See the "JupyterLab and IPython" section in the user guide if __name__ == "__main__": print(__doc__) fpl.loop.run() diff --git a/examples/misc/em_wave_animation.py b/examples/misc/em_wave_animation.py index 06c60ccaf..f2b9f8de5 100644 --- a/examples/misc/em_wave_animation.py +++ b/examples/misc/em_wave_animation.py @@ -108,8 +108,8 @@ def tick(subplot): figure[0, 0].add_animations(tick) print(figure[0, 0]._fpl_graphics_scene.children) -# NOTE: `if __name__ == "__main__"` is NOT how to use fastplotlib interactively -# please see our docs for using fastplotlib interactively in ipython and jupyter +# NOTE: fpl.loop.run() should not be used for interactive sessions +# See the "JupyterLab and IPython" section in the user guide if __name__ == "__main__": print(__doc__) fpl.loop.run() diff --git a/examples/misc/image_animation.py b/examples/misc/image_animation.py index bc5f83957..1f7ff6109 100644 --- a/examples/misc/image_animation.py +++ b/examples/misc/image_animation.py @@ -30,8 +30,8 @@ def update_data(figure_instance): figure.show() -# NOTE: `if __name__ == "__main__"` is NOT how to use fastplotlib interactively -# please see our docs for using fastplotlib interactively in ipython and jupyter +# NOTE: fpl.loop.run() should not be used for interactive sessions +# See the "JupyterLab and IPython" section in the user guide if __name__ == "__main__": print(__doc__) fpl.loop.run() diff --git a/examples/misc/line3d_animation.py b/examples/misc/line3d_animation.py index b26bfd3a0..c1d903e02 100644 --- a/examples/misc/line3d_animation.py +++ b/examples/misc/line3d_animation.py @@ -54,8 +54,8 @@ def move_marker(): figure.show() -# NOTE: `if __name__ == "__main__"` is NOT how to use fastplotlib interactively -# please see our docs for using fastplotlib interactively in ipython and jupyter +# NOTE: fpl.loop.run() should not be used for interactive sessions +# See the "JupyterLab and IPython" section in the user guide if __name__ == "__main__": print(__doc__) fpl.loop.run() diff --git a/examples/misc/line_animation.py b/examples/misc/line_animation.py index 07c6a7d94..86448a78b 100644 --- a/examples/misc/line_animation.py +++ b/examples/misc/line_animation.py @@ -43,8 +43,8 @@ def update_line(subplot): figure.show(maintain_aspect=False) -# NOTE: `if __name__ == "__main__"` is NOT how to use fastplotlib interactively -# please see our docs for using fastplotlib interactively in ipython and jupyter +# NOTE: fpl.loop.run() should not be used for interactive sessions +# See the "JupyterLab and IPython" section in the user guide if __name__ == "__main__": print(__doc__) fpl.loop.run() diff --git a/examples/misc/lorenz_animation.py b/examples/misc/lorenz_animation.py index 4d4c5129f..20aee5d83 100644 --- a/examples/misc/lorenz_animation.py +++ b/examples/misc/lorenz_animation.py @@ -86,8 +86,8 @@ def animate(subplot): # set initial camera position to make animation in gallery render better figure[0, 0].camera.world.z = 80 -# NOTE: `if __name__ == "__main__"` is NOT how to use fastplotlib interactively -# please see our docs for using fastplotlib interactively in ipython and jupyter +# NOTE: fpl.loop.run() should not be used for interactive sessions +# See the "JupyterLab and IPython" section in the user guide if __name__ == "__main__": print(__doc__) fpl.loop.run() diff --git a/examples/misc/multiplot_animation.py b/examples/misc/multiplot_animation.py index 4eb9399f8..789ce744e 100644 --- a/examples/misc/multiplot_animation.py +++ b/examples/misc/multiplot_animation.py @@ -41,8 +41,8 @@ def update_data(f): figure.show() -# NOTE: `if __name__ == "__main__"` is NOT how to use fastplotlib interactively -# please see our docs for using fastplotlib interactively in ipython and jupyter +# NOTE: fpl.loop.run() should not be used for interactive sessions +# See the "JupyterLab and IPython" section in the user guide if __name__ == "__main__": print(__doc__) fpl.loop.run() diff --git a/examples/misc/scatter_animation.py b/examples/misc/scatter_animation.py index d85a33e6a..ee8d2a10a 100644 --- a/examples/misc/scatter_animation.py +++ b/examples/misc/scatter_animation.py @@ -51,8 +51,8 @@ def update_points(subplot): figure.show() -# NOTE: `if __name__ == "__main__"` is NOT how to use fastplotlib interactively -# please see our docs for using fastplotlib interactively in ipython and jupyter +# NOTE: fpl.loop.run() should not be used for interactive sessions +# See the "JupyterLab and IPython" section in the user guide if __name__ == "__main__": print(__doc__) fpl.loop.run() diff --git a/examples/misc/scatter_sizes_animation.py b/examples/misc/scatter_sizes_animation.py index 45782564d..53a616a68 100644 --- a/examples/misc/scatter_sizes_animation.py +++ b/examples/misc/scatter_sizes_animation.py @@ -40,8 +40,8 @@ def update_sizes(subplot): figure.show(maintain_aspect=False) -# NOTE: `if __name__ == "__main__"` is NOT how to use fastplotlib interactively -# please see our docs for using fastplotlib interactively in ipython and jupyter +# NOTE: fpl.loop.run() should not be used for interactive sessions +# See the "JupyterLab and IPython" section in the user guide if __name__ == "__main__": print(__doc__) fpl.loop.run() diff --git a/examples/misc/tooltips.py b/examples/misc/tooltips.py index 4fdae1482..cad3d807c 100644 --- a/examples/misc/tooltips.py +++ b/examples/misc/tooltips.py @@ -47,8 +47,8 @@ # figure.show_tooltips = True -# NOTE: `if __name__ == "__main__"` is NOT how to use fastplotlib interactively -# please see our docs for using fastplotlib interactively in ipython and jupyter +# NOTE: fpl.loop.run() should not be used for interactive sessions +# See the "JupyterLab and IPython" section in the user guide if __name__ == "__main__": print(__doc__) fpl.loop.run() diff --git a/examples/scatter/scatter.py b/examples/scatter/scatter.py index afb0a0b81..838199ecb 100644 --- a/examples/scatter/scatter.py +++ b/examples/scatter/scatter.py @@ -41,8 +41,8 @@ figure.show() -# NOTE: `if __name__ == "__main__"` is NOT how to use fastplotlib interactively -# please see our docs for using fastplotlib interactively in ipython and jupyter +# NOTE: fpl.loop.run() should not be used for interactive sessions +# See the "JupyterLab and IPython" section in the user guide if __name__ == "__main__": print(__doc__) fpl.loop.run() diff --git a/examples/scatter/scatter_cmap.py b/examples/scatter/scatter_cmap.py index 8810e3d7b..3c7bd0e21 100644 --- a/examples/scatter/scatter_cmap.py +++ b/examples/scatter/scatter_cmap.py @@ -43,8 +43,8 @@ figure[0, 0].graphics[0].cmap = "viridis" -# NOTE: `if __name__ == "__main__"` is NOT how to use fastplotlib interactively -# please see our docs for using fastplotlib interactively in ipython and jupyter +# NOTE: fpl.loop.run() should not be used for interactive sessions +# See the "JupyterLab and IPython" section in the user guide if __name__ == "__main__": print(__doc__) fpl.loop.run() diff --git a/examples/scatter/scatter_colorslice.py b/examples/scatter/scatter_colorslice.py index cf7472361..a3cacee55 100644 --- a/examples/scatter/scatter_colorslice.py +++ b/examples/scatter/scatter_colorslice.py @@ -46,8 +46,8 @@ scatter_graphic.colors[75:150] = "white" scatter_graphic.colors[::2] = "blue" -# NOTE: `if __name__ == "__main__"` is NOT how to use fastplotlib interactively -# please see our docs for using fastplotlib interactively in ipython and jupyter +# NOTE: fpl.loop.run() should not be used for interactive sessions +# See the "JupyterLab and IPython" section in the user guide if __name__ == "__main__": print(__doc__) fpl.loop.run() diff --git a/examples/scatter/scatter_dataslice.py b/examples/scatter/scatter_dataslice.py index 840553237..7a30d6f70 100644 --- a/examples/scatter/scatter_dataslice.py +++ b/examples/scatter/scatter_dataslice.py @@ -32,8 +32,8 @@ scatter1.data[:500] = np.array([0 , 0, 0]) scatter2.data[500:] = np.array([0 , 0, 0]) -# NOTE: `if __name__ == "__main__"` is NOT how to use fastplotlib interactively -# please see our docs for using fastplotlib interactively in ipython and jupyter +# NOTE: fpl.loop.run() should not be used for interactive sessions +# See the "JupyterLab and IPython" section in the user guide if __name__ == "__main__": print(__doc__) fpl.loop.run() diff --git a/examples/scatter/scatter_iris.py b/examples/scatter/scatter_iris.py index e000d5a0a..94c8acca1 100644 --- a/examples/scatter/scatter_iris.py +++ b/examples/scatter/scatter_iris.py @@ -28,8 +28,8 @@ figure.show() -# NOTE: `if __name__ == "__main__"` is NOT how to use fastplotlib interactively -# please see our docs for using fastplotlib interactively in ipython and jupyter +# NOTE: fpl.loop.run() should not be used for interactive sessions +# See the "JupyterLab and IPython" section in the user guide if __name__ == "__main__": print(__doc__) fpl.loop.run() diff --git a/examples/scatter/scatter_size.py b/examples/scatter/scatter_size.py index c982e0220..30d3e6ea3 100644 --- a/examples/scatter/scatter_size.py +++ b/examples/scatter/scatter_size.py @@ -43,8 +43,8 @@ figure.show() -# NOTE: `if __name__ == "__main__"` is NOT how to use fastplotlib interactively -# please see our docs for using fastplotlib interactively in ipython and jupyter +# NOTE: fpl.loop.run() should not be used for interactive sessions +# See the "JupyterLab and IPython" section in the user guide if __name__ == "__main__": print(__doc__) fpl.loop.run() diff --git a/examples/scatter/spinning_spiral.py b/examples/scatter/spinning_spiral.py index 56cdcb906..80e893301 100644 --- a/examples/scatter/spinning_spiral.py +++ b/examples/scatter/spinning_spiral.py @@ -79,8 +79,8 @@ def update(): figure.imgui_show_fps = True -# NOTE: `if __name__ == "__main__"` is NOT how to use fastplotlib interactively -# please see our docs for using fastplotlib interactively in ipython and jupyter +# NOTE: fpl.loop.run() should not be used for interactive sessions +# See the "JupyterLab and IPython" section in the user guide if __name__ == "__main__": print(__doc__) fpl.loop.run() diff --git a/examples/selection_tools/fft.py b/examples/selection_tools/fft.py index f249f2c11..46ab8f89f 100644 --- a/examples/selection_tools/fft.py +++ b/examples/selection_tools/fft.py @@ -94,8 +94,8 @@ def update_images(ev): figure = iw.figure -# NOTE: `if __name__ == "__main__"` is NOT how to use fastplotlib interactively -# please see our docs for using fastplotlib interactively in ipython and jupyter +# NOTE: fpl.loop.run() should not be used for interactive sessions +# See the "JupyterLab and IPython" section in the user guide if __name__ == "__main__": print(__doc__) fpl.loop.run() diff --git a/examples/selection_tools/linear_region_line_collection.py b/examples/selection_tools/linear_region_line_collection.py index 4b85b34dc..05084df0f 100644 --- a/examples/selection_tools/linear_region_line_collection.py +++ b/examples/selection_tools/linear_region_line_collection.py @@ -77,8 +77,8 @@ def update_zoomed_subplots(ev): figure.show(maintain_aspect=False) -# NOTE: `if __name__ == "__main__"` is NOT how to use fastplotlib interactively -# please see our docs for using fastplotlib interactively in ipython and jupyter +# NOTE: fpl.loop.run() should not be used for interactive sessions +# See the "JupyterLab and IPython" section in the user guide if __name__ == "__main__": print(__doc__) fpl.loop.run() diff --git a/examples/selection_tools/linear_region_selector.py b/examples/selection_tools/linear_region_selector.py index 272623370..5c6d6e01b 100644 --- a/examples/selection_tools/linear_region_selector.py +++ b/examples/selection_tools/linear_region_selector.py @@ -107,8 +107,8 @@ def set_zoom_y(ev): figure.show(maintain_aspect=False) -# NOTE: `if __name__ == "__main__"` is NOT how to use fastplotlib interactively -# please see our docs for using fastplotlib interactively in ipython and jupyter +# NOTE: fpl.loop.run() should not be used for interactive sessions +# See the "JupyterLab and IPython" section in the user guide if __name__ == "__main__": print(__doc__) fpl.loop.run() diff --git a/examples/selection_tools/linear_region_selectors_match_offsets.py b/examples/selection_tools/linear_region_selectors_match_offsets.py index a803a5e75..7ac9cc486 100644 --- a/examples/selection_tools/linear_region_selectors_match_offsets.py +++ b/examples/selection_tools/linear_region_selectors_match_offsets.py @@ -102,8 +102,8 @@ def set_zoom_y(ev): figure.show(maintain_aspect=False) -# NOTE: `if __name__ == "__main__"` is NOT how to use fastplotlib interactively -# please see our docs for using fastplotlib interactively in ipython and jupyter +# NOTE: fpl.loop.run() should not be used for interactive sessions +# See the "JupyterLab and IPython" section in the user guide if __name__ == "__main__": print(__doc__) fpl.loop.run() diff --git a/examples/selection_tools/linear_selector.py b/examples/selection_tools/linear_selector.py index d7a8e6739..65fd8f1b1 100644 --- a/examples/selection_tools/linear_selector.py +++ b/examples/selection_tools/linear_selector.py @@ -115,8 +115,8 @@ def line_stack_selector_changed(ev): figure.show(maintain_aspect=False) -# NOTE: `if __name__ == "__main__"` is NOT how to use fastplotlib interactively -# please see our docs for using fastplotlib interactively in ipython and jupyter +# NOTE: fpl.loop.run() should not be used for interactive sessions +# See the "JupyterLab and IPython" section in the user guide if __name__ == "__main__": print(__doc__) fpl.loop.run() diff --git a/examples/selection_tools/linear_selector_image.py b/examples/selection_tools/linear_selector_image.py index 00484aba7..04844b568 100644 --- a/examples/selection_tools/linear_selector_image.py +++ b/examples/selection_tools/linear_selector_image.py @@ -66,8 +66,8 @@ def image_col_selector_changed(ev): subplot.camera.zoom = 0.5 -# NOTE: `if __name__ == "__main__"` is NOT how to use fastplotlib interactively -# please see our docs for using fastplotlib interactively in ipython and jupyter +# NOTE: fpl.loop.run() should not be used for interactive sessions +# See the "JupyterLab and IPython" section in the user guide if __name__ == "__main__": print(__doc__) fpl.loop.run() diff --git a/examples/selection_tools/rectangle_selector.py b/examples/selection_tools/rectangle_selector.py index 850937f7a..d0fd33aa9 100644 --- a/examples/selection_tools/rectangle_selector.py +++ b/examples/selection_tools/rectangle_selector.py @@ -59,8 +59,8 @@ def color_indices(ev): figure.show() -# NOTE: `if __name__ == "__main__"` is NOT how to use fastplotlib interactively -# please see our docs for using fastplotlib interactively in ipython and jupyter +# NOTE: fpl.loop.run() should not be used for interactive sessions +# See the "JupyterLab and IPython" section in the user guide if __name__ == "__main__": print(__doc__) fpl.loop.run() diff --git a/examples/selection_tools/rectangle_selector_zoom.py b/examples/selection_tools/rectangle_selector_zoom.py index 33ba2ae2a..61e38ffc9 100644 --- a/examples/selection_tools/rectangle_selector_zoom.py +++ b/examples/selection_tools/rectangle_selector_zoom.py @@ -46,8 +46,8 @@ def update_data(ev): figure.show() -# NOTE: `if __name__ == "__main__"` is NOT how to use fastplotlib interactively -# please see our docs for using fastplotlib interactively in ipython and jupyter +# NOTE: fpl.loop.run() should not be used for interactive sessions +# See the "JupyterLab and IPython" section in the user guide if __name__ == "__main__": print(__doc__) fpl.loop.run() diff --git a/examples/selection_tools/unit_circle.py b/examples/selection_tools/unit_circle.py index 2850b1bc1..b068d1bc7 100644 --- a/examples/selection_tools/unit_circle.py +++ b/examples/selection_tools/unit_circle.py @@ -135,8 +135,8 @@ def set_x_val(ev): figure.show() -# NOTE: `if __name__ == "__main__"` is NOT how to use fastplotlib interactively -# please see our docs for using fastplotlib interactively in ipython and jupyter +# NOTE: fpl.loop.run() should not be used for interactive sessions +# See the "JupyterLab and IPython" section in the user guide if __name__ == "__main__": print(__doc__) fpl.loop.run() diff --git a/examples/text/moving_label.py b/examples/text/moving_label.py index 45d2439ee..7ba7d85df 100644 --- a/examples/text/moving_label.py +++ b/examples/text/moving_label.py @@ -77,8 +77,8 @@ def update(): figure.show(maintain_aspect=False) -# NOTE: `if __name__ == "__main__"` is NOT how to use fastplotlib interactively -# please see our docs for using fastplotlib interactively in ipython and jupyter +# NOTE: fpl.loop.run() should not be used for interactive sessions +# See the "JupyterLab and IPython" section in the user guide if __name__ == "__main__": print(__doc__) fpl.loop.run() diff --git a/examples/window_layouts/extent_frac_layout.py b/examples/window_layouts/extent_frac_layout.py index 0c5293e09..d90270c22 100644 --- a/examples/window_layouts/extent_frac_layout.py +++ b/examples/window_layouts/extent_frac_layout.py @@ -67,8 +67,8 @@ figure.show() -# NOTE: `if __name__ == "__main__"` is NOT how to use fastplotlib interactively -# please see our docs for using fastplotlib interactively in ipython and jupyter +# NOTE: fpl.loop.run() should not be used for interactive sessions +# See the "JupyterLab and IPython" section in the user guide if __name__ == "__main__": print(__doc__) fpl.loop.run() diff --git a/examples/window_layouts/extent_layout.py b/examples/window_layouts/extent_layout.py index e6facaaa2..341a2f970 100644 --- a/examples/window_layouts/extent_layout.py +++ b/examples/window_layouts/extent_layout.py @@ -67,8 +67,8 @@ figure.show() -# NOTE: `if __name__ == "__main__"` is NOT how to use fastplotlib interactively -# please see our docs for using fastplotlib interactively in ipython and jupyter +# NOTE: fpl.loop.run() should not be used for interactive sessions +# See the "JupyterLab and IPython" section in the user guide if __name__ == "__main__": print(__doc__) fpl.loop.run() diff --git a/examples/window_layouts/rect_frac_layout.py b/examples/window_layouts/rect_frac_layout.py index 072fa1107..070488487 100644 --- a/examples/window_layouts/rect_frac_layout.py +++ b/examples/window_layouts/rect_frac_layout.py @@ -67,8 +67,8 @@ figure.show() -# NOTE: `if __name__ == "__main__"` is NOT how to use fastplotlib interactively -# please see our docs for using fastplotlib interactively in ipython and jupyter +# NOTE: fpl.loop.run() should not be used for interactive sessions +# See the "JupyterLab and IPython" section in the user guide if __name__ == "__main__": print(__doc__) fpl.loop.run() diff --git a/examples/window_layouts/rect_layout.py b/examples/window_layouts/rect_layout.py index 962b8a4f1..c9fa23a0e 100644 --- a/examples/window_layouts/rect_layout.py +++ b/examples/window_layouts/rect_layout.py @@ -67,8 +67,8 @@ figure.show() -# NOTE: `if __name__ == "__main__"` is NOT how to use fastplotlib interactively -# please see our docs for using fastplotlib interactively in ipython and jupyter +# NOTE: fpl.loop.run() should not be used for interactive sessions +# See the "JupyterLab and IPython" section in the user guide if __name__ == "__main__": print(__doc__) fpl.loop.run()