我在python的散点图的X轴上得到了不正确的值

时间:2018-07-17 16:59:02

标签: python matplotlib plotly scatter-plot numpy-ndarray

我的散点图如下:

以下是用于绘制散点图的命令:

 plt.scatter(x,y[:,0],c="c", alpha=0.3)

在这里,x和y都是numpy数组。值如下:

 x:
       array([  36259516,   36259544,   36259600, ..., 9251680654, 
        9251680675, 9296284549], dtype=int64)      

 y:
      array([[ 0.91122632],
      [ 0.79788549],
      [ 0.87083686],
       ..., 
      [ 0.77459159],
      [ 0.69324043],
      [ 0.77459159]])

注意:简而言之,我想绘制唯一的'x'的所有'y'值。

enter image description here

如果可以看到,即使在x轴上传递了不同的数组,在绘制图形时,我也会注意到两个轴都代表y轴值。

谁能帮我解决这个问题。

0 个答案:

没有答案