本文整理汇总了Python中Data.update_all_colors方法的典型用法代码示例。如果您正苦于以下问题:Python Data.update_all_colors方法的具体用法?Python Data.update_all_colors怎么用?Python Data.update_all_colors使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Data
的用法示例。
在下文中一共展示了Data.update_all_colors方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: PooGUI
# 需要导入模块: import Data [as 别名]
# 或者: from Data import update_all_colors [as 别名]
#.........这里部分代码省略.........
cluster=default_cluster)
sUI.grid(column=0,row=i, sticky="ew")
#create plotting circles and register events
self.canvas['H'].panel.add_artist( sUI.circH )
self.canvas['Psi'].panel.add_artist( sUI.circP )
sUI.circH.connect()
sUI.circP.connect()
self.add_sample( sUI )
self.nCoords = len( self.d.sList )
self.activeCanvas.redraw()
def loadPsi(self,f=None):
"""loads Psi directly. Assumes Coordinates are already loaded"""
if f is None:
f = tkFileDialog.askopenfile(mode='r',initialfile="psi.txt")
self.d.add_pw_stat('psi', AntiCommutativePWStat(f=pw_psi))
if self.d.pw_default_stat is None:
self.d.set_pw_default_stat('psi')
psiRaw = np.loadtxt(f, dtype="S100")
for row in psiRaw:
self.d.pairwise_stats['psi'][ row[0], row[1] ] = float(row[2])
psi_sum = psi_sum_cluster(self.d.pairwise_stats['psi'],
self.d.sList)
self.d.add_single_pop_stat('psi_sum',psi_sum)
self.d.sort_stat="psi_sum"
self.initPsiMatrix(self.master)
self.d.update_all_colors()
self.d.update_sample_order()
#self.set_colors()
self.canvas['H'].draw_all_hyperbolas()
self.canvas['Psi'].draw_all_pairwise_psi()
def loadBGI(self, f=None):
"""loads Background image"""
if f is None:
f = tkFileDialog.askopenfile(mode='r')
try:
self.bgi = mpimg.imread(f)
except:
raise ValueError("could not read image file, see"+ \
" matplotlib.image.imread for"+ \
" supported formats")
self.canvas['H'].addBGI(self.bgi)
self.canvas['Psi'].addBGI(self.bgi)
def removeBGI(self):
self.canvas['H'].removeBGI()
self.canvas['Psi'].removeBGI()
self.activeCanvas.redraw()
def save_plot(self, f=None):
if f == None:
f = tkFileDialog.asksaveasfilename(initialfile="plot.pdf")
self.activeCanvas.fig.savefig(f)