Skip to content

Conversation

renefritze
Copy link
Member

@renefritze renefritze commented Jan 20, 2023

This PR significantly improves the K3D-based visualizer for our builtin discretizations and makes it the default backend for documentation builds. It will also automatically be the default backend in Jupyter notebooks as soon as K3D-tools/K3D-jupyter#424 is released.

The old, currently broken pythreejs-based visualizer is removed.

(new comment by @sdrave)

@renefritze renefritze added the pr:new-feature Introduces a new feature label Jan 20, 2023
@renefritze
Copy link
Member Author

K3D display works now in principal: https://docs.pymor.org/new-k3d-vis/tutorial_builtin_discretizer.html

Some obvious problems remain:

  1. quadrilateral element display is broken
  2. the widget display scrolls over the top bar
  3. general layouting of the widget output

Non-obvious:

  1. No time-dep/multiple param stuff works yet

@renefritze renefritze mentioned this pull request Jan 23, 2023
@renefritze renefritze linked an issue Jan 25, 2023 that may be closed by this pull request
@renefritze
Copy link
Member Author

K3D display works now in principal: https://docs.pymor.org/new-k3d-vis/tutorial_builtin_discretizer.html

Some obvious problems remain:

  1. quadrilateral element display is broken

Fixed

  1. the widget display scrolls over the top bar

Fixed by @HenKlei

  1. general layouting of the widget output

unclear how to fix

Non-obvious:

  1. No time-dep/multiple param stuff works yet

Fixed. (at least in live jupyter)

New/Remaining Problems:

  1. https://docs.pymor.org/new-k3d-vis/tutorial_optimization.html vs https://docs.pymor.org/2022-2-0/tutorial_optimization.html
  2. JSLink (needed for multi-plot time/camera linking) does not seem to translate to sphinx html, although ipywidgets says it should
  3. Colorbar/data scaling + multi legend args are currently ignored still

@sdrave sdrave force-pushed the main branch 4 times, most recently from 18e66f2 to e80291b Compare March 7, 2023 20:03
@pmli pmli added this to the 2023.1 milestone May 9, 2023
@sdrave sdrave removed the autoupdate label May 12, 2023
@sdrave sdrave self-assigned this May 31, 2023
@sdrave sdrave changed the title new k3d vis Switch to K3D-based visualizations in Jupyter environments Jun 5, 2023
@sdrave sdrave marked this pull request as ready for review June 5, 2023 15:29
@sdrave
Copy link
Member

sdrave commented Jun 5, 2023

@pymor/all, I believe this is now ready to be merged. Please take a look at the tutorials, and see if everything works with your browser setup. In particular, I could not test Safari @TiKeil.

@sdrave sdrave requested review from a team June 5, 2023 16:16
@pmli
Copy link
Member

pmli commented Jun 5, 2023

The plots work for me. Some comments:

  • It would be nice to also have the x/y/z axes (particularly for the plot in the NN tutorial, which has an almost flat surface).
  • A "home" button would be good, to return the plot to the original state after rotating it.
  • The speed slider is again in the opposite direction (e.g., in the "Building a Reduced Basis" tutorial).

@sdrave
Copy link
Member

sdrave commented Jun 6, 2023

Hi, @pmli ,

The plots work for me. Some comments:

* It would be nice to also have the x/y/z axes (particularly for the plot in the NN tutorial, which has an almost flat surface).

I have disabled the axes because they do not look nice in the default view from top. Also, the scaling of the z-axis coordinates depends on the data in order to avoid to flat or too steep plots. I would need to find out if and how custom labels could be applied to the axes.

As a compromise, I have added a flat plot of the mesh as a reference. Please take a look at the new output.

* A "home" button would be good, to return the plot to the original state after rotating it.

Yes, but that is not doable with ipywidgets without a running kernel in the background. One can only link one value to another without any transformation.

* The speed slider is again in the opposite direction (e.g., in the "Building a Reduced Basis" tutorial).

Can't be fixed for the same reason. One would need to implement a custom widget, which, AFAIK, would have to be installed as a separate package. If it bothers you, we could replace 'speed' by 'delay' or so. Everything else does not seem realistic before the release.

@sdrave sdrave added this pull request to the merge queue Jun 7, 2023
Merged via the queue into main with commit 84f7d61 Jun 7, 2023
@sdrave sdrave deleted the new_k3d_vis branch June 7, 2023 15:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr:new-feature Introduces a new feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Plotting is broken with ipywidgets >= 8
4 participants