Scaling Ticks after Setting

27 views
Skip to first unread message

Tom Barrett

unread,
Jul 6, 2017, 10:09:26 AM7/6/17
to pyqtgraph
Hello,

I have

x = [155, 255, 355, ...]
y = [555, 331, 777, ...]

And I plot them with

xdict = dict(enumerate(x))

self.plot = pg.PlotWidget()
axis = self.plot.getPlotItem().getAxis("bottom")
axis.setTicks([xdict.items()])

p = pg.PlotDataItem(list(xdict.keys()), y, axisItem={'bottom' : axis})

self.plot.addItem(p)

So now my whole x axis is crowded with ticks, how can I set them?
I have tried setTickSpacing with no help.

Thanks,
Tom
Reply all
Reply to author
Forward
0 new messages