Q: how can I set a dot / bar on specific section of a line plot in pyqtgraph? I've started playing with pyqtgraph plotting line charts.
I have the need to draw specific dots in some section of the lines.
I found that in order for dots to appear on the line,
I need to use symbolBrush when plotting E.g
curve3 = p1.plot(pen=(2,5) , name="trade" , symbolBrush=2)

But the thing is it shows dots on the entire line,
and I can't seem to find a way to draw a dot for specific points / sections.
Assistance would be appreciated
Edit:
For example, In the attached image, assume I only want to draw a dot where marked (1,1) without dots being drawn on the other line breaks.


A: So, here is an example of what you are looking for. It's a bit "dodgy" in that I'm accessing something inside a PlotDataItem that probably shouldn't be directly accessed, so there is a risk that this code may become non-functional with future updates to pyqtgraph.
That said, I think the risk is reasonably low, it would be easy to update my example to work with whatever changes are made to pyqtgraph, and the example may spark an idea in you that leads to a path that achieves the same thing, without needing to abuse the internals of pyqtgraph.
pw = pg.PlotWidget()
x = np.arange(8)
y = [1,6,2,4,3,5,6,8]
p = pw.plot(x=x, y=y, symbolSize=25)
p.scatter.setData(x=[x[2]],y=[y[2]])
pw.show()

