Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecation issues with pyvista #28

Closed
CesarRodriguezPereira opened this issue May 13, 2021 · 4 comments
Closed

Deprecation issues with pyvista #28

CesarRodriguezPereira opened this issue May 13, 2021 · 4 comments

Comments

@CesarRodriguezPereira
Copy link

While fooling around with the functions plot_nodal_solution() and animate_nodal_solution() I've gotten some small issues due to changes in pyvista:

With plot_nodal_solution() it raises an error due to the use of stitle as a keyword, instead of the suggested use of '''scalar_bar_args={'title': 'Scalar Bar Title'}'''. This is just a warning, so the function works and plots correctly.

With animate_nodal_solution() it raises a DeprecationError due to the use of use_ipyvtk instead of the ipyvtklink backend. The animation doesn't render.

From what I've gathered looking into the code, the first issue is present in various functions, while the second appears only in _plot_point_scalars() (which I was taking a look in order to add a return_plotter keyword), but I'm not comfortable enough yet with pyvista to fix and PR myself

@akaszynski
Copy link
Collaborator

For the moment, keep with pyvista==0.29.1 until I can implement the fixes.

@natter1
Copy link

natter1 commented May 14, 2021

which I was taking a look in order to add a return_plotter keyword

I guess there are larger changes to be expcted for plotting, but if you want a short-term fix in your own environment, I think you only need to add it to general_plotter() - all other plot functions use kwargs which are transfered to this function (hope I remember correctly - I implemented a plotter-parameter, which was slightly more complicated)

@CesarRodriguezPereira
Copy link
Author

which I was taking a look in order to add a return_plotter keyword

I guess there are larger changes to be expcted for plotting, but if you want a short-term fix in your own environment, I think you only need to add it to general_plotter() - all other plot functions use kwargs which are transfered to this function (hope I remember correctly - I implemented a plotter-parameter, which was slightly more complicated)

The general plotter is used for the core library plots, but the function I modified were contained withing the reader. _plot_point_scalars() seemed to be the master function, at least for the ones I needed, so I added it as a kwarg there, within my own env.

@akaszynski
Copy link
Collaborator

akaszynski commented May 18, 2021

Fixed in #29. Theme based changes will be pushed when updating to pyvista==0.30.2.

Since this is a critical bug with the latest pyvista, I've gone ahead and released a patch as ansys-mapdl-reader==0.50.12

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants