visclaw icon indicating copy to clipboard operation
visclaw copied to clipboard

size of movie images

Open mjberger opened this issue 9 years ago • 5 comments

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

mjberger avatar Mar 13 '16 15:03 mjberger

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.

mandli avatar Mar 13 '16 15:03 mandli

@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?

rjleveque avatar Feb 23 '19 20:02 rjleveque

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.

mandli avatar Feb 24 '19 01:02 mandli

This seems to work. I suggest we also change to

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

in line 1052 of frametools.py.

rjleveque avatar Feb 24 '19 17:02 rjleveque

Just added the bbox_inches option.

mandli avatar Feb 24 '19 19:02 mandli