def getlegend(self): "getlegend(self) - dialog to set legends for plot at most 85" from plotAscii import GetLegends,loadpvs V = 85*[''] for i in range(self.nc): V[i] = 'D_'+str(i+1) file='pvs' fd = open(file,'w') fd.write(str(V)) fd.close() top = self.form GetLegends(top) self.pvs = loadpvs()
def startup(self): "startup(self) - initialize variables at object plot1d creation" from plotAscii import readST,loadpvs,initSH self.CBframe = -1 self.nc = -1 self.fig = 0 self.symOn = 0 self.legOn = 1 self.spp = 1 self.styOn = 0 self.legloc = 0 self.pvs = loadpvs() self.linestyles = linestyles self.colors = colors self.symbols = symbols self.SH = initSH() self.stdFrame = None self.fitFrame = None self.histFrame = None self.errFrame = None self.legFrame = None self.Fit = None self.setXFrame = None if os.path.isfile('plot1d.config'): lines = readST('plot1d.config') self.fname = lines[0] if len(lines[0]) >2: pth,fnm = os.path.split(lines[0]) self.txtpath = pth else : self.txtpath='.' self.title = lines[1] self.xlabel = lines[2] self.ylabel = lines[3] self.mdapath = lines[4] self.Rg=['0','100','0','100'] else: self.fname='' self.txtpath='.' self.mdapath='.' self.title='' self.xlabel='' self.ylabel='' self.Rg=['0','100','0','100']