def plotStructure(self):
structurexx, structureyy, structureex, structure3d = self.readStructure()
noexchangecolors = len(set(structureex))
exchangecolors = list(set(structureex))
#self.figure2.suptitle('Structure [nm]')
ax1 = self.figure2.add_subplot(111)
ax1.cla()
ax1.hold(True)
ax1.axis('equal')
for i in range(0, noexchangecolors):
plotxx = []
plotyy = []
for j in range(0, len(structureex)):
if structureex[j] == exchangecolors[i]:
plotxx.append(structurexx[j])
plotyy.append(structureyy[j])
ax1.plot(plotxx, plotyy, 'o')
distx = round(1 / 10 * (max(structurexx) - min(structurexx)))
disty = round(1 / 10 * (max(structureyy) - min(structureyy)))
ax1.axes.set_xlim((min(structurexx) - distx, max(structurexx) + distx))
ax1.axes.set_ylim((min(structureyy) - disty, max(structureyy) + disty))
self.canvas2.draw()
exchangecolorsList = ','.join(map(str, exchangecolors))
# UPDATE THE EXCHANGE COLORS IN BUTTON TO BE simulated
self.exchangeroundsEdit.setText(str(exchangecolorsList))
评论列表
文章目录