Esempio n. 1
0
def create_image_widget():
    # patched plot in widget
    widget = ImageWidget(lock_aspect_ratio=False, xlabel="rt", ylabel="m/z")

    # patch memeber's methods:
    widget.plot.__class__ = ModifiedImagePlot
    widget.plot.set_axis_direction("left", False)
    widget.plot.set_axis_direction("right", False)

    set_x_axis_scale_draw(widget)
    set_y_axis_scale_draw(widget)
    widget.plot.enableAxis(widget.plot.colormap_axis, False)

    return widget
Esempio n. 2
0
    def configure_plot(self):

        set_x_axis_scale_draw(self.widget)
        manager = PlotManager(self.widget)
        manager.add_plot(self.plot)

        tool = manager.add_tool(RtSelectionTool)
        tool.activate()
        manager.set_default_tool(tool)

        self.marker = add_marker(self.plot)
        setupStyleRtMarker(self.marker)
        self.marker.rts = (0, )
        self.plot.moveMarker.connect(self.marker.move_local_point_to)
        self.plot.moveMarker.connect(self.move_rt_cursor)