Windows VSCode + WSL weird Draw() behavior

When I use NGSolve Draw() in a jupyter notebook in my windows VScode that is connected to the local WSL, the visualization is very crazily zoomed in, when I have multiple Draw()’s it even crashes the jupyter kernel sometimes. Is there any known solution to this?

Best, Camilo

Hello there!

I have the same issue with my WSL, my quick-fix is the following:

Right click on the Draw function, click on “Go to definition”, just after line 30 you will find the following lines:

    _default_width = None
    _default_height = None
else:
    _default_width = "100%"
    _default_height = "50vh"

I substitute it with :

    _default_width = "100%"
    _default_height = "5vh"
else:
    _default_width = "100%"
    _default_height = "5vh"

Also I do compile NGSolve myself, so every time I update it I have to fix this issue

1 Like