How do I change Number of axis-ticks?

30 views
Skip to first unread message

sem...@huconn.com

unread,
Apr 23, 2018, 9:57:02 PM4/23/18
to pyqtgraph

Now I want to customize the distances of the ticks (0 , 5, 10, ...) depending on the range, so that only 5-10 ticks are displayed.

Is there an easy way to implement that? And what is the best way to do it?

Carlos Pascual

unread,
Apr 24, 2018, 3:47:46 AM4/24/18
to pyqt...@googlegroups.com, sem...@huconn.com
What you are looking for is probably AxisItem.setTickSpacing()

Or, if you are implementeing your own AxisItem, you can reimplement the
tickSpacing() method
--
+----------------------------------------------------+
Carlos Pascual Izarra
Scientific Software Coordinator
Computing Division
ALBA Synchrotron [http://www.albasynchrotron.es]
Carrer de la Llum 2-26
E-08290 Cerdanyola del Valles (Barcelona), Spain
E-mail: cpas...@cells.es
Phone: +34 93 592 4428
+----------------------------------------------------+
Reply all
Reply to author
Forward
0 new messages