Rohan Chakrabarty
Rohan Chakrabarty

Reputation: 33

Alternative to scatterplot plotting in matlab

I am plotting a map between x,y and density. x and y are distances. Is there any other method apart from scatterplot to plot it. I want the density to be shown in colorbar. I have been doing the following:

scatter(x(1:end-1), y(1:end-1), 5, g);
colorbar('eastoutside');
caxis([12 max(g)]);

Upvotes: 0

Views: 1382

Answers (1)

TJ1
TJ1

Reputation: 8520

Use surf(x,y,z), in which x, and y are your distances and z is density.

Upvotes: 1

Related Questions