Skip to content

Commit

Permalink
test_loadtest: guiqwt -> plotpy
Browse files Browse the repository at this point in the history
  • Loading branch information
PierreRaybaut committed Oct 1, 2023
1 parent 7c08e80 commit 36d0bcd
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions plotpy/tests/gui/test_loadtest.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,15 @@

import numpy as np
from guidata.qthelpers import qt_app_context
from guiqwt.builder import make
from guiqwt.plot import ImageWidget

# import cProfile
# from pstats import Stats
from qtpy import QtWidgets as QW

from plotpy.builder import make
from plotpy.constants import PlotType
from plotpy.plot import PlotWidget


class PlotTab(QW.QWidget):
"""Tab containing a grid of image widgets"""
Expand All @@ -27,7 +29,8 @@ def __init__(self):

def add_plot(self, iplt, irow, icol):
"""Add a plot to the grid"""
widget = ImageWidget(self, "Plot #%d" % (iplt + 1))
options = dict(title="Plot #%d" % (iplt + 1), type=PlotType.IMAGE)
widget = PlotWidget(self, options=options)
widget.setMinimumSize(200, 150)
xdata = np.linspace(-10, 10)
ydata = np.sin(xdata + np.random.randint(0, 100) * 0.01 * np.pi)
Expand Down

0 comments on commit 36d0bcd

Please sign in to comment.