This PR adds a figsize option in the display, so that mplleaflet.display(fig) will keep the figure size, and mplleaflet.display(fig,figsie="100%") will enalble to use the full width of the output cell.
By the way, this latter example will keep the figure's aspect ratio.
My idea when computing https://github.com/jwass/mplleaflet/commit/3f4fc1b2728ca8de075102deaf2d4223c2ac81e8 was to display in the notebook a figure with the same size as matplotlib figures. If you tune your figsize, it will keep the same shape :
But as @jwass notice in https://github.com/jwass/mplleaflet/commit/1c1ce59802fded851edb6c8b62f006abcb6c798a, the defaut matplotlib
figure
is tiny (and ugly for a map).This PR adds a
figsize
option in the display, so thatmplleaflet.display(fig)
will keep the figure size, andmplleaflet.display(fig,figsie="100%")
will enalble to use the full width of the output cell. By the way, this latter example will keep the figure's aspect ratio.You can also force the output size like: