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

Suggestions... #12

Open
ccaprani opened this issue Feb 22, 2022 · 1 comment
Open

Suggestions... #12

ccaprani opened this issue Feb 22, 2022 · 1 comment

Comments

@ccaprani
Copy link

Hi @sewkokot ! Thanks as ever for the great work. I have a few suggestions:

  • At a high level, is there a roadmap that contributors could pull tasks off to work on?
  • Would there be a benefit in making it more OO? I'm on the fence on this one...
    • Pro: might be easier to set module-wide preferences for all plots, for example.
    • Con: works fine as it is!
  • Would you mind having an ax argument to every function so that it plots to an existing axes, if supplied?
  • What other tweaks/changes are you envisioning?

Looking forward to contributing!

@sewkokot
Copy link
Owner

Hi @ccaprani, thanks for the suggestions and your support!

  1. I need some time to prepare a roadmap for opsvis. Anyway we can always discuss here what features would be useful to have and if they can be implemented as extensions of the current opsvis functions or by creating new ones.
  2. Again I would need time to assess how much work and testing it would require to migrate the code to OO. As you wrote, the functional approach works for now, and the OO would require a volunteer to implement it or at least to help with specific plan of the OO code organization.
  3. Yes, in the refactored code (which I upload in two days) I have added the ax argument to almost all plotting functions. Testing will reveal what else can be improved. All plot model functions would return 'ax', and on the other plot_defo returns now the scale factor, so I could add 'ax' as the second return variable, but it will break some of user scripts (although the fix would be easy to fix by adding sfac, ax = opsv.plot_defo() or sfac, _ = opsv.plot_defo(), if the ax is redundant.
  4. The refactored opsvis hopefully includes improvements (for example plotting deformation of models composed of various element types, for example quads with beams, zero length or joint2d elements in a single model, which gives errors in the current opsvis etc.). I also plan to add other plotting libraries than matplotlib such as pyvista and pyevtk (for plotting models, deformation and stresses in Paraview). I have some working examples, however the installation of pyvista and pyevtk is not as easy as for matplotlib. For example, pyvista requires the vtk package which seems currently broken or dependencies cannot be resolved when installing with the 'pip' command. Anyway I will list all improvements and new features implemented in the new opsvis.

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

2 participants