Thanks to visit codestin.com
Credit goes to github.com

Skip to content

semilogy with NaN prevents display of Title (cairo backend) #12701

Closed
@nbecker

Description

@nbecker

Bug report

In the following code, when semilogy is fed data with NaN, the title does not appear.

Bug summary

Code for reproduction

import numpy as np
import matplotlib.pyplot as plt
import matplotlib as mpl

x = np.array ([0, 1, 2, 3])
y = np.array ([10, np.nan, 8, np.nan])
fig, ax = plt.subplots(constrained_layout=True)#, sharex=True)
ax.semilogy (x, y, 'x-')
ax.set_title('test')
plt.show()

# Paste your code here
#
#

Actual outcome

# If applicable, paste the console output here
#
#

Expected outcome

Matplotlib version

  • Operating system: linux fedora 29
  • Matplotlib version: 3.0.1
  • Matplotlib backend (print(matplotlib.get_backend())): module://mplcairo.qt
  • Python version: 3.7.1
  • Jupyter version (if applicable):
  • Other libraries:
pip

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions