camUrban / PteraSoftware

Ptera Software is a fast, easy-to-use, and open-source software package for analyzing flapping-wing flight.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Missing 2D Plots

EmaSava opened this issue · comments

Hi,
I was running the 'unsteady_ring_vortex_lattice_method_solver_variable_example' but I can't see any 2D force/moment graphs once the simulation ends. On the other hand, I'm allowed to save the animation in the 'example' folder pressing 'q' from the visualizer. Have you ever had any similar trouble? I checked all the necessary requirements and 'testing' is set to 'False' in the code. Thanks a lot, this is an incredibly useful tool!!

Hi, I'll look into this right now and get back to you.

Hello again! So I think I know what the problem is. The figures are displayed using figure.show(), which should open a window that displays the plot, but doesn't actually save it.

However, some IDEs handle this differently, For example, I use PyCharm which has an option called "Scientific Mode." This option displays the plots in the IDE itself. Apparently, you can turn this feature off if you'd like.

Regardless of the IDE you are using, there's a quick workaround! In output.py, you could call the pyplot.savefig() function for each plot you'd like to save. For example, if you wanted to save the moment coefficients figure, you'd insert moment_coefficients_figure.savefig() after moment_coefficients_figure.show() on line 656.

I'll add this functionality in my next feature release because it's a great idea! Let me know if this fixes your issue and thanks for the feedback!

@EmaSava, I'm going to close this issue but feel free to open another one if you're still having problems. Thanks again for the feedback!