【发布时间】:2017-10-10 09:22:53
【问题描述】:
我有数据文件说data.txt,
1 10
2 20
3 30
4 41
5 49
1 11
2 19
3 32
4 37
5 52
注意有两组数据。我想将它们绘制在同一张图中。在gnuplot 中非常简单,我们只需要运行plot 'data.txt' with line,我们就会得到这样的图表,
实际上我在同一个数据文件中有 50 个这样的集合。我刚开始学习python。我想使用numpy 和matplotlib 绘制这个数据文件。
这个论坛里有类似的话题,比如,
How to plot data from multiple two column text files with legends in Matplotlib?
How can you plot data from a .txt file using matplotlib?
但我找不到与我的问题相似的任何内容。
【问题讨论】:
-
你能展示你拥有的代码吗?
标签: python numpy matplotlib plot