What's the best way to plot overlapping and open ranges?

2 次查看(过去 30 天)
I have a list of numbers and I have a list of ranges. If the smallest number is 600 and the maximum is 94223654 and there are 1872531 numbers (and a list of 145 ranges where some overlap), how do I represent where the values in the list of numbers overlap and where they match up with the ranges and how the ranges overlap? Should I use stem to plot it? I'm not sure how to go about it. Any advice would be helpful! Thanks

回答(2 个)

Mikhail
Mikhail 2014-8-22
编辑:Mikhail 2014-8-22
Can you give some example (with like 10 numbers and 4 ranges)? It's difficult to understand what are you meaning
  1 个评论
Megna Hari
Megna Hari 2014-8-22
Pretend the numbers are [1 3 4 5 8 8 9 10 11 13] and the range variable is 2 columns with mins and maxs as follows: range(:,1)=[1 3 7 11] and range(:,2)=[5 6 10 14]
so sometimes the ranges overlap and sometimes the numbers repeat. Is there a good way to plot it (maybe from 1 through 14) where one line shows how the numbers are scattered and another line shows how the ranges compare with the numbers (and also shows overlapping sections)?

请先登录,再进行评论。


Mikhail
Mikhail 2014-8-22
how the numbers are scattered
n=[1 3 4 5 8 8 9 10 11 13];
x=min(n):(max(n)-min(n))/10:max(n);
hist(n,x)
So you will obtain histogram of how your numbers are scattered.
I don't understand about other stuff you asked

类别

Help CenterFile Exchange 中查找有关 Scatter Plots 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by