python – [:,0]和[:,1] 的plt.plot含义
发布时间:2020-12-20 13:00:15 所属栏目:Python 来源:网络整理
导读:参见英文答案 Understanding slice notation????????????????????????????????????31个 ???????????? Python Array Slice With Comma?????????????????????????????????????3个 我正在使用plt.plot绘制图表,使用在线查找的信息. 但是,我不知道y [:,0]是什么
参见英文答案 >
Understanding slice notation????????????????????????????????????31个
>???????????? Python Array Slice With Comma?????????????????????????????????????3个 我正在使用plt.plot绘制图表,使用在线查找的信息. 但是,我不知道y [:,0]是什么意思: plt.plot(t,y[:,0],label= 'active Mos') 同样,我也看到了[:,1] …… plt.plot是绘制一条线到图表,对吗? 解决方法
它是Numpy / Pandas中使用的符号.
[:,0] meas(或多或少)[first_row:last_row,column_0] – 你有二维列表/矩阵/数组,你得到第0列中的所有值(来自所有行). (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |