chenyulue / matplotlib-extra

This package includes some extra functions to matplotlib.
MIT License
11 stars 2 forks source link

Bug using `fig.savefig` #1

Open NicolasMICAUX opened 2 years ago

NicolasMICAUX commented 2 years ago

Hi, First, thx a lot for your amazing lib.

There's a mismatch between the image that is displayed with plt.show() and the image generated with fig.savefig() (and also with the image that you get by clicking Save the figure in plt.show window :

I don't know if you understand why?

Regards, N. M.

PLT SHOW SCREENSHOT : image

PLT "SAVE THE FIGURE" Figure_1 (see the top right texts for example)

PLT SAVEFIG Importance des réformateurs (calculée par PageRank)

chenyulue commented 2 years ago

Thanks for this bug report. I guess this may be caused by the incorrect update when the draw event happens. When I'm free, I'll try to fix this bug.

chenyulue commented 2 years ago

Hi, @NicolasMICAUX , an update is uploaded, and the bug should be solved. Please check it. If any problems, please leave a comment.

chenyulue commented 2 years ago

BTW, treemap has a little change. The wrap parameter is renamed to reflow for not introducing confusion, since matplotlib.text.Text has the wrap parameter