[ephyviewer] synchronizing horizontal size and scale of viewers

12 views
Skip to first unread message

Peter N. Steinmetz

unread,
Apr 10, 2025, 12:41:30 PMApr 10
to Neural Ensemble
I am using ephyviewer to construct a window with multiple trace and spike viewers. 

Presently the scale of the spike viewer occupies a different width in the window from the trace viewers. See attached. 

Is there an existing feature to change this and make the horizontal extent of the x-axes the same in all views? Screenshot 2025-04-10 at 9.40.46 AM.png

Peter N. Steinmetz

unread,
Apr 10, 2025, 2:21:25 PMApr 10
to Neural Ensemble
A bit of noodling around in the pyqtgraph source code resulted in the following, which works:

if plots is a list of all the plot items in the ViewBoxes to be aligned

maxWidth = max(plt.axes['left']['item'].width() for plt in plots)
for plt in plots:
   plt.axes['left']['item'].setWidth(maxWidth)


Samuel Garcia

unread,
Apr 15, 2025, 2:15:14 PMApr 15
to neurale...@googlegroups.com
Hi Peter.
Yes. I know.
It is due to the ylabel. Maybe there is a possible fix in pyqtgraph.
--
You received this message because you are subscribed to the Google Groups "Neural Ensemble" group.
To unsubscribe from this group and stop receiving emails from it, send an email to neuralensembl...@googlegroups.com.
To view this discussion, visit https://groups.google.com/d/msgid/neuralensemble/3082d204-602d-4920-9d17-d97737a754f6n%40googlegroups.com.

Samuel Garcia

unread,
Apr 15, 2025, 2:15:53 PMApr 15
to neurale...@googlegroups.com
Oh good idea.
Could you make a PR ?
--
You received this message because you are subscribed to the Google Groups "Neural Ensemble" group.
To unsubscribe from this group and stop receiving emails from it, send an email to neuralensembl...@googlegroups.com.
Message has been deleted

Peter N. Steinmetz

unread,
Apr 18, 2025, 7:56:59 AMApr 18
to Neural Ensemble
Perhaps after my other ones on python-neo get reviewed. 
Reply all
Reply to author
Forward
0 new messages