(self)
| 62 | self.title, self.labelx, self.labely = title, labelx, labely |
| 63 | |
| 64 | def paint(self): |
| 65 | if len(self.data)==0 : |
| 66 | return |
| 67 | ext = np.array([[x.min(), y.min(), x.max(), y.max()] for x,y,c,w in self.data]) |
| 68 | d = ext[:,3].max() - ext[:,1].min() |
| 69 | top, bot = ext[:,3].max() + 0.1 * d, ext[:,1].min() - 0.1 * d |
| 70 | if top == bot: top, bot = top+1, bot-1 |
| 71 | self.extent = [ext[:,0].min(), bot, ext[:,2].max(), top] |
| 72 | self.update() |
| 73 | |
| 74 | def add_data(self, xs, ys=None, color=(0,0,255), lw=2): |
| 75 | if ys is None: |