Created
June 8, 2016 20:55
-
-
Save aaronpolhamus/088ed9cba77a9b71d16da44f3c95a9f6 to your computer and use it in GitHub Desktop.
run this script interactively to test whether python is connecting to X11 as expected
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import matplotlib | |
import matplotlib.pyplot as plt | |
import numpy as np | |
t = np.arange(0.0, 2.0, 0.01) | |
s = np.sin(2*np.pi*t) | |
plt.plot(t, s) | |
plt.xlabel('time (s)') | |
plt.ylabel('voltage (mV)') | |
plt.title('About as simple as it gets, folks') | |
plt.grid(True) | |
plt.savefig("test.png") | |
plt.show() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment