JWock82 / Pynite

A 3D structural engineering finite element library for Python.
MIT License
454 stars 93 forks source link

FR: Make Matplotlib optional #161

Closed firai closed 1 year ago

firai commented 1 year ago

Is your feature request related to a problem? Please describe. Matplotlib, which itself carries a long list of dependencies, is currently set as a hard dependency. However, Matplotlib isn't central to the functionality of PyNite, and I often use plotly for visualization these days (or sometimes no visualization depending what I'm doing).

Describe the solution you'd like Change Matplotlib to an optional dependency.

Describe alternatives you've considered Create a dummy setup.py for Matplotlib each time I install PyNite, but that's very hacky and may have unintended consequences.

JWock82 commented 1 year ago

You bring up a good point. I'll consider this on the next revision. I'm almost always using plots to verify that the analysis was correct. I can quickly detect errors visually in my model by looking at the member diagrams. I figured most users would want to do that too.

I have no issue with making it optional. My only concern is that some inexperienced python users may not realize they need to install matplotlib to get some of the examples to work. I suppose they are already dealing with that issue with VTK and scipy which are already optional.

JWock82 commented 1 year ago

Completed.