Minor fixes to wxMathPlot
This commit is contained in:
parent
ce59b282d3
commit
5c32e35d27
|
@ -536,6 +536,8 @@ mpFXY::mpFXY(wxString name, int flags)
|
||||||
SetName(name);
|
SetName(name);
|
||||||
m_flags = flags;
|
m_flags = flags;
|
||||||
m_type = mpLAYER_PLOT;
|
m_type = mpLAYER_PLOT;
|
||||||
|
m_scaleX = NULL;
|
||||||
|
m_scaleY = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
void mpFXY::UpdateViewBoundary(wxCoord xnew, wxCoord ynew)
|
void mpFXY::UpdateViewBoundary(wxCoord xnew, wxCoord ynew)
|
||||||
|
@ -764,7 +766,6 @@ void mpScaleX::recalculateTicks ( wxDC & dc, mpWindow & w )
|
||||||
|
|
||||||
double minErr = 1000000000000.0;
|
double minErr = 1000000000000.0;
|
||||||
double bestStep;
|
double bestStep;
|
||||||
int bestCount;
|
|
||||||
for(int i = 10; i <= 20; i+=2)
|
for(int i = 10; i <= 20; i+=2)
|
||||||
{
|
{
|
||||||
double step = fabs(maxVvis - minVvis) / (double) i;
|
double step = fabs(maxVvis - minVvis) / (double) i;
|
||||||
|
@ -779,7 +780,6 @@ void mpScaleX::recalculateTicks ( wxDC & dc, mpWindow & w )
|
||||||
{
|
{
|
||||||
minErr = err;
|
minErr = err;
|
||||||
bestStep = stepInt;
|
bestStep = stepInt;
|
||||||
bestCount = i;
|
|
||||||
}
|
}
|
||||||
//printf("step %d %.3f %.3f best %.3f\n",i, step, stepInt, bestStep);
|
//printf("step %d %.3f %.3f best %.3f\n",i, step, stepInt, bestStep);
|
||||||
}
|
}
|
||||||
|
@ -981,7 +981,6 @@ void mpScaleY::recalculateTicks ( wxDC & dc, mpWindow & w )
|
||||||
|
|
||||||
double minErr = 1000000000000.0;
|
double minErr = 1000000000000.0;
|
||||||
double bestStep;
|
double bestStep;
|
||||||
int bestCount;
|
|
||||||
for(int i = 10; i <= 20; i+=2)
|
for(int i = 10; i <= 20; i+=2)
|
||||||
{
|
{
|
||||||
double step = fabs(maxVvis - minVvis) / (double) i;
|
double step = fabs(maxVvis - minVvis) / (double) i;
|
||||||
|
@ -996,7 +995,6 @@ void mpScaleY::recalculateTicks ( wxDC & dc, mpWindow & w )
|
||||||
{
|
{
|
||||||
minErr = err;
|
minErr = err;
|
||||||
bestStep = stepInt;
|
bestStep = stepInt;
|
||||||
bestCount = i;
|
|
||||||
}
|
}
|
||||||
//printf("step %d %.3f %.3f best %.3f\n",i, step, stepInt, bestStep);
|
//printf("step %d %.3f %.3f best %.3f\n",i, step, stepInt, bestStep);
|
||||||
}
|
}
|
||||||
|
|
|
@ -775,7 +775,7 @@ protected:
|
||||||
int m_flags; //!< Flag for axis alignment
|
int m_flags; //!< Flag for axis alignment
|
||||||
bool m_ticks; //!< Flag to toggle between ticks or grid
|
bool m_ticks; //!< Flag to toggle between ticks or grid
|
||||||
double m_minV, m_maxV;
|
double m_minV, m_maxV;
|
||||||
double m_rangeSet;
|
bool m_rangeSet;
|
||||||
int m_maxLabelHeight;
|
int m_maxLabelHeight;
|
||||||
int m_maxLabelWidth;
|
int m_maxLabelWidth;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue