--> d_data->canvasRect.setRect(39,50,1097,560);yLeft[0] x=0.000000 y=50.000000 w=39.000000 h=560.000000yBottom[20] x=39.000000 y=610.000000 w=1097.000000 h=27.000000Left 0 ValidLeft 1 INValidLeft 2 INValidLeft 3 INValidLeft 4 INValidLeft 5 INValidLeft 6 INValidLeft 7 INValidLeft 8 INValidLeft 9 INValid
curv2 = new QwtPlotCurve(QString("U2(t)"));curv2->attach(myPlot);
ошибка: 'class QwtPlot' has no member named 'setAxes'
QwtPlotItem::setAxes
int xb = QwtPlot::xBottom;int yl = QwtPlot::yLeft;curv1->setAxes(xb,yl);ui->myPlot->enableAxis(yl);int xb2 = QwtPlot::xBottom;int yl2 = QwtPlot::yLeft;curv2->setAxes(xb2,yl2);ui->myPlot->enableAxis(yl2);
Index: qwt_plot.h===================================================================--- qwt_plot.h (revision 1014)+++ qwt_plot.h (working copy)@@ -74,25 +74,19 @@ READ grabProperties WRITE applyProperties ) public:- //! \brief Axis index- enum Axis- {- //! Y axis left of the canvas- yLeft, - //! Y axis right of the canvas- yRight,+ static const int axisCntBySide = 10;+ static const int yLeft = 0;+ static const int yLeftMax = yLeft + axisCntBySide - 1;+ static const int yRight = yLeftMax + 1;+ static const int yRightMax = yRight + axisCntBySide - 1;+ static const int xBottom = yRightMax + 1;+ static const int xBottomMax = xBottom + axisCntBySide - 1;+ static const int xTop = xBottomMax + 1;+ static const int xTopMax = xTop + axisCntBySide - 1;+ static const int axisCnt = xTopMax + 1; - //! X axis below the canvas- xBottom, - //! X axis above the canvas- xTop,-- //! Number of axes- axisCnt- };- /*! Position of the legend, relative to the canvas.
curv1 = new QwtPlotCurve("Amplitude"); curv1->setRenderHint(QwtPlotItem::RenderAntialiased); curv1->setPen(QPen(Qt::red)); int xb = QwtPlot::xBottom; int yl = QwtPlot::yLeft; curv1->setAxes(xb,yl); myPlot->enableAxis(yl); curv1->attach(myPlot);/////// curv2 = new QwtPlotCurve("Amplitude"); curv2->setRenderHint(QwtPlotItem::RenderAntialiased); curv2->setPen(QPen(Qt::green)); int xb2 = QwtPlot::xBottom; int yl2 = QwtPlot::yLeft+1; curv2->setAxes(xb2,yl2); myPlot->enableAxis(yl2); curv2->attach(myPlot);
d_zoomer[0] = new Zoomer( xb, yl, myPlot->canvas()); d_zoomer[0]->setRubberBand(QwtPicker::RectRubberBand); d_zoomer[0]->setRubberBandPen(QColor(Qt::green)); d_zoomer[0]->setTrackerMode(QwtPicker::ActiveOnly); d_zoomer[0]->setTrackerPen(QColor(Qt::white)); d_zoomer[1] = new Zoomer(QwtPlot::xTop, QwtPlot::yRight, myPlot->canvas()); d_zoomer1[0] = new Zoomer( xb2, yl2, myPlot->canvas()); d_zoomer1[0]->setRubberBand(QwtPicker::RectRubberBand); d_zoomer1[0]->setRubberBandPen(QColor(Qt::green)); d_zoomer1[0]->setTrackerMode(QwtPicker::ActiveOnly); d_zoomer1[0]->setTrackerPen(QColor(Qt::white)); d_zoomer1[1] = new Zoomer(QwtPlot::xTop, QwtPlot::yRight, myPlot->canvas());