## Ploting points problem

### Ploting points problem

I'm working on a game in delphix. The DXDraw component can take doubles a
the points on where to draw the desired object. My problem is that at a
certain point in the program the unit i use to calculate points was
beginning to return values that were too large. and i was beginning to get
this "EOverflow" error. I think my results were too large. I need to
firure out the best way to deal with this problem. Or if not, how to round
off a double to a ceratin amount of decimal places to maintain smooth
animation.

Hi,

When we apply the plot command to two matrices X and Y of equal size, matlab constructs a plot for every pair of corresponding columns in the two matrices, and assigns colors to the plots according the order specified in the ColorOrder property of the axes. eg:

t = [0:0.01:1]';
rad = [1 2 3 4];
X = cos(2*pi*t)*rad;
Y = sin(2*pi*t)*rad;
plot(X,Y, '*')

If X and Y are vectors instead of matrices, matlab always interprets them as consituting the points of a single plot, no matter whether X and Y are row or column vectors.
Is there any (proper) way to force matlab to interpret X and Y as containing multiple plots with one point each (plotting them according to ColorOrder, which is important to me)?
i.e. if
X = [1 2 3 4]; Y = [6 7 8 9];
then (1,1), (2,2), (3,3) and (4,4) are four "plots" with one point each, and plotted with colors defined by ColorOrder?

Besides a hack consisting of adding a row of zeros to the bottom of X and Y making them into a matrices (then ignoring (0,0) which i know not to be actual data)
I tried

figure; hold on;
X = num2cell(X), Y = num2cell(Y);
plot(X{:}, Y{:}, '*');

which nearly works, but the style property '*' is applied only to the last plot, leaving the first 3 plots nearly invisible.
I realise I could also do it manually by plotting one point at a time and iterating through ColorOrder, but that seems tacky as well.

Any ideas?