我想在窗口中创建一个窗口。外窗是平面的,内窗是图形。原因是我想制作一个带有多个图形的监控系统,其中嵌套的窗口会有所帮助。在
代码如下:import numpy as np
import matplotlib.pyplot as plt
import matplotlib.dates as mdates
import Tkinter
x = []
y = []
top = Tkinter.Tk()
top.title("Hello tkInter");
top.geometry("1000x1000")
fig=plt.figure()
rect = fig.patch
rect.set_facecolor('#31312e')
readFile = open('sampleCSV.csv','r')
sepFile = readFile.read().split('\n')
readFile.close()
for plotPair in sepFile:
xAndY = plotPair.split(',')
if xAndY[0] != '':
x.append(int(xAndY[0]))
y.append(int(xAndY[1]))
ax1 = fig.add_subplot(2,2,1, axisbg='grey')
ax1.plot(x, y, 'c', linewidth=3.3)