QCustomPlot

Qt之qcustomplot绘图总结

匿名 (未验证) 提交于 2019-12-03 00:19:01
1、绘图类: QCPGraph : QCPCurve: 用于曲线图,可以有循环 QCPBars:柱形图,如果有多个 QCPBars ,可以依次重叠 QCPStatisticalBox(需实例化): QCPColorMap(实例化): QCPFinancial(实例化): 2、绘图的基本函数: QCustomPlot有四个QCPAxis成员变量,四个坐标轴:xAxis(下)yAxis(左)xAxis2(上)yAxis2(右) setBasePen:设置基础画笔 setTickPen:设置刻度画笔 setTickLength:设置刻度长度 setSubTickLength: setSubTickPen: setTickLabelFont:设置刻度label字体 setTickLabelPadding:设置标签间距 setLabelPadding:设置标签 setRangeReversed: setLineStyle((QCPGraph::LineStyle)i);//设置线性 setScatterStyle(QCPScatterStyle(QCPScatterStyle::ssCircle, 5));//设置每个节点数据绘制风格,默认是空,这里设置为空心圆 rescaleAxes(true);//坐标轴自适应 setTicks(true);//y轴显示刻度 setTickLabels

无人驾驶软件开发工具

匿名 (未验证) 提交于 2019-12-03 00:17:01
1.系统:ubuntu 14.04 2.IDE:VSCode,Qt 3.可视化库: OpenCV 。封装了大量的可应用于无人驾驶研究的函数,包括各种滤波器算法、特征点提取、矩阵运算、投影坐标转换、机器学习算法等。(Learning OpenCV3) libQGLViewer。OpenGL 适配 qt 的一个库。官网及压缩包内的 example。 Boost 库。相关的(电子或纸质)书,把目录读一遍。 QCustomplot。对照着 example 中的例程写代码,可以快速把自己的数据变成可视化图像。 4.通信机制:Ros,LCM 5.Git & Github。廖雪峰的 Git 教程,浅显易懂,而且还配合图文+视频,简直良心。 参考:https://mp.weixin.qq.com/s/cvnQaS6lsSGljt1IiUU7tA 来源:博客园 作者: 寒江小筑 链接:https://www.cnblogs.com/yrm1160029237/p/11796817.html

QCustomPlot 基础

跟風遠走 提交于 2019-12-01 12:34:35
QCutomPlot简介 官网网址及介绍 https://www.qcustomplot.com/ QCustomPlot is a Qt C++ widget for plotting and data visualization. It has no further dependencies and is well documented. This plotting library focuses on making good looking, publication quality 2D plots, graphs and charts, as well as offering high performance for realtime visualization applications. Have a look at the Setting Up and the Basic Plotting tutorials to get started. QCustomPlot can export to various formats such as vectorized PDF files and rasterized images like PNG, JPG and BMP. QCustomPlot is the solution for displaying of

Qt之自绘制饼图和绘图插件比较

拜拜、爱过 提交于 2019-11-30 19:36:33
最近在搞绘图方面的工作,说实话C++的第三方绘图库并不算多,总之我了解的有:qtcharts、ChartDirector、qwt、kdchart和QCustomPlot。这几个库各有利弊。 qtcharts:qt5.7之后才开源的模块,支持绘制各种图标,并且功能相当丰富,但是可扩展性差,如果自己想高度定制,比较困难,主要是和qt的源码风格有决定性的关系。 ChartDirector:开源的第三方绘图库,使用方便,推荐使用 qwt:主要绘制仪表盘类似的东西(这个库可以编译后加入qt帮助文档) kdchart:不仅可以绘制图表,而且可以绘制甘特图,功能也都挺好使,我个人之前在qt4.7的时候使用过 QCustomPlot:简答的绘图库,因为只有两个文件,如果想高度定制我个人推荐这个靠谱,毕竟理解起来容易些 来源: https://my.oschina.net/276172622/blog/3114492

Qt之自绘制饼图和绘图插件比较

扶醉桌前 提交于 2019-11-29 14:54:57
最近在搞绘图方面的工作,说实话C++的第三方绘图库并不算多,总之我了解的有:qtcharts、ChartDirector、qwt、kdchart和QCustomPlot。这几个库各有利弊。 qtcharts:qt5.7之后才开源的模块,支持绘制各种图标,并且功能相当丰富,但是可扩展性差,如果自己想高度定制,比较困难,主要是和qt的源码风格有决定性的关系。 ChartDirector:开源的第三方绘图库,使用方便,推荐使用 qwt:主要绘制仪表盘类似的东西(这个库可以编译后加入qt帮助文档) kdchart:不仅可以绘制图表,而且可以绘制甘特图,功能也都挺好使,我个人之前在qt4.7的时候使用过 QCustomPlot:简答的绘图库,因为只有两个文件,如果想高度定制我个人推荐这个靠谱,毕竟理解起来容易些 来源: oschina 链接: https://my.oschina.net/u/2358083/blog/3114492

