【发布时间】:2017-10-02 08:29:23
【问题描述】:
PyQtgraph Y 轴标签以科学计数法显示。我不希望它采用科学计数法。将标签更改为非科学的代码是什么。
科学记数法 - 1.70 (x1e+06)
非科学计数法1700000(我想用非科学计数法显示Y轴)。
从 main() 函数我调用 addXYZ 来添加等高线,然后我调用 Show2dPlot 来显示等高线图。
##### add the XY contour line to plot #####
def addXYZ(self, X, Y, Z):
self.plotwin.plot(X, Y, pen=(255,255,255))#cmap=cm.coolwarm)
##### Format 2D Plot #####
def Show2dPlot(self):
self.plotwin.setLogMode(x=False, y=False)
self.plotwin.showGrid(x=True, y=True)
self.plotwin.setLabel('left', "Easting")# units='A')
self.plotwin.setLabel('bottom', "Northing") #, units='s')
self.plotwin.setAspectLocked()
self.plotwin.set_scientific(False) #I'm getting error in set_scientific
【问题讨论】:
-
使用
set_scientific(False) -
@RaminNietzsche 我收到 NameError,PyQtgraph 可能没有 set_scientific。 :(
-
你能分享你的部分代码吗?