def shownode(loc, mod, num): otms, ovals = extern.pullnode(loc, mod, num) fig = plt.figure() ax = fig.add_subplot(111) ax.plot(otms/3600.0, ovals, 'b.-', label='temps') ax.legend() plt.show()
def compare(loc, sin, mod, num): otms, ovals = extern.pullnode(loc, mod, num) nodes = sin.ext_nodes('sun') for nd in nodes: if nd.mod == mod and nd.num == num: break else: raise Exception("can not find '%s.%d'"%(mod, num)) mult, tms, vals = nd.values(); mult fig = plt.figure() ax = fig.add_subplot(111) ax.plot(otms/3600.0, ovals, 'b.-', label='temps') ax.plot(tms/3600.0, vals, 'r.-', label='power') ax.legend() plt.show()