Add feature to store visualizations as JPG images#2400
Conversation
|
Mirroring external branch in external_pr_2400 |
…P4 file and individual frame images
|
The animation output is now saved not only as individual frame images but also as an MP4 file. |
sdrave
left a comment
There was a problem hiding this comment.
Hi @lingachen, thanks a lot for your contribution.
I did not have the time to really test your code, but it looks good!
One change I'd suggest is to merge the filename and img_filename argument into a single filename argument and dispatch based on the provided file extension. I think this pattern is quite common in similar libraries.
Also, it would be nice if png output would be supported as well.
| config.require('MATPLOTLIB') | ||
|
|
||
|
|
||
|
|
|
Hi @sdrave, thanks for your suggestion! Currently, the Here are some details about the implementation:
|
This PR predates #2405 and may need to be updated to reflect the VectorArray interface changes in #2405.
This pull request is for issue #2146, which wants to have an option to store visualization results as image files.
Features
For both
PatchVisualizerandOnedVisualizer, the visualization result could be saved as image files by specifying theimg_filenameargument as calling the functionvisualize, as shown below:0.jpg,1.jpg, etc.).Testing
I have tested the code with :
PatchVisualizer.OnedVisualizer:If there is any problems or feedbacks, please let me know.