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]> 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].
> 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/CACZXET-J1%2Ba6hk98aGhgRhjzbOo%3DjRjGJ-k40yy1LwcBvhiH4Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.