File indexing completed on 2025-07-06 04:09:12
0001 #!/usr/bin/python2.7 0002 import pykstplot as plt 0003 #import matplotlib.pyplot as plt 0004 import numpy as np 0005 0006 x = np.linspace( -10, 10, 100) 0007 y = np.sin(x) 0008 z = np.cos(x) 0009 0010 plt.subplot(221) 0011 plt.plot(x,y*y, linewidth=2, color = "green", linestyle="-.", label="greenline") 0012 plt.subplot(122) 0013 plt.plot(x,y,"k.") 0014 plt.subplot(223) 0015 plt.plot(x,z,"m*", markersize=6, color="blue") 0016 plt.subplot(221, axisbg="lightblue") 0017 plt.plot(x,z) 0018 plt.xlabel("X axis") 0019 plt.ylabel("Y axis") 0020 plt.title("Title") 0021 0022 plt.figure() 0023 plt.plot([1,3,7,15]) 0024 0025 plt.show() 0026 0027 #plt.savefig("pltdemo.eps")