tools.py 文件源码

python
阅读 23 收藏 0 点赞 0 评论 0

项目:CElegansBehaviour 作者: ChristophKirst 项目源码 文件源码
def plotTrajectory(data):
  #    points = np.array([x, y]).T.reshape(-1, 1, 2)
  #    segments = np.concatenate([points[:-1], points[1:]], axis=1)
  #
  #    lc = LineCollection(segments, cmap=plt.get_cmap('Spectral'))
  #    lc.set_array(z)
  #    #lc.set_linewidth(2)
  #
  #    plt.gca().add_collection(lc)

  import matplotlib.cm as cm
  cmap = cm.jet;
  c = np.linspace(0, 10, len(data[:,0]));
  plt.scatter(data[:,0], data[:,1], c = c, cmap = cmap, marker = '+');
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号