首页| 论坛| 消息

标题:QCustomPlot画图yAxis2的问题
作者:godmatrix
日期:2017-03-08 11:40
内容:

打算用QCustomPlot画两个y轴,
但是yAxis2上不显示刻度。
请教一下怎么才能显示刻度?
已经这么写了
setVisible(true)
setTickLabelType(QCPAxis::ltNumber);
setNumberFormat("g");
setRange(-1000, 1000);
希望高手指点。


#1 [renwinping 03-14 09:59]
同问
#2 回 renwinping 的帖子 [renwinping 03-14 11:31]
renwinping:同问 (2017-03-14 09:59) 
发现 //customPlot->axisRect()->setupFullAxesBox();
这个打开时会影响到右侧的y轴的刻度lable显示!
#3 [wen问鼎 01-16 10:42]
customPlot->xAxis2->setVisible(true);
customPlot->yAxis2->setVisible(true);
customPlot->xAxis2->setTickLabels(false);
customPlot->yAxis2->setTickLabels(false);
customPlot->xAxis2->setTicks(false);
customPlot->yAxis2->setTicks(false);
相关命令,自己设置的看看,符合要求不
#4 [kesiiy 09-06 13:13]
replot()用上边这个函数就没有问题了,坐标可以正常的显示出来,我给上个图看一下效果

回复 发表
主题 版块