From: Michael on
I have a set of n 2D data points stored in an unordered nx3 matrix (x coordinates, y coordinates, value), which I plot to a figure using the "scatter" function.

How can I save that plot to an (image) matrix, i. e. changing the absolute (x,y) coordinates for (row,col) coordinates ranging from (1,1) to (size(image,1),size(image,2)), keeping just the original values of each data point?

Of course this problem does not depend on the scatter functionality but can also be useful for any kind of plots - any ideas?
From: Michael on
Is that question really so special nobody has ever come across it before?

In the meantime I tried to use "getframe" and "frame2im", but unfortunately that's too coarse and registered images don't stay registered...

In the end I just want to compare two 2D plots (then in the form of binary images) concerning the percentage of cover in a certain area.
From: Walter Roberson on
Michael wrote:
> Is that question really so special nobody has ever come across it before?

Please inform me of when it is acceptable for me to do housework, yard
work, cooking, work, and sleep, such that I am always available to
answer people as quickly as they _expect_. I am located in the GMT-6
timezone, and there are notable numbers of people asking questions from
Asia, Australia, New Zealand, India, the Middle East, Western Europe,
and continental Canada and USA.

> In the meantime I tried to use "getframe" and "frame2im", but
> unfortunately that's too coarse and registered images don't stay
> registered...

print() to a file specifying your file type and a resolution, and then
read the image file. When choosing your file type, take note of which
formats do not support changing the resolution (i.e., when GhostScript
is used to render.)
http://www.mathworks.com/access/helpdesk/help/techdoc/ref/print.html#brneyqn