Here's my code, the axis range is correct, but there's no image

self.plot_widget = pg.GraphicsLayoutWidget(show=True)
date_axis = pg.DateAxisItem(orientation='bottom')
date_axis.setLabel('time')
view = self.plot_widget.addPlot(0, 0, title="image", axisItems={'bottom': 
date_axis})
time = np.array([t.timestamp() * 1e6 for t in self.time_list])
plt = pg.PColorMeshItem()
view.addItem(plt)
view.invertY()
view.setXRange(time.min() / 1e6, time.max() / 1e6)
plt.setData(self.data.T)
bar_static = pg.ColorBarItem(
label="",
colorMap=pg.colormap.getFromMatplotlib('jet'),
orientation='vertical')
bar_static.setImageItem([plt])
self.plot_widget.addItem(bar_static, 0, 1)
在2023年7月19日星期三 UTC+8 17:37:11<MINGFEI MU> 写道:

> When using pyqtgraph.PColorMeshItem, pyqtgraph.DateAxisItem is used as its 
> X-axis, and the range of the X-axis is set, but either the image doesn't 
> line up with the X-axis or it doesn't show the image, can you help me?

-- 
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/24e56223-bcea-4c07-88b3-8bfa1ce2ceaan%40googlegroups.com.

Reply via email to