Plot field with desired color map scale and automatically save it in a picture format (png for instance)


35
views
0
20 days ago by
Hello everyone,
Is this possible using the FEniCS plot command (or another)  to plot a solution field and set automatically:
- the color map scale
- the view axis
- save the picture in a specified path

I am not speaking about saving the field in a xml or a pvd format, simply take a screenshot of the solution field picture.

Why?
I am solving a time-dependent problem and i would like that at each step i get a picture of the field, numerated with the iteration number. Then, i can make an animation of the solution with another software. So that i do not have to save pvd file for each time step, which is memory expensive. I am thinking of saving the solution fields with different point of view at each time, so that i still have a good visualization of the solution.

Seems it is possible to save plot figure (post below), but how to handle color map and point of view?
https://www.allanswered.com/post/mgrw/svg-output-of-mesh/

Thanks.






Community: FEniCS Project

1 Answer


1
20 days ago by
pf4d  
You can do stuff like that, sure.  Here's my helpity helper:

https://github.com/pf4d/fenics_viz

for some fun plotting like this:

File attached: p_rat_31.pdf (276.41 KB)
File attached: rho_A31.pdf (244.95 KB)

File attached: rho_C31.pdf (244.44 KB)
File attached: rho_W31.pdf (243.95 KB)
File attached: T31.pdf (245.51 KB)
File attached: U_31.pdf (335.63 KB)

Please login to add an answer/comment or follow this question.

Similar posts:
Search »