Skip to content

Plotting 2D scatter points in a PyQt5 UI #783

Answered by marcomusy
DRLing2021 asked this question in Q&A
Discussion options

You must be logged in to vote

Hi, you can find many examples of scatter plots in examples/pyplot and in examples.other/qt_*.py e.g.:

import sys
from PyQt5 import QtCore, QtWidgets
from vtk.qt.QVTKRenderWindowInteractor import QVTKRenderWindowInteractor
from vedo import Mesh, dataurl, Plotter
from vedo.pyplot import np, histogram

try:
    _encoding = QtWidgets.QApplication.UnicodeUTF8
    def _translate(context, text, disambig):
        return QtWidgets.QApplication.translate(context, text, disambig, _encoding)
except AttributeError:
    def _translate(context, text, disambig):
        return QtWidgets.QApplication.translate(context, text, disambig)


class Ui_MainWindow(object):

    def setupUi(self, MainWindow):
  …

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@DRLing2021
Comment options

@marcomusy
Comment options

@DRLing2021
Comment options

Answer selected by marcomusy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants