@@ -16,26 +16,28 @@ int main()
16
16
float xCoord = (float ) (i -100 )/10 ;
17
17
18
18
matrix_x.add (i, 1 , xCoord);
19
+ matrix_x.add (i, 2 , xCoord); // Segundo plotter
20
+ matrix_x.add (i, 3 , xCoord);
21
+
19
22
matrix_y.add (i, 1 , sin (2 *xCoord) + cos (xCoord));
23
+ matrix_y.add (i, 2 , cos (2 *xCoord) + sin (xCoord)); // Segundo plotter em Y. Alterando dados
24
+ matrix_y.add (i, 3 , 1 );
20
25
}
21
26
22
27
// Instanciando plotter
23
28
// MatrixPlot matrixplot = MatrixPlot(2, 2); //Define subplot Cols; subplot Rows;
24
29
25
30
MatrixPlot matrixplot = MatrixPlot ();
31
+ matrixplot.setAutoRange (false );
32
+
33
+ matrixplot.SetRange (' x' , -10 , 10 );
34
+ matrixplot.SetRange (' y' , -2 , 6 );
35
+
26
36
matrixplot.plot1d (matrix_x, matrix_y);
27
37
cout << " Depois do plot" << endl;
28
- // Matrix matrix_box = Matrix(10,2);
29
38
30
- // matrixplot.plotbox(matrix );
39
+ matrixplot.saveToFile ( " teste.eps " );
31
40
32
- // Plotando matrix 1d
33
- /*
34
- matrixplot.plot1d(matrix, 0); //Plota e define o indice do subplot
35
- matrixplot.plot1d(matrix, 1);
36
- matrixplot.plot1d(matrix, 2);
37
- matrixplot.plot1d(matrix, 3);
38
- */
39
41
matrixplot.Run ();
40
42
41
43
return 0 ;
0 commit comments