question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

lplot and kplot slow and unresponsive within notebook environment when showing number labels.

See original GitHub issue

Since updating to the latest PyMAPDL version I’ve found the new lplot and kplot implementations to be really slow and unresponsive. Rotating the views, zooming in or zooming out, displacement, everything takes a lot longer, when plotting within a notebook (in my case I use vscode to open the ipynb files). This slow behaviour often leads to kernel crashes, having to restart the whole kernel.

When using the notebook = False argument, the plots behave as they used to even while in notebooks. Also, using show_line_numbering=False or show_keypoint_numbering=False (for lplot and kplot respecitvely) bring back the old responsiveness. So it would seem it’s the combination of labels and the notebook itself which leads to the slow performance and kernel crashes.

The rest of the tools (aplot, eplot, nplot) and result plots are working perfectly, and are still responsive even while within the notebook by default. This probably has something to do with these plots not having any label enabled by default (and I haven’t checked manually activating the labels yet).

Relevant libraries:

ansys-corba               0.1.1                    pypi_0    pypi
ansys-grpc-mapdl          0.4.0                    pypi_0    pypi
ansys-mapdl-core          0.59.3                   pypi_0    pypi
ansys-mapdl-reader        0.51.3                   pypi_0    pypi
pyvista                   0.31.3             pyhd8ed1ab_0    conda-forge

PS: I’ve just tested after writing this. Both jupyterlab and jupyternotebook (the default implementations not related to any IDE) present the same behaviour as the ipynb within VScode.

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
akaszynskicommented, Nov 23, 2021

Yes, that would be best. @germa89, can you take care of this? Effectively, when we create labels we should just set always_visible=True in our general_plotter. See add_point_labels

0reactions
CesarRodriguezPereiracommented, Nov 22, 2021

Any way to manually disable smart labels when calling the plot functions (aside from completely disabling labels)? This bug complicates pure pyansys geometry operations a lot on anything that’s mildly complex. Maybe having a kwarg that let’s people disable the smart feature is an easier fix, without having to go to the hassle of detecting the execution environment.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Plotting graphs using R in Jupyter is slow
I am plotting heavy graphs in Jupyter using the language R. It is extremely slow as I expect it is first exporting it...
Read more >
Jupyter over remote ssh sometimes becomes slow and/or ...
Once the jupyter notebook starts to contain a non-trivial amount of stuff, I start to observe the following behaviors: (1) code cells that...
Read more >
figures suddenly very slow - MATLAB Answers
However, the console is unresponsive and the plot doesn't show data for another 15 seconds. If I run it again and re use...
Read more >
Solve problems with Jupyter Notebooks - coursera.support
Find your current notebook version by checking the top of the notebook window for the title; In your Notebook view, click the Coursera...
Read more >
LAbel - HEASARC
(This speeds up the production of the plot on slow devices.) ... The default PGPLOT mode is to plot the y-axis numerical labels...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found