figure

How to save a figure remotely with pylab?

How to save a figure remotely with pylab? Question: I’m trying to generate a figure at a remote computer with the command pylab.savefig. But I got such error: Unable to access the X Display, is $DISPLAY set properly? How can I save the figure properly? Asked By: gerry || Source Answers: Try setting the DISPLAY …

Total answers: 2

In Matplotlib, what does the argument mean in fig.add_subplot(111)?

What does the argument mean in fig.add_subplot(111)? Question: Sometimes I come across code such as this: import matplotlib.pyplot as plt x = [1, 2, 3, 4, 5] y = [1, 4, 9, 16, 25] fig = plt.figure() fig.add_subplot(111) plt.scatter(x, y) plt.show() Which produces: I’ve been reading the documentation like crazy but I can’t find an …

Total answers: 8