Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/matlab/16.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Matlab pyplot在交互模式下显示大量数字_Matlab_Matplotlib_Interactive Mode - Fatal编程技术网

Matlab pyplot在交互模式下显示大量数字

Matlab pyplot在交互模式下显示大量数字,matlab,matplotlib,interactive-mode,Matlab,Matplotlib,Interactive Mode,我尝试使用交互模式在x轴上绘制大的数字,而不是刻度上的完整数字,我得到1、1.5等等和+5.043e3。如何显示完整的数字 在定义了plt.ion()之后,我在一个循环中有以下内容: plt.xlabel("Wavelength (angstroms)") plt.ylabel("Arbitrary Flux") plt.plot(xo,yo,'k--') for e in range(multispec): if ( e == 0): plt.plot(MX[e

我尝试使用交互模式在x轴上绘制大的数字,而不是刻度上的完整数字,我得到1、1.5等等和+5.043e3。如何显示完整的数字

在定义了
plt.ion()
之后,我在一个循环中有以下内容:

plt.xlabel("Wavelength (angstroms)")
plt.ylabel("Arbitrary Flux")
plt.plot(xo,yo,'k--')
    for e in range(multispec):
    if ( e == 0):
        plt.plot(MX[e],MY[e], 'r-')
    else:
    plt.plot(MX[e],MY[e])
l=float(int(n))
plt.axis([n-1, n+1, 0.1, 1.1])
n是在for中定义的其他变量。

[复制自]

勾号标签的格式由
格式化程序
对象控制,假设您没有做任何事情,则该对象将是
scaleformatter
[默认情况下][1]。如果可见值的分数变化非常小,则此格式化程序将使用常量移位。要避免这种情况,只需将其关闭:

plt.plot(arange(0,100,10) + 1000, arange(0,100,10))
ax = plt.gca()
ax.get_xaxis().get_major_formatter().set_useOffset(False)
plt.draw()
如果你想避免一般的科学记数法

ax.get_xaxis().get_major_formatter().set_scientific(False)
[抄袭自]

勾号标签的格式由
格式化程序
对象控制,假设您没有做任何事情,则该对象将是
scaleformatter
[默认情况下][1]。如果可见值的分数变化非常小,则此格式化程序将使用常量移位。要避免这种情况,只需将其关闭:

plt.plot(arange(0,100,10) + 1000, arange(0,100,10))
ax = plt.gca()
ax.get_xaxis().get_major_formatter().set_useOffset(False)
plt.draw()
如果你想避免一般的科学记数法

ax.get_xaxis().get_major_formatter().set_scientific(False)

它不起作用,但在其他程序中也起作用。谢谢对不起,小姐,请阅读您的问题。它不起作用,但在其他程序中也起作用。谢谢对不起,小姐,请阅读您的问题。另外: