pyqtgraph xaxis issue

35 views
Skip to first unread message

Vlado Kršlin

unread,
Dec 12, 2020, 4:35:22 AM12/12/20
to pyqtgraph

Hello,  I put together few lines of code for showing temperature graph. Everything works ok except xaxis is shown with all 46 numbers which represent minuttes from now back. Is there any way to reduce shown nubers, for example to show every tenth number?
Small piece of  graph code is attached here to show issue.

With best regards, Vlado
graph_test.py

Vlado Kršlin

unread,
Dec 12, 2020, 5:10:59 AM12/12/20
to pyqtgraph


Added some imports into code ...
sobota, 12. december 2020 ob 10:35:22 UTC+1 je oseba Vlado Kršlin napisala:
graph_test.py

Jerzy Karczmarczuk

unread,
Dec 12, 2020, 7:30:08 AM12/12/20
to pyqt...@googlegroups.com
--

Actually, "Everything works ok" tout court.

You, yourself demanded, what you have got:

ticks = list(enumerate(timelist))

Add after it, e. g.:

ticks = ticks[::10]

(unless I misunderstood your issue...)

======

Jerzy Karczmarczuk

/Caen, France/



Vlado Kršlin

unread,
Dec 12, 2020, 12:57:15 PM12/12/20
to pyqtgraph
Thank you very much, that's it. Works like a charm.

With best regards, Vlado

sobota, 12. december 2020 ob 13:30:08 UTC+1 je oseba jerzy.kar...@gmail.com napisala:
Reply all
Reply to author
Forward
0 new messages