How two wrap a phase curve between two value.

28 views
Skip to first unread message

Rajab Legnain

unread,
Mar 16, 2017, 7:52:34 PM3/16/17
to pyqtgraph

Hello Every One

I have a question, hoping someone has the answer.


I am trying to create a graph for phase curves. This graph will wrap the value if it is larger than 180 degree or smaller than -180.

I have attached a photos shows what exactly I want to do.


Thanks for help in advance.



I



Sebastian Höfer

unread,
Mar 17, 2017, 8:05:13 AM3/17/17
to pyqtgraph
Hi,

the easiest way would be to unwrap your phase before plotting it. There is already a function for that in numpy:
Per default it expects the data to be in radians, but it should be configurable to degrees or just convert it to radians before unwrapping.

Regards
S
Message has been deleted

Rajab Legnain

unread,
Mar 17, 2017, 7:00:20 PM3/17/17
to pyqtgraph

Thanks Sebastian for help.
When I did what you told me, I got this. please look at the new photo.
The issue is that I  don't want a connecting line between the discontinuous points. how to remove the line that marked by arrow. 

Auto Generated Inline Image 1

Rajab Legnain

unread,
Mar 18, 2017, 1:45:12 AM3/18/17
to pyqtgraph
I figured out how to remove the  unwanted two lines.  I used the param called "connect" in plotDataItem.
for more info read the PlotDataItem

Regards
Reply all
Reply to author
Forward
0 new messages