查看完整版本: [-- QCustomPlot缩放后,怎么恢复成原点坐标 --]

QTCN开发网 -> Qt基础编程 -> QCustomPlot缩放后,怎么恢复成原点坐标 [打印本页] 登录 -> 注册 -> 回复主题 -> 发表主题

jinyi7016 2020-06-25 14:04

QCustomPlot缩放后,怎么恢复成原点坐标

QCustomPlot缩放后,x,y轴的坐标原点不是0了,要手动拖动,恢复成0很费时间,有没有哪个函数或是操作,可以恢复成0点呢
初始化完是这样
[attachment=21693]


缩放后,是这样
[attachment=21694]


怎么把原点再恢复成图一的样子,QCustomPlot有没有相应的功能

maxlogo 2020-06-25 16:40
重新设置轴范围就可以了

dxa572862121 2020-07-09 09:33
customplot->xAxis->setRange(0,x);
customplot->yAxis->setRange(0,x);


查看完整版本: [-- QCustomPlot缩放后,怎么恢复成原点坐标 --] [-- top --]



Powered by phpwind v8.7 Code ©2003-2011 phpwind
Gzip disabled