How to use the pandasgui.widgets.image_viewer.FigureViewer function in pandasgui

To help you get started, we’ve selected a few pandasgui examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github adamerose / pandasgui / pandasgui / widgets / image_viewer.py View on Github external
subtitle_placeholder.text = subtitle

    prs.save(file_path)


if __name__ == '__main__':
    from pandasgui.datasets import iris, flights, multi, pokemon

    app = QtWidgets.QApplication([])

    figs = []
    for df in [iris, flights, multi]:
        df.plot()
        figs.append(plt.gcf())

    win = FigureViewer(figs[0])
    win.show()

    win2 = TabbedFigureViewer(figs)
    win2.show()

    app.exec_()
github adamerose / pandasgui / pandasgui / widgets / image_viewer.py View on Github external
def add_tab(self, fig):
        """Add a new tab containing a FigureViewer showing fig"""
        image_viewer = FigureViewer(fig)
        # Adds them to the tab_view
        tab = QtWidgets.QWidget()
        tab_layout = QtWidgets.QVBoxLayout()
        tab.setLayout(tab_layout)
        tab_layout.addWidget(image_viewer)
        try:
            fig_title = fig.texts[0].get_text()
        except IndexError:
            fig_title = f"untitled"
        self.tab_widget.addTab(tab, fig_title)
github adamerose / pandasgui / pandasgui / widgets / image_viewer.py View on Github external
def add_tab(self, fig):
        """Add a new tab containing a FigureViewer showing fig"""
        image_viewer = FigureViewer(fig)
        # Adds them to the tab_view
        tab = QtWidgets.QWidget()
        tab_layout = QtWidgets.QVBoxLayout()
        tab.setLayout(tab_layout)
        tab_layout.addWidget(image_viewer)
        try:
            fig_title = fig.texts[0].get_text()
        except IndexError:
            fig_title = f"untitled"
        self.tab_widget.addTab(tab, fig_title)
github adamerose / pandasgui / pandasgui / widgets / image_viewer.py View on Github external
subtitle_placeholder.text = subtitle

    prs.save(file_path)


if __name__ == '__main__':
    from pandasgui.datasets import iris, flights, multi, pokemon

    app = QtWidgets.QApplication([])

    figs = []
    for df in [iris, flights, multi]:
        df.plot()
        figs.append(plt.gcf())

    win = FigureViewer(figs[0])
    win.show()

    win2 = TabbedFigureViewer(figs)
    win2.show()

    app.exec_()