From: Sam Rose on
I've got a problem that I'm struggling with, to which I suspect there is a fairly simple solution.

I have a data set in array form, where each data point has an X coordinate, a Y coordinate and a magnitude. I'd like to plot this in two ways:

Firstly with each point as a 'binary' value, where the magnitude is either 1 or 0, represented as a black dot or blank space in the correct position.

Secondly with each point as a colour, depending on the (now 'non binary') magnitude.

Any help would be greatly appreciated!

Sam
From: Steven Lord on

"Sam Rose" <sam.rose(a)strath.ac.uk> wrote in message
news:hrcel5$2te$1(a)fred.mathworks.com...
> I've got a problem that I'm struggling with, to which I suspect there is a
> fairly simple solution.
>
> I have a data set in array form, where each data point has an X
> coordinate, a Y coordinate and a magnitude. I'd like to plot this in two
> ways:
>
> Firstly with each point as a 'binary' value, where the magnitude is either
> 1 or 0, represented as a black dot or blank space in the correct position.
>
> Secondly with each point as a colour, depending on the (now 'non binary')
> magnitude.
>
> Any help would be greatly appreciated!

Take a look at the SCATTER function.

--
Steve Lord
slord(a)mathworks.com
comp.soft-sys.matlab (CSSM) FAQ: http://matlabwiki.mathworks.com/MATLAB_FAQ