给定间隔和数据时如何绘制图表
假设我获得了一些如下数据:-
Size-Range Percentage
[1-3] 2% [3-8] 6% [8-20] 10% [20-50] 30% [50-100] 80% [100-200] 99.99%
假设我运行一个包含许多数据文件的算法,并得到这个输出。 第一列显示算法的时间,第二列显示处理的数据的百分位数。 我只想绘制这些数据。 我想画一些图表。
请建议我如何使用 gnuplot 或任何其他工具来做到这一点。
Suppose i have obtained some data which is like this :-
Size-Range Percentage
[1-3] 2%
[3-8] 6%
[8-20] 10%
[20-50] 30%
[50-100] 80%
[100-200] 99.99%
Suppose i run an algorithm with many data files and i got this output.
1st column shows the time of algorithm and 2nd column shows the percentile of data processed.
I just want to plot this data.
I want to draw some graph.
Please suggest me how can i do this using gnuplot or any other tool.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以在 R 中绘制直方图或条形图(有关更多详细信息此处)。有关此方向的优秀教程,请参阅 Producing Simple Graphs与 R。
例如,假设您的 CSV 文件中有数据,如下所示:
然后,要在 R 中加载 CSV 文件,您可以编写:
请注意,在 *NIX 计算机上,您应该将文件路径替换为“/home” /用户名/路径/to/sample.csv”。要检查这些值,只需键入:
从这里,您可以使用数据来绘制图表,就像教程中一样。
You can draw a histogram or a barplot in R (more details about it here). For a good tutorial in this direction, please see Producing Simple Graphs with R.
For example, suppose you have the data in a CSV file which looks like this:
Then, to load the CSV file in R you could write:
Note that on *NIX machines you should replace the path to your file with something like "/home/username/path/to/sample.csv". To check the values, simply type:
From here, you can use the data to plot your graphs like in the tutorial.