【问题标题】:Plotting with specific window in matplotlib在 matplotlib 中使用特定窗口进行绘图
【发布时间】:2014-02-12 03:51:02
【问题描述】:

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

我正在尝试制作 x 轴 3 → 9y 轴 而不是 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()

【问题讨论】:

    标签: python-3.x matplotlib plot


    【解决方案1】:

    我想你只需要使用:

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

    【讨论】:

      猜你喜欢
      • 2023-03-29
      • 2011-01-09
      • 1970-01-01
      • 2012-01-02
      • 2015-12-01
      • 1970-01-01
      • 2023-03-09
      • 2012-09-03
      • 1970-01-01
      相关资源
      最近更新 更多