Commit 5bc75721 authored by hrchilds's avatar hrchilds

Previously added support for making labels be more accurate if they were in the wrong place.

That fix didn't take into account scaling.  Fixed now.

git-svn-id: 18c085ea-50e0-402c-830e-de6fd14e8384
parent db0ceca2
......@@ -754,6 +754,8 @@ void vtkVisItAxisActor2D::BuildAxis(vtkViewport *viewport)
SNPRINTF(string,64,format, val*this->MajorTickLabelScale);
double v = atof(string);
if (this->MajorTickLabelScale != 0.0)
v /= this->MajorTickLabelScale;
double error = fabs(val-v) / (Range[1]-Range[0]);
if (fabs(error) < 0.01) // < less than 1%
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment