OpenDrift / opendrift

Open source framework for ocean trajectory modelling
https://opendrift.github.io
GNU General Public License v2.0
245 stars 120 forks source link

Replaced fig.set_tight_layout(True) with matplotlib.rcParams['figure.… #1096

Closed knutfrode closed 1 year ago

knutfrode commented 1 year ago

…autolayout'] = True

gauteh commented 1 year ago

Second option is better! Then we don't change global plotting settings for users just by importing opendrift.

knutfrode commented 1 year ago

Yes, you are right. Still fails, but will look at it later.

knutfrode commented 1 year ago

It makes a minor difference if fig.set_layout_engine('tight') is executed before or after fig.canvas.draw() (one figure is slightly shifted vertically) drawafter drawfirst

Keeping it as it was (set_layout before canvas.draw), the tests pass, since figures are unchanged. This is probably ok.