Regression in log scale engine in 6.1.3
Brought to you by:
rathmann
Hi Uwe,
I recently upgraded my application from 6.1.2 to 6.1.3 and noticed a regression in how curves with 0 values are plotted with the logarithmic scale engine, when the plot axis scale is set manually.
Here's the test case:
main.cpp
#include <QApplication>
#include <qwt_plot.h>
#include <qwt_plot_curve.h>
#include <qwt_scale_engine.h>
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
QwtPlot plot;
QwtPlotCurve curve("Test Curve");
curve.setSamples({ 0, 0, 0.01, 0.02, 0.01, 0.02, 0, 0 }, { 0, 1, 2, 3, 4, 5, 6, 7 });
curve.attach(&plot);
plot.setAxisScaleEngine(QwtPlot::xBottom, new QwtLogScaleEngine());
plot.setAxisScale(QwtPlot::xBottom, 0.00001, 1, 2);
plot.show();
return app.exec();
}
logtest.pro
TEMPLATE = app
CONFIG += c++11
TARGET = logtest
INCLUDEPATH += .
# Edit to point at your Qwt
#include(qwt-6.1.2-svn/features/qwt.prf)
include(qwt-6.1.3-svn/features/qwt.prf)
#include(qwt-6.3.0-svn/features/qwt.prf)
SOURCES += main.cpp
And here's the result with 6.1.2 and 6.1.3:
Result with 6.1.2

Result with 6.1.3

Notice the strange result with 6.1.3. I get this result with trunk as well.
I think this may be related to r2446, but I'm not sure.
Anonymous
View and moderate all "bugs Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Bugs"
it is not a bug, log(0) is not defined
View and moderate all "bugs Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Bugs"
Right, it's just that we found Qwt's behavior in earlier versions in dealing with log(0) during plotting was convenient for our purposes. But I realize now we shouldn't rely on this. Will close the bug.
Sorry forgot to log in while posting my reply. It's in moderation now.