Skip to content
GitLab
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
cc1686e0
Commit
cc1686e0
authored
Nov 18, 2011
by
Philippe Pébay
Browse files
Prevent conflicts between radial and polar axes title (below 2 degrees)
Change-Id: Ibd43c99073bb26ed2e57ee7b876df52fa64a0332
parent
f03dd651
Changes
2
Hide whitespace changes
Inline
Side-by-side
Examples/Hybrid/Python/CylinderAndPolarAxes.py
View file @
cc1686e0
...
...
@@ -36,7 +36,7 @@ polaxes.SetBounds( cylinder.GetOutput().GetBounds() )
polaxes
.
SetPole
(
pole
)
polaxes
.
SetAutoScaleRadius
(
0
)
polaxes
.
SetMaximumRadius
(
4.5
)
polaxes
.
SetMinimumAngle
(
45
.
)
polaxes
.
SetMinimumAngle
(
.
1
)
polaxes
.
SetMaximumAngle
(
270.
)
polaxes
.
SetNumberOfRadialAxes
(
10
)
polaxes
.
SetNumberOfPolarAxisTicks
(
9
)
...
...
Hybrid/vtkPolarAxesActor.cxx
View file @
cc1686e0
...
...
@@ -524,12 +524,21 @@ void vtkPolarAxesActor::BuildAxes( vtkViewport *viewport )
axis
->
SetAxisLinesProperty
(
this
->
RadialAxesProperty
);
// Set radial axis title with polar angle as title for non-polar axes
axis
->
SetTitleVisibility
(
this
->
RadialTitleVisibility
);
axis
->
GetTitleTextProperty
()
->
SetColor
(
this
->
RadialAxesProperty
->
GetColor
()
);
vtksys_ios
::
ostringstream
title
;
title
<<
alpha
<<
(
this
->
RadialUnits
?
" deg"
:
""
);
axis
->
SetTitle
(
title
.
str
().
c_str
()
);
if
(
this
->
PolarAxisVisibility
&&
fabs
(
alpha
)
<
2.
)
{
// Prevent conflict between radial and polar axes titles
axis
->
SetTitleVisibility
(
false
);
}
else
{
// Use polar angle as a title for the radial axis
axis
->
SetTitleVisibility
(
this
->
RadialTitleVisibility
);
axis
->
GetTitleTextProperty
()
->
SetColor
(
this
->
RadialAxesProperty
->
GetColor
()
);
vtksys_ios
::
ostringstream
title
;
title
<<
alpha
<<
(
this
->
RadialUnits
?
" deg"
:
""
);
axis
->
SetTitle
(
title
.
str
().
c_str
()
);
}
// No labels nor ticks for radial axes
axis
->
SetLabelVisibility
(
0
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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