16,235
社区成员
发帖
与我相关
我的任务
分享
QwtPlot* plot = new QwtPlot(this);
//设置坐标轴的名称
plot->setAxisTitle(QwtPlot::xBottom, "x->");
plot->setAxisTitle(QwtPlot::yLeft, "y->");
//设置坐标轴的范围
plot->setAxisScale(QwtPlot::yLeft, 0, 100);
plot->setAxisScale(QwtPlot::xBottom, 0, 100);
//设置右边标注
plot->insertLegend(new QwtLegend(), QwtPlot::RightLegend);
//使用滚轮放大/缩小
(void) new QwtPlotMagnifier( plot->canvas() );
//使用鼠标左键平移
(void) new QwtPlotPanner( plot->canvas() );