How to visualize data on x,y plan

I have got a 2 by N matrix , the first and second raw represent x and y coordinate of a point. I want to visualize the points with the same coordinates.
My questions are :
1. What is the best way to visualize the data!
2. How to fit a Gaussian distribution to the data !
Thanks.

2 Comments

John D'Errico
John D'Errico on 18 Dec 2014
Edited: John D'Errico on 18 Dec 2014
You plot the data using plot. Or use scatter. The best way to visualize a set of data depends on what it represents. What does it mean to you?
Numbers are just numbers. They are meaningless out of context, and only you can attach the necessary context, something we are not seeing yet.
You need to explain what you mean by fitting a "Gaussian distribution", as there are several ways you might do so, depending of course on what the data represents.
For example, sometimes someone might really just want to fit a Gaussian shape to some data, using least squares perhaps. Even that needs clarification, since there are several variations of Gaussian curve one might employ. Is there a constant term?
Or is this really a question of fitting a distribution function to data points in some form? Do you have data in the form of a histogram, so these are counts or frequencies? Or is it raw data?
You say something about x and y, so I don't know if you are talking about a 2-d Gaussian or if x and y represent something else to you. Only you know these things.
A picture often helps. Or you can attach some data. But in any case, you need to explain more clearly what you have and what are your goals.
Finally, it would help to know if you have certain toolboxes. Here the important ones would be the stats toolbox, and/or the optimization toolbox.
Thanks John,
The 2 by N matrix represents the coordinates on the Maxwellian space of an image.
I want to see how is the data clusters in the Maxwellian space by fitting a gaussian distribution .
Currently I am using:
figure,
hist3(Max_Matrix',[69 69]);title('Image on the Maxewllian space');
Max_Matrix is the 2 by N matrix of the points on the Maxwellian space.
This is the result I got :
I don't know who to choose the number of bins that could give the better visualisation of the data.

Answers (0)

This question is closed.

Asked:

on 18 Dec 2014

Closed:

on 20 Aug 2021

Community Treasure Hunt

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

Start Hunting!