Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Christian Butz
VTK
Commits
60c2881e
Commit
60c2881e
authored
May 03, 2011
by
Marcus D. Hanwell
Browse files
ENH: Added a toy example of an indexed label array.
Change-Id: Iec4e915410f4c69394b5570ee4a61a5cca5c77ec
parent
3ecd03f5
Changes
1
Show whitespace changes
Inline
Side-by-side
Charts/Testing/Cxx/TestScatterPlot.cxx
View file @
60c2881e
...
...
@@ -50,6 +50,9 @@ int TestScatterPlot(int , char * [])
vtkNew
<
vtkFloatArray
>
arrT
;
arrT
->
SetName
(
"Tan"
);
table
->
AddColumn
(
arrT
.
GetPointer
());
vtkNew
<
vtkStringArray
>
labels
;
labels
->
SetName
(
"Labels"
);
table
->
AddColumn
(
labels
.
GetPointer
());
// Test charting with a few more points...
int
numPoints
=
40
;
...
...
@@ -61,6 +64,14 @@ int TestScatterPlot(int , char * [])
table
->
SetValue
(
i
,
1
,
cos
(
i
*
inc
)
+
0.0
);
table
->
SetValue
(
i
,
2
,
sin
(
i
*
inc
)
+
0.0
);
table
->
SetValue
(
i
,
3
,
tan
(
i
*
inc
)
+
0.5
);
if
(
i
%
2
)
{
table
->
SetValue
(
i
,
4
,
vtkStdString
(
"Odd"
));
}
else
{
table
->
SetValue
(
i
,
4
,
vtkStdString
(
"Even"
));
}
}
// Add multiple line plots, setting the colors etc
...
...
@@ -78,6 +89,7 @@ int TestScatterPlot(int , char * [])
points
->
SetInput
(
table
.
GetPointer
(),
0
,
3
);
points
->
SetColor
(
0
,
0
,
255
,
255
);
points
->
SetWidth
(
4.0
);
points
->
SetIndexedLabels
(
labels
.
GetPointer
());
//Finally render the scene and compare the image to a reference image
view
->
GetRenderWindow
()
->
SetMultiSamples
(
0
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment