开发者

How to plot graph when interval and data is given

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.


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:

Lo,Hi,Percentage
1,3,2
3,8,6
...
100,200,99.99

Then, to load the CSV file in R you could write:

> dataSample <- read.csv(file="C:/sample.csv", head=TRUE, sep=",")

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:

> dataSample

From here, you can use the data to plot your graphs like in the tutorial.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