コード例 #1
0
 def plotting(xData,yData,symb,Ax,Bx,Ay,By):
     # Plots the data
     global cv
     for i in range(len(xData)-1):
         x1 = round(Ax + Bx*xData[i])
         y1 = round(Ay + By*yData[i])
         x2 = round(Ax + Bx*xData[i+1])
         y2 = round(Ay + By*yData[i+1])
         if symb[0] == 'l': Line(cv,x1,y1,x2,y2)
         if symb[1] == 'o':
             Oval(cv,x1-3,y1-3,x1+3,y1+3,fill="white")
         if symb[1] == 'b':
             Rectangle(cv,x1-3,y1-3,x1+3,y1+3,fill="white")
     if symb[1] == 'o':
             Oval(cv,x2-3,y2-3,x2+3,y2+3,fill="white")
     if symb[1] == 'b':
             Rectangle(cv,x2-3,y2-3,x2+3,y2+3,fill="white") 
コード例 #2
0
 def createitems(self, fill, text):
     self.__oval = Oval(self.canvas,
                        self.x-20, self.y-10, self.x+20, self.y+10,
                        fill=fill, width=3)
     self.group.addtag_withtag(self.__oval)
     self.__text = CanvasText(self.canvas,
                        self.x, self.y, text=text)
     self.group.addtag_withtag(self.__text)
コード例 #3
0
 def createitems(self, *args):
     self.__oval = Oval(self.canvas,
                        self.x - 20,
                        self.y - 10,
                        self.x + 20,
                        self.y + 10,
                        fill='gray',
                        outline='')
     self.group.addtag_withtag(self.__oval)
コード例 #4
0
#! /usr/bin/env python