QCustomplot笔记(二)之QCustomplot 坐标轴属性设置
子曰:学不可以已:
【设置刻度间距离及刻度个数】
控制:刻度步长和刻度个数
关键函数:
setTickStep(int)
setTickCount(int)
QSharedPointer textTicker(new QCPAxisTickerFixed);
textTicker-›setTickStep(16); 刻度步长
textTicker-›setTickCount(8); 刻度个数
qc-›xAxis-›setTicker(textTicker);
设置轴刻度间距及步长的核心片段:
[code=cpp]
QSharedPointerMyTicker(newQCPAxisTickerFixed);
MyTicker-›setTickStep(16);
MyTicker-›setTickCount(8);
qcustomplot-›xAxis-›setTicker(MyTicker);
[/code]
————————————————
原文地址:https://blog.csdn.net/Fountain520/article/details/130346783
|