Thanks Luke,

 

I thought the same way. But, it doesn't seem right, the reason is if user 
drag one of the view box, then range of individual x axis will change. 
Also, what if I have n number of waveform. 

So, I come up with idea for instance, instead of giving just data of y-axis 
here I also provide x-axis data as well. In additional, I reduce the sample 
for delay, e.g if I have 500 points for delay, instead of using all I usage 
just 150 points where I give value of 25 points from start, 25 points from 
end and 100 points for NaN value (for showing gap on graph). However, it 
doesn’t create any effect on pyqtgraph, and plot it in same scale. After 
that I exported the .csv file and plot it in excel, and guess what I got 
exact same plot which I expected. Here, I attached my .csv file and 
snippets of pyqtgraph and excel output graph. 

 

Now, please suggest me how can I get plot which just show data points from 
my array and ignore remaining points? Also, can you tell me how can I set 
interval between x - axis points?

  

<https://lh3.googleusercontent.com/-FS1T4uya4KQ/WSijPCNFaQI/AAAAAAAAAaY/lyBMG-InVbA2zrRHHBb0bg8NIXlZ7PfMQCLcB/s1600/Captureg1.PNG>

*Sample of PYQTGRAPH *

<https://lh3.googleusercontent.com/-Ognr6A-2THI/WSijSYesv6I/AAAAAAAAAac/aTbX4PjT8tEsVB-zAXrE3D3M52qOwJsHgCLcB/s1600/Captureg2.PNG>

*Sample of Excel Plot 1*

<https://lh3.googleusercontent.com/-mqAyKKp4a1Y/WSijXHmoY5I/AAAAAAAAAag/ph5cbEyINwQifqQA53_kfl0uMeseHV2NgCLcB/s1600/Captureg3.PNG>

*Sample of Excel Plot 2 *



On Friday, 26 May 2017 17:00:34 UTC-4, Luke Campagnola wrote:
>
> Interesting! 
> The first thing that comes to mind is to use two separate viewboxes, like:
>
> import pyqtgraph as pg
> pg.mkQApp()
> w = pg.GraphicsLayoutWidget()
> w.show()
> v1 = w.addPlot()
> v2 = w.addPlot()
> v2.hideAxis('left')
> v2.setYLink(v1)
>
> offset = 450
> def updateRange():
>     xrange1 = v1.vb.viewRange()[0]
>     xscale = (xrange1[1] - xrange1[0]) / v1.vb.rect().width()
>     xrange2 = xscale * v2.vb.rect().width()
>     v2.setXRange(offset, offset+xrange2, padding=0)
>
> v1.sigXRangeChanged.connect(updateRange)
>
> d = pg.np.random.normal(size=600)
> d[100:500] = 0
> v1.plot(d)
> v2.plot(d)
> v1.setXRange(0, 200)
>
> It would take a bit more work to make that look like a seamless plot, 
> though.
>
> On Thu, May 25, 2017 at 5:11 PM, raval ishit <[email protected] 
> <javascript:>> wrote:
>
>> Hi,
>>
>>
>> I have a question regrading to data plot. I implemented graph same as 
>> below (Sample graph 1), in which I plotted 2 sine way and delay. I want to 
>> squeeze the graph now by ignoring delay and represent as dotted line same 
>> as second graph (Sample graph 2) or I want to change scale of particular 
>> section of the graph. Is it possible with pyqtgraph? If yes, can you 
>> suggest me how to doing this?
>>
>>
>>
>>
>> <https://lh3.googleusercontent.com/-8yRSp8UULvI/WSdyJRiK7nI/AAAAAAAAAZ4/_3pxApPfvJ0JsvMs-dIRhAVC-D2P_tGAwCLcB/s1600/Graph.png>
>>
>> *Sample Graph 1*
>>
>>
>> <https://lh3.googleusercontent.com/-mmq1QWJLOQk/WSdyMCO3X8I/AAAAAAAAAZ8/i9zySkjmlygO7BfMhK7F4ezrh8Xaq8-0wCLcB/s1600/Graph2.png>
>>
>> *Sample Graph 2*
>>
>> -- 
>> 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] <javascript:>.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/pyqtgraph/68a0303b-8e30-470a-a1b2-7ff445709c36%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/pyqtgraph/68a0303b-8e30-470a-a1b2-7ff445709c36%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

