Relative Content

Tag Archive for python-3.xmatplotlibfigureqt6

python3 – matplotlib – Update figure – clear axis including secondary_y

I wrote a small PyQT6 program to get familiar with QT and matplotlib. In a tab, some graphs will be plotted and should be updated in a certain way after a pushButton is clicked. The program works fine until I introduced a secondary_y axis. The plot will still be updated, but the old graph on the secondary_y will not be deleted. I tried self.tab_2_sc.ax2.clear() resp. self.tab_2_sc.ax2.cla() but it has no effect.