@@ -52,6 +52,9 @@ vtkPVPlotMatrixRepresentation::vtkPVPlotMatrixRepresentation()
5252 this ->ActivePlotColor [i] = 0 ;
5353 this ->HistogramColor [i] = 0 ;
5454 }
55+ this ->ScatterPlotColor [3 ] = 255 ;
56+ this ->ActivePlotColor [3 ] = 255 ;
57+ this ->HistogramColor [3 ] = 255 ;
5558
5659 this ->ScatterPlotMarkerStyle = vtkPlotPoints::CIRCLE;
5760 this ->ActivePlotMarkerStyle = vtkPlotPoints::CIRCLE;
@@ -78,19 +81,20 @@ bool vtkPVPlotMatrixRepresentation::AddToView(vtkView *view)
7881 plotMatrix->SetVisible (true );
7982
8083 // 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 );
9498 }
9599
96100 return true ;
@@ -161,48 +165,48 @@ void vtkPVPlotMatrixRepresentation::SetSeriesLabel(const char *name, const char
161165// ----------------------------------------------------------------------------
162166void vtkPVPlotMatrixRepresentation::SetColor (double r, double g, double b)
163167{
168+ this ->ScatterPlotColor = vtkColor4ub (static_cast <unsigned char >(r * 255 ),
169+ static_cast <unsigned char >(g * 255 ),
170+ static_cast <unsigned char >(b * 255 ));
164171 if (vtkScatterPlotMatrix *plotMatrix = this ->GetPlotMatrix ())
165172 {
166- plotMatrix->SetColor (r, g, b);
173+ plotMatrix->SetPlotColor (vtkScatterPlotMatrix::SCATTERPLOT,
174+ this ->ScatterPlotColor );
167175 }
168-
169- this ->ScatterPlotColor [0 ] = r;
170- this ->ScatterPlotColor [1 ] = g;
171- this ->ScatterPlotColor [2 ] = b;
172176}
173177
174178// ----------------------------------------------------------------------------
175179void vtkPVPlotMatrixRepresentation::SetActivePlotColor (double r, double g, double b)
176180{
181+ this ->ActivePlotColor = vtkColor4ub (static_cast <unsigned char >(r * 255 ),
182+ static_cast <unsigned char >(g * 255 ),
183+ static_cast <unsigned char >(b * 255 ));
177184 if (vtkScatterPlotMatrix *plotMatrix = this ->GetPlotMatrix ())
178185 {
179- plotMatrix->SetActivePlotColor (r, g, b);
186+ plotMatrix->SetPlotColor (vtkScatterPlotMatrix::ACTIVEPLOT,
187+ this ->ActivePlotColor );
180188 }
181-
182- this ->ActivePlotColor [0 ] = r;
183- this ->ActivePlotColor [1 ] = g;
184- this ->ActivePlotColor [2 ] = b;
185189}
186190
187191// ----------------------------------------------------------------------------
188192void vtkPVPlotMatrixRepresentation::SetHistogramColor (double r, double g, double b)
189193{
194+ this ->HistogramColor = vtkColor4ub (static_cast <unsigned char >(r * 255 ),
195+ static_cast <unsigned char >(g * 255 ),
196+ static_cast <unsigned char >(b * 255 ));
190197 if (vtkScatterPlotMatrix *plotMatrix = this ->GetPlotMatrix ())
191198 {
192- plotMatrix->SetHistogramColor (r, g, b);
199+ plotMatrix->SetPlotColor (vtkScatterPlotMatrix::HISTOGRAM,
200+ this ->HistogramColor );
193201 }
194-
195- this ->HistogramColor [0 ] = r;
196- this ->HistogramColor [1 ] = g;
197- this ->HistogramColor [2 ] = b;
198202}
199203
200204// ----------------------------------------------------------------------------
201205void vtkPVPlotMatrixRepresentation::SetMarkerStyle (int style)
202206{
203207 if (vtkScatterPlotMatrix *plotMatrix = this ->GetPlotMatrix ())
204208 {
205- plotMatrix->SetMarkerStyle ( style);
209+ plotMatrix->SetPlotMarkerStyle (vtkScatterPlotMatrix::SCATTERPLOT, style);
206210 }
207211
208212 this ->ScatterPlotMarkerStyle = style;
@@ -213,7 +217,7 @@ void vtkPVPlotMatrixRepresentation::SetActivePlotMarkerStyle(int style)
213217{
214218 if (vtkScatterPlotMatrix *plotMatrix = this ->GetPlotMatrix ())
215219 {
216- plotMatrix->SetActivePlotMarkerStyle ( style);
220+ plotMatrix->SetPlotMarkerStyle (vtkScatterPlotMatrix::ACTIVEPLOT, style);
217221 }
218222
219223 this ->ActivePlotMarkerStyle = style;
@@ -224,7 +228,7 @@ void vtkPVPlotMatrixRepresentation::SetMarkerSize(double size)
224228{
225229 if (vtkScatterPlotMatrix *plotMatrix = this ->GetPlotMatrix ())
226230 {
227- plotMatrix->SetMarkerSize ( size);
231+ plotMatrix->SetPlotMarkerSize (vtkScatterPlotMatrix::SCATTERPLOT, size);
228232 }
229233
230234 this ->ScatterPlotMarkerSize = size;
@@ -235,7 +239,7 @@ void vtkPVPlotMatrixRepresentation::SetActivePlotMarkerSize(double size)
235239{
236240 if (vtkScatterPlotMatrix *plotMatrix = this ->GetPlotMatrix ())
237241 {
238- plotMatrix->SetActivePlotMarkerSize ( size);
242+ plotMatrix->SetPlotMarkerSize (vtkScatterPlotMatrix::ACTIVEPLOT, size);
239243 }
240244
241245 this ->ActivePlotMarkerSize = size;
0 commit comments