-- 
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/8d9cc493-af88-431c-b484-5200ca25093c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
x0000,y0000
0,0
1,0
2,0
3,0
4,0
5,0
6,0
7,0
8,0
9,0
10,0
11,0
12,0
13,0
14,0
15,0
16,0
17,0
18,0
19,0
20,0
21,0
22,0
23,0
24,0.587785252
25,6.12E-16
26,-0.587785252
27,-0.951056516
28,-0.951056516
29,-0.587785252
30,-7.35E-16
31,0.587785252
32,0.951056516
33,0.951056516
34,0.587785252
35,8.57E-16
36,-0.587785252
37,-0.951056516
38,-0.951056516
39,-0.587785252
40,-9.80E-16
41,0.587785252
42,0.951056516
43,0.951056516
44,0.587785252
45,1.10E-15
46,-0.587785252
47,-0.951056516
48,-0.951056516
49,-0.587785252
50,-1.22E-15
51,0.587785252
52,0.951056516
53,0.951056516
54,0.587785252
55,-2.21E-15
56,-0.587785252
57,-0.951056516
58,-0.951056516
59,-0.587785252
60,-1.47E-15
61,0.587785252
62,0.951056516
63,0.951056516
64,0.587785252
65,5.14E-15
66,-0.587785252
67,-0.951056516
68,-0.951056516
69,-0.587785252
70,-1.71E-15
71,0.587785252
72,0.951056516
73,0.951056516
74,0.587785252
75,5.39E-15
76,-0.587785252
77,-0.951056516
78,-0.951056516
79,-0.587785252
80,-1.96E-15
81,0.587785252
82,0.951056516
83,0.951056516
84,0.587785252
85,-1.47E-15
86,-0.587785252
87,-0.951056516
88,-0.951056516
89,-0.587785252
90,-2.20E-15
91,0.587785252
92,0.951056516
93,0.951056516
94,0.587785252
95,5.88E-15
96,-0.587785252
97,-0.951056516
98,-0.951056516
99,-0.587785252
100,-2.45E-15
101,0.587785252
102,0.951056516
103,0.951056516
104,0.587785252
105,-9.81E-16
106,-0.587785252
107,-0.951056516
108,-0.951056516
109,-0.587785252
110,4.41E-15
111,0.587785252
112,0.951056516
113,0.951056516
114,0.587785252
115,6.37E-15
116,-0.587785252
117,-0.951056516
118,-0.951056516
119,-0.587785252
120,-2.94E-15
121,0.587785252
122,0.951056516
123,0.951056516
124,0
125,0
126,0
127,0
128,0
129,0
130,0
131,0
132,0
133,0
134,0
135,0
136,0
137,0
138,0
139,0
140,0
141,0
142,0
143,0
144,0
145,0
146,0
147,0
148,0
149,0
150,0
151,0
152,0
153,0
154,0
155,0
156,0
157,0
158,0
159,0
160,0
161,0
162,0
163,0
164,0
165,0
166,0
167,0
168,0
169,0
170,0
171,0
172,0
173,nan
174,nan
175,nan
176,nan
177,nan
178,nan
179,nan
180,nan
181,nan
182,nan
183,nan
184,nan
185,nan
186,nan
187,nan
188,nan
189,nan
190,nan
191,nan
192,nan
193,nan
194,nan
195,nan
196,nan
197,nan
198,nan
199,nan
200,nan
201,nan
202,nan
203,nan
204,nan
205,nan
206,nan
207,nan
208,nan
209,nan
210,nan
211,nan
212,nan
213,nan
214,nan
215,nan
216,nan
217,nan
218,nan
219,nan
220,nan
221,nan
222,nan
223,nan
224,nan
225,nan
226,nan
227,nan
228,nan
229,nan
230,nan
231,nan
232,nan
233,nan
234,nan
235,nan
236,nan
237,nan
238,nan
239,nan
240,nan
241,nan
242,nan
243,nan
244,nan
245,nan
246,nan
247,nan
248,nan
249,nan
250,nan
251,nan
252,nan
253,nan
254,nan
255,nan
256,nan
257,nan
258,nan
259,nan
260,nan
261,nan
262,nan
263,nan
264,nan
265,nan
266,nan
267,nan
268,nan
269,nan
270,nan
271,nan
272,nan
623,0
624,0
625,0
626,0
627,0
628,0
629,0
630,0
631,0
632,0
633,0
634,0
635,0
636,0
637,0
638,0
639,0
640,0
641,0
642,0
643,0
644,0
645,0
646,0
647,0
648,0
649,0
650,0
651,0
652,0
653,0
654,0
655,0
656,0
657,0
658,0
659,0
660,0
661,0
662,0
663,0
664,0
665,0
666,0
667,0
668,0
669,0
670,0
671,0
672,0.951056516
673,0.951056516
674,0.587785252
675,3.43E-14
676,-0.587785252
677,-0.951056516
678,-0.951056516
679,-0.587785252
680,1.18E-14
681,0.587785252
682,0.951056516
683,0.951056516
684,0.587785252
685,-9.86E-16
686,-0.587785252
687,-0.951056516
688,-0.951056516
689,-0.587785252
690,-9.79E-15
691,0.587785252
692,0.951056516
693,0.951056516
694,0.587785252
695,2.06E-14
696,-0.587785252
697,-0.951056516
698,-0.951056516
699,-0.587785252
700,-3.14E-14
701,0.587785252
702,0.951056516
703,0.951056516
704,0.587785252
705,4.21E-14
706,-0.587785252
707,-0.951056516
708,-0.951056516
709,-0.587785252
710,3.93E-15
711,0.587785252
712,0.951056516
713,0.951056516
714,0.587785252
715,6.85E-15
716,-0.587785252
717,-0.951056516
718,-0.951056516
719,-0.587785252
720,-1.76E-14
721,0.587785252
722,0.951056516
723,0.951056516
724,0.587785252
725,2.84E-14
726,-0.587785252
727,-0.951056516
728,-0.951056516
729,-0.587785252
730,-3.92E-14
731,0.587785252
732,0.951056516
733,0.951056516
734,0.587785252
735,5.00E-14
736,-0.587785252
737,-0.951056516
738,-0.951056516
739,-0.587785252
740,-3.91E-15
741,0.587785252
742,0.951056516
743,0.951056516
744,0.587785252
745,1.47E-14
746,-0.587785252
747,-0.951056516
748,-0.951056516
749,-0.587785252
750,-2.55E-14
751,0.587785252
752,0.951056516
753,0.951056516
754,0.587785252
755,3.63E-14
756,-0.587785252
757,-0.951056516
758,-0.951056516
759,-0.587785252
760,-4.70E-14
761,0.587785252
762,0.951056516
763,0.951056516
764,0.587785252
765,5.78E-14
766,-0.587785252
767,-0.951056516
768,-0.951056516
769,-0.587785252
770,-1.18E-14
771,0.587785252
772,0
773,0
774,0
775,0
776,0
777,0
778,0
779,0
780,0
781,0
782,0
783,0
784,0
785,0
786,0
787,0
788,0
789,0
790,0
791,0
792,0
793,0
794,0
795,0

Reply via email to