@@ -52,6 +52,9 @@ vtkPVPlotMatrixRepresentation::vtkPVPlotMatrixRepresentation()
52
52
this ->ActivePlotColor [i] = 0 ;
53
53
this ->HistogramColor [i] = 0 ;
54
54
}
55
+ this ->ScatterPlotColor [3 ] = 255 ;
56
+ this ->ActivePlotColor [3 ] = 255 ;
57
+ this ->HistogramColor [3 ] = 255 ;
55
58
56
59
this ->ScatterPlotMarkerStyle = vtkPlotPoints::CIRCLE;
57
60
this ->ActivePlotMarkerStyle = vtkPlotPoints::CIRCLE;
@@ -78,19 +81,20 @@ bool vtkPVPlotMatrixRepresentation::AddToView(vtkView *view)
78
81
plotMatrix->SetVisible (true );
79
82
80
83
// set chart properties
81
- plotMatrix->SetColor (this ->ScatterPlotColor [0 ],
82
- this ->ScatterPlotColor [1 ],
83
- this ->ScatterPlotColor [2 ]);
84
- plotMatrix->SetHistogramColor (this ->HistogramColor [0 ],
85
- this ->HistogramColor [1 ],
86
- this ->HistogramColor [2 ]);
87
- plotMatrix->SetActivePlotColor (this ->ActivePlotColor [0 ],
88
- this ->ActivePlotColor [1 ],
89
- this ->ActivePlotColor [2 ]);
90
- plotMatrix->SetMarkerStyle (this ->ScatterPlotMarkerStyle );
91
- plotMatrix->SetActivePlotMarkerStyle (this ->ActivePlotMarkerStyle );
92
- plotMatrix->SetMarkerSize (this ->ScatterPlotMarkerSize );
93
- plotMatrix->SetActivePlotMarkerSize (this ->ActivePlotMarkerSize );
84
+ plotMatrix->SetPlotColor (vtkScatterPlotMatrix::SCATTERPLOT,
85
+ this ->ScatterPlotColor );
86
+ plotMatrix->SetPlotColor (vtkScatterPlotMatrix::HISTOGRAM,
87
+ this ->HistogramColor );
88
+ plotMatrix->SetPlotColor (vtkScatterPlotMatrix::ACTIVEPLOT,
89
+ this ->ActivePlotColor );
90
+ plotMatrix->SetPlotMarkerStyle (vtkScatterPlotMatrix::SCATTERPLOT,
91
+ this ->ScatterPlotMarkerStyle );
92
+ plotMatrix->SetPlotMarkerStyle (vtkScatterPlotMatrix::ACTIVEPLOT,
93
+ this ->ActivePlotMarkerStyle );
94
+ plotMatrix->SetPlotMarkerSize (vtkScatterPlotMatrix::SCATTERPLOT,
95
+ this ->ScatterPlotMarkerSize );
96
+ plotMatrix->SetPlotMarkerSize (vtkScatterPlotMatrix::ACTIVEPLOT,
97
+ this ->ActivePlotMarkerSize );
94
98
}
95
99
96
100
return true ;
@@ -161,48 +165,48 @@ void vtkPVPlotMatrixRepresentation::SetSeriesLabel(const char *name, const char
161
165
// ----------------------------------------------------------------------------
162
166
void vtkPVPlotMatrixRepresentation::SetColor (double r, double g, double b)
163
167
{
168
+ this ->ScatterPlotColor = vtkColor4ub (static_cast <unsigned char >(r * 255 ),
169
+ static_cast <unsigned char >(g * 255 ),
170
+ static_cast <unsigned char >(b * 255 ));
164
171
if (vtkScatterPlotMatrix *plotMatrix = this ->GetPlotMatrix ())
165
172
{
166
- plotMatrix->SetColor (r, g, b);
173
+ plotMatrix->SetPlotColor (vtkScatterPlotMatrix::SCATTERPLOT,
174
+ this ->ScatterPlotColor );
167
175
}
168
-
169
- this ->ScatterPlotColor [0 ] = r;
170
- this ->ScatterPlotColor [1 ] = g;
171
- this ->ScatterPlotColor [2 ] = b;
172
176
}
173
177
174
178
// ----------------------------------------------------------------------------
175
179
void vtkPVPlotMatrixRepresentation::SetActivePlotColor (double r, double g, double b)
176
180
{
181
+ this ->ActivePlotColor = vtkColor4ub (static_cast <unsigned char >(r * 255 ),
182
+ static_cast <unsigned char >(g * 255 ),
183
+ static_cast <unsigned char >(b * 255 ));
177
184
if (vtkScatterPlotMatrix *plotMatrix = this ->GetPlotMatrix ())
178
185
{
179
- plotMatrix->SetActivePlotColor (r, g, b);
186
+ plotMatrix->SetPlotColor (vtkScatterPlotMatrix::ACTIVEPLOT,
187
+ this ->ActivePlotColor );
180
188
}
181
-
182
- this ->ActivePlotColor [0 ] = r;
183
- this ->ActivePlotColor [1 ] = g;
184
- this ->ActivePlotColor [2 ] = b;
185
189
}
186
190
187
191
// ----------------------------------------------------------------------------
188
192
void vtkPVPlotMatrixRepresentation::SetHistogramColor (double r, double g, double b)
189
193
{
194
+ this ->HistogramColor = vtkColor4ub (static_cast <unsigned char >(r * 255 ),
195
+ static_cast <unsigned char >(g * 255 ),
196
+ static_cast <unsigned char >(b * 255 ));
190
197
if (vtkScatterPlotMatrix *plotMatrix = this ->GetPlotMatrix ())
191
198
{
192
- plotMatrix->SetHistogramColor (r, g, b);
199
+ plotMatrix->SetPlotColor (vtkScatterPlotMatrix::HISTOGRAM,
200
+ this ->HistogramColor );
193
201
}
194
-
195
- this ->HistogramColor [0 ] = r;
196
- this ->HistogramColor [1 ] = g;
197
- this ->HistogramColor [2 ] = b;
198
202
}
199
203
200
204
// ----------------------------------------------------------------------------
201
205
void vtkPVPlotMatrixRepresentation::SetMarkerStyle (int style)
202
206
{
203
207
if (vtkScatterPlotMatrix *plotMatrix = this ->GetPlotMatrix ())
204
208
{
205
- plotMatrix->SetMarkerStyle ( style);
209
+ plotMatrix->SetPlotMarkerStyle (vtkScatterPlotMatrix::SCATTERPLOT, style);
206
210
}
207
211
208
212
this ->ScatterPlotMarkerStyle = style;
@@ -213,7 +217,7 @@ void vtkPVPlotMatrixRepresentation::SetActivePlotMarkerStyle(int style)
213
217
{
214
218
if (vtkScatterPlotMatrix *plotMatrix = this ->GetPlotMatrix ())
215
219
{
216
- plotMatrix->SetActivePlotMarkerStyle ( style);
220
+ plotMatrix->SetPlotMarkerStyle (vtkScatterPlotMatrix::ACTIVEPLOT, style);
217
221
}
218
222
219
223
this ->ActivePlotMarkerStyle = style;
@@ -224,7 +228,7 @@ void vtkPVPlotMatrixRepresentation::SetMarkerSize(double size)
224
228
{
225
229
if (vtkScatterPlotMatrix *plotMatrix = this ->GetPlotMatrix ())
226
230
{
227
- plotMatrix->SetMarkerSize ( size);
231
+ plotMatrix->SetPlotMarkerSize (vtkScatterPlotMatrix::SCATTERPLOT, size);
228
232
}
229
233
230
234
this ->ScatterPlotMarkerSize = size;
@@ -235,7 +239,7 @@ void vtkPVPlotMatrixRepresentation::SetActivePlotMarkerSize(double size)
235
239
{
236
240
if (vtkScatterPlotMatrix *plotMatrix = this ->GetPlotMatrix ())
237
241
{
238
- plotMatrix->SetActivePlotMarkerSize ( size);
242
+ plotMatrix->SetPlotMarkerSize (vtkScatterPlotMatrix::ACTIVEPLOT, size);
239
243
}
240
244
241
245
this ->ActivePlotMarkerSize = size;
0 commit comments