I’m not sure if this is a bug or something I am not understanding/doing wrong, 
but it seems that if I specify the symbol for a plot as a QPainterPath, when 
plotted with pxMode = True the shape/content of the QPainterPath is ignored and 
the plot is created using squares. With pxMode=False, the plot is drawn 
correctly. Am I just missing something?

Example code:

from PySide2.QtGui import QPainterPath
from PySide2.QtWidgets import QApplication, QDialog, QVBoxLayout, QLabel
import pyqtgraph as pg

if __name__ == "__main__":
    print(pg.__version__)
    app = QApplication()
    dialog = QDialog()
    dialog.setWindowTitle("Zoom tests")

    layout = QVBoxLayout(dialog)

    circle_path = QPainterPath()
    circle_path.addEllipse(-1, -1, 2, 2)

    xvals = list(range(10))
    yvals = list(range(10))

    # Grid on right axis, zoom point significantly offset
    plotWidget = pg.PlotWidget(dialog)
    plotWidget.plot(xvals, yvals,
                    symbol = circle_path,
                    symbolBrush = "#F00",
                    symbolPen = None,
                    pen = None,
                    symbolSize = .5,
                    pxMode = False)

    plotWidget2 = pg.PlotWidget(dialog)
    plotWidget2.plot(xvals, yvals,
                     symbol = circle_path,
                     symbolBrush = "#F00",
                     symbolPen = None,
                     pen = None,
                     symbolSize = 50,
                     pxMode = True)

    layout.addWidget(QLabel("Pixel Mode On"))
    layout.addWidget(plotWidget)

    layout.addWidget(QLabel("Pixel Mode Off"))
    layout.addWidget(plotWidget2)

    dialog.show()

    app.exec_()

---
Israel Brewster
Software Engineer
Alaska Volcano Observatory 
Geophysical Institute - UAF 
2156 Koyukuk Drive 
Fairbanks AK 99775-7320
Work: 907-474-5172
cell:  907-328-9145

-- 
You received this message because you are subscribed to the Google Groups 
"pyqtgraph" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/pyqtgraph/386E47D0-EF09-4955-832B-D37E0894041A%40alaska.edu.

Reply via email to