Hi,

You may need to create your own ROI subclass, for example, a copy/paste of 
one of the existing RectROI, set a brush and use a fillRect instead of 
drawRect. The pen can be passed in on the ROI constructor 
<http://www.pyqtgraph.org/documentation/_modules/pyqtgraph/graphicsItems/ROI.html#ROI>
 
to change its style, or tweak it afterwards using the standard QPen 
<https://doc.qt.io/qt-5/qpen.html> methods.
To draw behind plot data, then you can play with calling setZValue(10) on 
the ROI and/or plot items.

Patrick

On Friday, 17 May 2019 18:29:12 UTC+9:30, JJ wrote:
>
> I want to programatically draw a ROI on the plot that has a color fill. 
> However, it should be rendered behind the plotted data.
> I would also like to change the line style of the edges.
> How can this be done?
>

-- 
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/bb8cb9ae-6151-431e-bcdd-127cddd9ebc8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to