QT之qwtpolar极坐标刻度旋转

时间:2024-04-04 21:32:10

 1.示例如图:

QT之qwtpolar极坐标刻度旋转

2.任务描述

(1)刻度逆时针旋转90°;

(2)刻度以y轴反转。

3.代码如下:

//逆时针旋转90度并反转刻度
const double interval = 90.0;//设置旋转度数
double origin = plot->azimuthOrigin()/M_PI * 180.0;
origin = qRound(origin/interval)*interval+interval;
plot->setAzimuthOrigin(origin/180.0*M_PI);
plot->setScale(QwtPolar::Azimuth,359.999,-0.001,360/8.0);