Question: Plotting Curves

I have an array of points stored in a matrix, and I want to plot them on a graph along with a couple other polygons.  Here is a short snip-it of code that describes the process:

pos := Matrix(3, 241, datatype = float[8]) #the contents of this matrix are filled out in the program

with(plots);

PositionPlot := PLOT3D(CURVES(pos), COLOR(RGB, 0, 0, 1), TEXT([1, 60, 1], 'pitch', ALIGNABOVE));

HomeplatePlot := PLOT3D(POLYGONS([[0, 0, 0], [.7083, .7083, 0], [.7083, 1.4167, 0], [-.7083, 1.41666667, 0], [-.7083, .7083, 0]]), COLOR(RGB, 1, 0, 0), TEXT([-1, -1, -1], 'HomePlate', ALIGNABOVE));

MoundPlot := PLOT3D(POLYGONS([[1, 60.5, .875], [1, 61, .875], [-1, 61, .875], [-1, 60.5, .875]]), COLOR(RGB, 1, .5, 0), TEXT([13, 730, 12], 'Mound', ALIGNBELOW));

StrikezonePlot := PLOT3D(POLYGONS([[.9583, .7083, 3.63], [.9583, .7083, 1.6], [-.9583, .7083, 1.6], [-.958333333, .7083, 3.63]]), COLOR(RGB, 0, 0, 0), TEXT([13, 10, 45], 'StrikeZone', ALIGNABOVE, ALIGNRIGHT));

displayPitch := display(PositionPlot, MoundPlot, HomeplatePlot, StrikezonePlot);

displayPitch;

 

In short, the points simply do not seem to appear on the axes properly.  When I fill my matrix with a series of points that stretch from (0, 100, 4) towards (0,0,4), I get a line that begins at (0,0,0).  The contents of the plotted matrix are below:

Matrix(3, 241, {(1, 1) = 0., (1, 2) = 0., (1, 3) = 0., (1, 4) = 0., (1, 5) = 0., (1, 6) = 0., (1, 7) = 0., (1, 8) = 0., (1, 9) = 0., (1, 10) = 0., (1, 11) = 0., (1, 12) = 0., (1, 13) = 0., (1, 14) = 0., (1, 15) = 0., (1, 16) = 0., (1, 17) = 0., (1, 18) = 0., (1, 19) = 0., (1, 20) = 0., (1, 21) = 0., (1, 22) = 0., (1, 23) = 0., (1, 24) = 0., (1, 25) = 0., (1, 26) = 0., (1, 27) = 0., (1, 28) = 0., (1, 29) = 0., (1, 30) = 0., (1, 31) = 0., (1, 32) = 0., (1, 33) = 0., (1, 34) = 0., (1, 35) = 0., (1, 36) = 0., (1, 37) = 0., (1, 38) = 0., (1, 39) = 0., (1, 40) = 0., (1, 41) = 0., (1, 42) = 0., (1, 43) = 0., (1, 44) = 0., (1, 45) = 0., (1, 46) = 0., (1, 47) = 0., (1, 48) = 0., (1, 49) = 0., (1, 50) = 0., 

(2, 1) = 60., (2, 2) = 59., (2, 3) = 58., (2, 4) = 57., (2, 5) = 56., (2, 6) = 55., (2, 7) = 54., (2, 8) = 53., (2, 9) = 52., (2, 10) = 51., (2, 11) = 50., (2, 12) = 49., (2, 13) = 48., (2, 14) = 47., (2, 15) = 46., (2, 16) = 45., (2, 17) = 44., (2, 18) = 43., (2, 19) = 42., (2, 20) = 41., (2, 21) = 40., (2, 22) = 39., (2, 23) = 38., (2, 24) = 37., (2, 25) = 36., (2, 26) = 35., (2, 27) = 34., (2, 28) = 33., (2, 29) = 32., (2, 30) = 31., (2, 31) = 30., (2, 32) = 29., (2, 33) = 28., (2, 34) = 27., (2, 35) = 26., (2, 36) = 25., (2, 37) = 24., (2, 38) = 23., (2, 39) = 22., (2, 40) = 21., (2, 41) = 20., (2, 42) = 19., (2, 43) = 18., (2, 44) = 17., (2, 45) = 16., (2, 46) = 15., (2, 47) = 14., (2, 48) = 13., (2, 49) = 12., (2, 50) = 11.,

(3, 1) = 4., (3, 2) = 4., (3, 3) = 4., (3, 4) = 4., (3, 5) = 4., (3, 6) = 4., (3, 7) = 4., (3, 8) = 4., (3, 9) = 4., (3, 10) = 4., (3, 11) = 4., (3, 12) = 4., (3, 13) = 4., (3, 14) = 4., (3, 15) = 4., (3, 16) = 4., (3, 17) = 4., (3, 18) = 4., (3, 19) = 4., (3, 20) = 4., (3, 21) = 4., (3, 22) = 4., (3, 23) = 4., (3, 24) = 4., (3, 25) = 4., (3, 26) = 4., (3, 27) = 4., (3, 28) = 4., (3, 29) = 4., (3, 30) = 4., (3, 31) = 4., (3, 32) = 4., (3, 33) = 4., (3, 34) = 4., (3, 35) = 4., (3, 36) = 4., (3, 37) = 4., (3, 38) = 4., (3, 39) = 4., (3, 40) = 4., (3, 41) = 4., (3, 42) = 4., (3, 43) = 4., (3, 44) = 4., (3, 45) = 4., (3, 46) = 4., (3, 47) = 4., (3, 48) = 4., (3, 49) = 4., (3, 50) = 4.,

I imagine the error is in the way I told the computer to plot the matrix.  Can anyone spot the problem?

Thank you,

-Nick

Please Wait...