1

我已经能够在 sciPy 中使用 pearsonr 函数来获取相关系数,现在想使用 matplotlib 将结果绘制到散点图上。

我浏览了文档,但看不到任何帮助。

实现这一目标的最佳方法是什么。

我不是数学家,所以这一切都很新。

Excel中有一个函数可以做到这一点。

谢谢

4

1 回答 1

-2

matplotlib.org 有几个例子。以下是您开始使用数据的方法:

import matplotlib.pyplot as plt
fig, ax1 = plt.subplots()
x = [50,500,1500,2500];
y = [72,414,1,13]
ax1.plot(x, y, 'bo')
plt.show()

这里是可用的最基本示例的链接:http: //matplotlib.org/examples/pylab_examples/simple_plot.html

于 2012-12-02T06:31:13.403 回答