Hello Shrabya,

unfortunately there's no ready-made solution in Pyqtgraph.
What you can do is to create your own GraphItem class (by inheriting from 
the original GrapItem 
<https://github.com/pyqtgraph/pyqtgraph/blob/develop/pyqtgraph/graphicsItems/GraphItem.py>)
 
and extend the line-drawing-part with Qt's Bezier drawing functions. You 
can create the desired shapes with the "quadTo 
<https://doc.qt.io/qt-4.8/qpainterpath.html#quadTo>" and "cubicTo 
<https://doc.qt.io/qt-4.8/qpainterpath.html#cubicTo>" functions in 
QPainterPath <https://doc.qt.io/qt-4.8/qpainterpath.html>.


Cheers
Sebastian


Am Montag, 18. September 2017 18:30:17 UTC+2 schrieb Shrabya Timsina:
>
> I am plotting a tree structure using the GraphItem class and a Viewbox in 
> pyqtgraph 0.10. Currently I have the following image, where the dot objects
>
> are connected by straight lines:
>
>
> <https://lh3.googleusercontent.com/-KIeo_GOeDJY/Wb_z_2mo_FI/AAAAAAAAAfk/Tv_ECcWHVeQLcYRl11fP5yJk8lk0r_P3ACLcBGAs/s1600/Straigh%2Bline%2Bconnections.PNG>
>
> I need those lines to be actually curved using any Bezier function to look 
> more like this (ignore orange boxes and line thickness):
>
>
> <https://lh3.googleusercontent.com/-QuNws8jswKA/Wb_0K1ZwXpI/AAAAAAAAAfo/J-D3uaEjckc-41J-Cxs45gOWcTUhfzwAACLcBGAs/s1600/curve%2Blive%2Bconnections.PNG>
>
> The source code for pyqtgraph does not seem to give any hints about how 
> those connection lines can be modified, or whether it is even allowed. 
>
> Any help would be appreciated.
>
>

-- 
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/33c58fe9-8fa1-4418-a805-444cb5a27fba%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to