LaurentRDC / pandoc-plot

Render and include figures in Pandoc documents using your plotting toolkit of choice
https://laurentrdc.github.io/pandoc-plot/
GNU General Public License v2.0
224 stars 8 forks source link

Matplotlib 'tight_bbox' ignored #48

Closed MageJohn closed 2 years ago

MageJohn commented 2 years ago

Hi again,

I've discovered that the tight_bbox option for matplotlib is being ignored. What seems to be happening is that in Matplotlib.hs the attribute being read is named just tight, while the attribute being parsed in Renderer.hs (and the one documented) is tight_bbox.

This can be reproduced by rendering a matplotlib figure with and without tight_bbox=true in the figure attributes; inspecting the generated code shows no difference in the plt.savefig call.

Thanks for all your work on this great pandoc filter!

LaurentRDC commented 2 years ago

This is a great catch, thanks. I will patch this right away.

LaurentRDC commented 2 years ago

This has been fixed in 933daba593196bf3b1ae1f2022d17389552f275c. Release 1.5.3 is underway. Cheers