[Matplotlib-users] Why axes is not visible when used with figure.add_axes ?

Shiyao Ma i at introo.me
Sat Dec 17 08:18:18 EST 2016


Hi,

I have the following snippet to reproduce my problem:


import numpy as np
import matplotlib.pyplot as plt

y = np.arange(4)
x = np.arange(4)

fig = plt.figure()
ax = fig.add_axes([0, 0, 1, 1])
ax.plot(x, y)
ax.set_title('test')
ax.set_xlabel("XX")
plt.show()


The picture is here:
http://imgur.com/a/1fh3u


Why are the X/Y axes, the title, and the label not visible?

Regards.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/matplotlib-users/attachments/20161217/826e88a1/attachment.html>


More information about the Matplotlib-users mailing list