@@ -84,9 +84,9 @@ void test3()
84
84
Madplotlib plt;
85
85
plt.title (" Test 3: Multiple Data Series" );
86
86
plt.axis (0 , 25 , 0 , 14 );
87
- plt.plot (x, y, _marker =QString (" --" ), _label =QString (" label=Dashed Line" ));
88
- plt.plot (x, y+5 , _label =QString (" label=Default Line" ), (quint32)4 );
89
- plt.plot (x, y+10 , QString (" ." ), _label =QString (" label=Dotted Line" ));
87
+ plt.plot (x, y, marker =QString (" --" ), label =QString (" label=Dashed Line" ));
88
+ plt.plot (x, y+5 , label =QString (" label=Default Line" ), (quint32)4 );
89
+ plt.plot (x, y+10 , QString (" ." ), label =QString (" label=Dotted Line" ));
90
90
plt.legend (); // default position is "lower center"
91
91
plt.show ();
92
92
@@ -125,8 +125,8 @@ void test4()
125
125
plt.title (" Test 4: Random Scatter Plot" );
126
126
plt.locator_params (" x" , 10 );
127
127
plt.axis (-25 , 100 , -25 , 100 );
128
- plt.plot (x, y, _marker =QString (" o" ), 0 .7f , QColor (255 , 0 , 0 ), 8 .0f ); // red, 30% transparent, markersize 8
129
- plt.plot (x2, y2, _marker =QString (" o" ), 0 .5f , QColor (0 , 0 , 255 )); // blue, 50% transparent
128
+ plt.plot (x, y, marker =QString (" o" ), 0 .7f , QColor (255 , 0 , 0 ), 8 .0f ); // red, 30% transparent, markersize 8
129
+ plt.plot (x2, y2, marker =QString (" o" ), 0 .5f , QColor (0 , 0 , 255 )); // blue, 50% transparent
130
130
plt.show ();
131
131
132
132
#ifdef SCRSHOT
@@ -191,10 +191,10 @@ void test6()
191
191
105 , 111 , 120 , 126 , 120 , 104 , 85 , 92 ;
192
192
193
193
Madplotlib plt;
194
- plt.plot (x, y, _color =QColor (0xFF2700 )); // red
195
- plt.plot (x, y, _marker =QString (" o" ), _color =QColor (0xFF2700 ));
196
- plt.plot (x, y-40 , _color =QColor (0x008FD5 )); // blue
197
- plt.plot (x, y-40 , _marker =QString (" o" ), _color =QColor (0x008FD5 ));
194
+ plt.plot (x, y, color =QColor (0xFF2700 )); // red
195
+ plt.plot (x, y, marker =QString (" o" ), color =QColor (0xFF2700 ));
196
+ plt.plot (x, y-40 , color =QColor (0x008FD5 )); // blue
197
+ plt.plot (x, y-40 , marker =QString (" o" ), color =QColor (0x008FD5 ));
198
198
199
199
plt.title (" Test 6: Line + Scatter" );
200
200
plt.xlabel (" X values" );
@@ -240,7 +240,7 @@ void test7()
240
240
// On Qt 7.5, Qt Charts has a bug spacing correctly categories on negative Y axis (-1, 1).
241
241
// For now, drawing (y+1) will bypass that since the values will fall between (0, 2).
242
242
plt.ylim (0 , 2 );
243
- plt.plot (x, y+1 , _marker =QString (" o" ), _alpha =1 .f , _linewidth =2 , _markersize =7 .0f ); // alpha=1.f, linewidth=2, markersize=7.f
243
+ plt.plot (x, y+1 , marker =QString (" o" ), alpha =1 .f , linewidth =2 , markersize =7 .0f ); // alpha=1.f, linewidth=2, markersize=7.f
244
244
plt.grid (true );
245
245
246
246
plt.show ();
@@ -265,13 +265,13 @@ void test8()
265
265
Madplotlib plt;
266
266
plt.title (" Test 8: Line + Square Markers + Hidden Ticks" );
267
267
plt.axis (" off" );
268
- plt.plot (x, x.sqrt (), _color =QColor (0 , 0 , 0 ));
269
- plt.plot (x, -x.sqrt (), _color = QColor (0 , 0 , 0 ));
268
+ plt.plot (x, x.sqrt (), color =QColor (0 , 0 , 0 ));
269
+ plt.plot (x, -x.sqrt (), color = QColor (0 , 0 , 0 ));
270
270
271
271
Eigen::ArrayXf noise = Eigen::ArrayXf::Random (50 ) * 2 ;
272
272
273
- plt.plot (x, x.sqrt () - noise, _marker =QString (" s" ), _markersize = 0 .7f , _color =QColor (19 , 154 , 255 ), _edgecolor =QColor (19 , 154 , 255 )); // red squares without black edges
274
- plt.plot (x, -x.sqrt () - noise, _marker = QString (" s" ), _markersize = 0 .7f , _color =QColor (255 , 41 , 5 ), _edgecolor =QColor (255 , 41 , 5 )); // blue squares without black edges
273
+ plt.plot (x, x.sqrt () - noise, marker =QString (" s" ), markersize = 0 .7f , color =QColor (19 , 154 , 255 ), edgecolor =QColor (19 , 154 , 255 )); // red squares without black edges
274
+ plt.plot (x, -x.sqrt () - noise, marker = QString (" s" ), markersize = 0 .7f , color =QColor (255 , 41 , 5 ), edgecolor =QColor (255 , 41 , 5 )); // blue squares without black edges
275
275
plt.show ();
276
276
277
277
#ifdef SCRSHOT
@@ -345,7 +345,7 @@ void test10()
345
345
// On Qt 7.5, Qt Charts has a bug spacing correctly categories on negative X axis (-3.1, 3.1).
346
346
// For now, make sure you are using only positive X values to bypass that problem.
347
347
plt.plot (X, C);
348
- plt.plot (X, S, _marker =QString (" --" ));
348
+ plt.plot (X, S, marker =QString (" --" ));
349
349
plt.xlim (0 , 2 *pi);
350
350
plt.xticks (x_ticks, x_labels);
351
351
plt.show ();
0 commit comments