使用matplotlib中的特定窗口绘图

时间:2014-02-12 03:51:03

标签: python-3.x matplotlib plot

我正在尝试打印希尔伯特矩阵的误差率。

我正在尝试将 x轴 3 → 9 y轴设为large range

8.71244799e+01   6.44297999e+02   4.50711567e+03   3.04673758e+04
2.01144882e+05   1.30525476e+06   8.35964228e+06

我正在努力调整窗口,或正确地为此绘图。

任何帮助都会很棒!

这是我尝试绘制(某事)

import matplotlib.pyplot as plt

plot = 6
plt.xlabel ('n')
plt.ylabel ('Error Ration')
fig = plt.figure()
ax = fig.add_subplot(111)

for a in range (0, plot, 1):
    y = xratio[a]
    x = plot + 3
    ax.plot(x,y, mfc='orange', mec='orange', marker='.')

plt.show()

1 个答案:

答案 0 :(得分:0)

我认为你只需要使用:

ax.set_xlim([x_min, x_max])
ax.set_ylim([y_min, y_max])