gyli / PyWaffle

🧇 Make Waffle Charts in Python.
MIT License
578 stars 105 forks source link

UserWarning: This figure includes Axes that are not compatible with tight_layout #1

Closed lincolnfrias closed 6 years ago

lincolnfrias commented 6 years ago

First of all, incredibly awesome and fun package. Thanks a lot!

I'm getting this warning in all the plots:

UserWarning: This figure includes Axes that are not compatible with tight_layout, so results might be incorrect. warnings.warn("This figure includes Axes that are not compatible ").

It seems a false positive in this context, right?

gyli commented 6 years ago

I notice this issue too. The reason of it is that tight_layout is turned on as it says. So you can do fig.set_tight_layout(False) to cancel the tight layout and this warning would be gone.

However, tight layout is pretty necessary in the multiple plots case, to give subplots' title enough space. I will probably make a better default value for the tight_layout setting, or figure out a better way to handle subplots.

ProsperousHeart commented 5 years ago

Why was this closed? This doesn't resolve the issue, since it should be compatible or documentation should be more clear.

gyli commented 5 years ago

@ProsperousHeart Could you show me how to reproduce this warning? With matplotlib 3.0.2, I don't see this warning anymore.

Lxiangyue commented 4 years ago

That's right. Different versions result in different results. When I use matplotlib 2.0.1, an error reported. While using matplotlib 3.0.1, everything goes right.