Qt编写数据可视化大屏界面电子看板9-曲线效果

谁都会走 提交于 2019-11-28 15:11:13
一、前言 为了编写数据可视化大屏界面电子看板系统,为了能够兼容Qt4和嵌入式linux系统,尤其是那种主频很低的,但是老板又需要在这种硬件上(比如树莓派、香橙派、全志H3、imx6)展示这么华丽的界面时,就必须用最传统的painter方法来实现所有的控件了,一开始使用的QChart来实现各个子控件,在使用过程中发现比较鸡肋,个人感觉QChart是所有的子模块中源码写的最烂的,本人把QChart的源码看了一遍,比如饼图控件,居然放置一个label用来显示对应的文字描述,都懒得用painter去绘制,而且还有大量的类型转换,这个就效率大大降低了,虽然效果上挺好的,比如继承自QAnimation类自定义的chart动画类,还有个整体换肤的,但是在大量数据展示的时候,卡的一逼,比QWT和QCustomPlot差很远,本人看过QCustomPlot的源码,尽管就一个文件,(其实作者那边肯定是多个文件的,只不过发布的时候合并成一个文件发布的,毕竟这样对于用户来说使用还是很方便的,就是阅读不方便,毕竟大部分人用来是直接使用的而不是研究代码的。)但是里边的代码质量非常好非常高,本人特别推崇用QCustomPlot来展示曲线和柱状图等,效率很高,本人亲自试过最大展示50W数据点,还可以。据朋友所说,可能QWT质量还要更高,我没有研究过QWT的源码,不予置评,估计有可能是的。

Display the plot values on mouse over. - Detect Scatter points

别来无恙 提交于 2019-11-28 11:12:31
I am attempting to display the plot values of different points on my QCustomPlot in which I have a Line style of lsLine . I know i could set a mouse over signal on the QCustomPlot but that wont really help since I just need to be informed when the mouse is over my plotted line.My question is is there any way to find out if the mouse is over my scatter point. Is there a signal i could connect to that would tell me when the mouse is over a scatter point ? Reimplement QCustomPlot::mouseMoveEvent or connect to QCustomPlot::mouseMove . Then use axes' coordToPixel to translate (cursor) pixel coords

What are the advantages/disadvantages of QCustomPlot, compared to Qwt?

别来无恙 提交于 2019-11-28 05:58:48
I am using Qwt now for two years. I like its object oriented classes, which makes it very easy to adapt the plots and functionality. These days QCustomPlot is becoming more and more popular and competes with Qwt. Of course I did compare the APIs. However I am interested in the testimonies of experienced users from both libraries. What is convenient? What not? Are there any pitfalls? I wouldn't call myself "experienced", as I used Qwt only for a few months, and QCustomPlot for a few weeks. That being said, my impressions are: QCustomPlot seems to be more actively developed at present. Last

QT QcustomPlot的使用(二)

£可爱£侵袭症+ 提交于 2019-11-27 07:26:16
在QcustomPlot中,给横纵坐标添加箭头的方法 //在末尾添加箭头   customPlot->xAxis->setUpperEnding(QCPLineEnding::esSpikeArrow); customPlot->yAxis->setUpperEnding(QCPLineEnding::esSpikeArrow); 怎么给图画虚线的方法 //设置虚线QPen linesPen(Qt::red,1,Qt::DashLine); line = new QCPItemStraightLine(customPlot); line->setPen(linesPen); line->setClipToAxisRect(true); line->point1->setCoords(0,0); line->point2->setCoords(0,0); //虚线平行于x轴 line->point1->setCoords(customPlot->xAxis->range().lower,0.2); line->point2->setCoords(customPlot->xAxis->range().upper,0.2); 文本框的设置 //创建文本对象QCPItemText *text = new QCPItemText(customPlot);//设置文本坐标解析方式 text-

Display the plot values on mouse over. - Detect Scatter points

本秂侑毒 提交于 2019-11-27 05:59:32
问题 I am attempting to display the plot values of different points on my QCustomPlot in which I have a Line style of lsLine . I know i could set a mouse over signal on the QCustomPlot but that wont really help since I just need to be informed when the mouse is over my plotted line.My question is is there any way to find out if the mouse is over my scatter point. Is there a signal i could connect to that would tell me when the mouse is over a scatter point ? 回答1: Reimplement QCustomPlot: