matplotlib散点图的半径

时间:2017-12-14 15:35:13

标签: python matplotlib

我正在努力设置matplotlib散点图的大小。

在这里,让我们考虑一种在2D方形单元格中放置圆形的方法,单元格的大小为10 * 10。我们的圆的半径为1。

以下代码是我目前实现这一动机的情况,除了圆的半径:

    import matplotlib.pyplot as plt
    fig = plt.figure(figsize=(5,5))# The unit of this figsize is in inches
    ax = fig.add_subplot(1,1,1)
    ax.set_xlim(0,10)
    ax.set_ylim(0,10)
    ax.scatter(5,5,marker='o',s=1)
    plt.show()

最大的障碍是splt.scatter的行为。 s的单位是多少?分?寸? s的价值有几何对应?

我的问题可能会被许多大师的先前答案所解决。但是我找不到任何具有完全相同动机的问题,所以我发布了这个。提前谢谢!

0 个答案:

没有答案
相关问题