Le 06/05/2020 à 14:11, Syed Imtiaz Ali Shah a écrit :
As can be seen in this picture, the current value of the plot seems to
be 30 but even this value is not shown. I have set Y limit to (0,100).
I would like to show at least every thrid value on Y-Axis.
For example [0,3,6,9,12............100]
I will appreciate your help.
I would appreciate if you could show your program, instead of just a
plot without any details.
You say: "could not find any solution so far". *Did you really try?* I
suspect that you prefer to ask for help instead of reading the manual,
and all kind of tutorial-like examples on the Web.
You would find AxisItems, setTicks, and other useful goodies. OK, try
this, somewhat senseless:
*import numpy as np**
**import pyqtgraph as pg**
**
**dta=np.linspace(0,1,200)
gr=pg.plot(dta,pen='r')
gr.setYRange(-1.2,1.2)****
**
**axy = gr.getAxis('left')**
**yticks = [-1,0,0.3,0.8,1.2] # /or more dense if you wish/**
**axy.setTicks([[(p, str(p)) for p in yticks ]])*
Adapt this to your needs. Good bye.
Jerzy Karczmarczuk
/Caen, France/
--
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/0b79f4fc-c391-f705-d5c5-caaf67f36eb3%40gmail.com.