개정판 1430f5a6
issue #000: fix ocr chart refresh
DTI_PID/DTI_PID/TrainingImageListDialog.py | ||
---|---|---|
532 | 532 |
if not hasattr(self, '_winChart'): |
533 | 533 |
self._winChart = pg.PlotWidget(background = 'w', title = 'Trained Characters') |
534 | 534 |
self._winChart.setMouseEnabled(False, False) |
535 |
plot = pg.BarGraphItem(x = range(len(categories)), height = barList, width = 0.6, brush = 'b') |
|
536 |
self._winChart.addItem(plot) |
|
535 |
self._plot = pg.BarGraphItem(x = range(len(categories)), height = barList, width = 0.6, brush = 'b')
|
|
536 |
self._winChart.addItem(self._plot)
|
|
537 | 537 |
xax = self._winChart.getAxis('bottom') |
538 | 538 |
yax = self._winChart.getAxis('left') |
539 | 539 |
xax.setPen('k') |
... | ... | |
543 | 543 |
|
544 | 544 |
self.ui.horizontalLayoutChart.addWidget(self._winChart) |
545 | 545 |
else: |
546 |
self._winChart.removeItem(self._winChart.currentItem)
|
|
546 |
self._winChart.removeItem(self._plot)
|
|
547 | 547 |
|
548 |
plot = pg.BarGraphItem(x = range(len(categories)), height = barList, width = 0.6, brush = 'b') |
|
548 |
self._plot = pg.BarGraphItem(x = range(len(categories)), height = barList, width = 0.6, brush = 'b') |
|
549 |
self._winChart.addItem(self._plot) |
|
549 | 550 |
xax = self._winChart.getAxis('bottom') |
550 | 551 |
yax = self._winChart.getAxis('left') |
551 | 552 |
xax.setPen('k') |
내보내기 Unified diff