clawpack / visclaw

Clawpack visualization tools
http://www.clawpack.org
BSD 3-Clause "New" or "Revised" License
29 stars 47 forks source link

size of movie images #175

Open mjberger opened 8 years ago

mjberger commented 8 years ago

is set to 500 px in html_writer. But it appears to be initialized at 650 then this variables isn't used. What about using the size of png itself, which has a variable that controls it in setplot.py

mandli commented 8 years ago

The offending line is

myHTMLwriter=myHTMLWriter(embed_frames=False, frame_dir=os.getcwd(), \
                    add_html=pre_html, frame_width=500,file_names=filenames)

at line 2995 in plotpages.py.

rjleveque commented 5 years ago

@mjberger: Can you be more specific what you're trying to control? Do you mean the size of the image shown in JSAnimation plots? Can you link to an example?

mandli commented 5 years ago

I have a suggested fix in this branch that simply adds an option plotdata.html_movie_width. This maybe is not ideal as this would be a value used for all movies.

rjleveque commented 5 years ago

This seems to work. I suggest we also change to

plt.savefig(fname, bbox_inches='tight')

in line 1052 of frametools.py.

mandli commented 5 years ago

Just added the bbox_inches option.