Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to do bubble plot?

Tags:

plot

matlab

I've searched for many ways to do bubble plot as Mathematica but with no worthy result, all what I've found is plotting with variant marker size, which is not a good solution as marker size value is bounded.

Is there anyway to do bubble plot in Matlab like the following plot of Mathematica ?


Bubble plot image

like image 741
Sameh K. Mohamed Avatar asked Jan 20 '13 16:01

Sameh K. Mohamed


1 Answers

I can't see what's wrong with scatter. Example:

x = 80 * randn(1, 30); 
y = 80 * randn(size(x));
r = randi(1500, size(x));
c = randi(10, size(x));
scatter(x, y, r, c, 'filled', 'MarkerEdgeColor', 'k')

This yielded for me the following plot:

enter image description here

As you can see, this plot shows both very large and very small circles.

like image 106
Eitan T Avatar answered Oct 21 '22 22:10

Eitan T