[Matplotlib-devel] matplotlib 3.0.1 drops title if data has NaN!

Neal Becker ndbecker2 at gmail.com
Thu Nov 1 10:07:22 EDT 2018


Elan Ernest wrote:

> Would it be possible to open an issue
> (https://github.com/matplotlib/matplotlib/issues) about this, including
> a self-contained example (ideally using numpy only, not pandas)?
> 
> 
> Am 01.11.2018 um 13:25 schrieb Neal Becker:
>> Really, it's true.
>> I don't yet have a simple example, but just spent the last 1/2 hour
>> debugging.
>>
>> I have a figure with multiple semilogy plots.  When I do
>> ax.set_title(title), no title appears (it will appear if I add y=0.95).
>>
>> I tried various constrained_layout and many other things.  But finally, I
>> found that some of the data had NaN.  Using pandas dropna, to clean the
>> data presented to semilogy, NOW the title appears.

https://github.com/matplotlib/matplotlib/issues/12701
Perhaps the issue is due to cairo backend?



More information about the Matplotlib-devel mailing list