Hi,
you mean
// Insert markers
// ...a horizontal line at y = 0...
mY
->setLabel
(QString::fromLatin1("y = 0"));
mY->setLabelAlignment(Qt::AlignRight|Qt::AlignTop);
mY->setYValue(0.0);
mY->attach(this);
// Insert markers
// ...a horizontal line at y = 0...
QwtPlotMarker *mY = new QwtPlotMarker();
mY->setLabel(QString::fromLatin1("y = 0"));
mY->setLabelAlignment(Qt::AlignRight|Qt::AlignTop);
mY->setLineStyle(QwtPlotMarker::HLine);
mY->setYValue(0.0);
mY->attach(this);
To copy to clipboard, switch view to plain text mode
wouldn't work for you?
Maybe you cann ad a simple constant function:
y = f(x) like y=1 | x[1,2]
e.g.:
// Insert new curves
#if QT_VERSION >= 0x040000
pConstantFunction
->setRenderHint
(QwtPlotItem::RenderAntialiased);
#endif
pConstantFunction
->setPen
(QPen(Qt
::red));
pConstantFunction->setData(....) //your const f() or an array of f(..)?
pConstantFunction->attach(this);
// Insert new curves
QwtPlotCurve *pConstantFunction = new QwtPlotCurve("y = f(1)");
#if QT_VERSION >= 0x040000
pConstantFunction->setRenderHint(QwtPlotItem::RenderAntialiased);
#endif
pConstantFunction->setPen(QPen(Qt::red));
pConstantFunction->setData(....) //your const f() or an array of f(..)?
pConstantFunction->attach(this);
To copy to clipboard, switch view to plain text mode
or an array of functions?
y = f(x); y=1 | x[1,2]
y = f(x); y=1 | x[3,4]
y = f(x); y=1 | x[7,10]
that will simulate your seperated line?
greetz AP.
Bookmarks