One 、QCustomPlot brief introduction

Before that Qt Draw a pie chart In the description of this article, I briefly describe the current dependence on qt Third party drawing library of , After that, I'll use it for myself QCustomPlot Make a summary of the situation of , For your reference

QCustomPlot The official website of :Qt Plotting Widget QCustomPlot - Introduction

QCustomPlot The source code is only 2 File , So it's very convenient to add your own engineers , Or you can compile these two files into a static library 、 Any form of dynamic library will do .

Two 、 Results the preview

Pictured 1 It's a small example I made by integrating the official sample code , It shows QCustomPlot Pictures that can be drawn , The only drawback is QCustomPlot You can't draw a pie chart , That's what we said at the beginning of the article Qt Draw a pie chart article , In this article I use Qt Born in the Central Plains QWidget To draw a pie chart of variable size , If you are interested, you can have a look .

chart 1 QCustomPlot Use

How does it feel to see the effect above , Isn't it good , It can meet the needs of most people , But if you make products with strict requirements , So you probably need to be in QCustomPlot Source code for secondary development , Even change the source code ...

3、 ... and 、 Source download

Pictured 2 Shown , It's a download QCustomPlot Source mode , The file in the red box contains the source code 、 Examples and help documentation ; The file in the yellow box has only the source code ; I know the name of the saved document , It's just a dynamic library , Then we will download it according to our own needs , Even if you download it, it's OK . Here I choose to download the first , Contains help documentation 、 Sample code and source code .

chart 2 QCustomPlot download

Careful students will find the picture 2 There are two versions of QCustomPlot package , Why are there two bags , In fact, it's like this ,1.3.2 Version is a release package , That is to say, the official thinks this is a relatively stable version , and 2.0.0-beta Version is a test version , In other words, the official open source is just for everyone to help test , And give back the results .

The above comparison is only from the source code release way comparison , If you look at the source code, you will find , It's not just that ,2.0.0-beta Version and 1.3.2release There's still a big difference between versions , I've personally studied it for a few days QCustomPlot Source code , I think the biggest difference should be 3 spot , That is to say 2.0.0 Version than 1.3.2 The advantages of the version : Real layered rendering 、 Separation of icon data and calculation of coordinate axis scale , I'd like to mention it by the way ,QCustomPlot Where the packaging is not good , Or something to be improved , That's not right , Welcome to correct , For the coordinate axis and whether the coordinate axis text is drawn, the judgment condition is only to judge the type of brush , For the judgment of whether the scale is drawn or not, the only condition is that the scale number of the axis scale is zero , depressed ...

In the future, I will divide it into function points , Or specific class modules to analyze QCustomPlot This library , Okay , This article QCustomPlot This is the end of the opening article of , Interested partners can continue to pay attention to ...

notes : The following articles are all based on QCustomPlot2.2.0beta Version based analysis

Four 、 Related articles

Qt Draw a pie chart

QCustomplot Use sharing ( One ) More about what you can do

  1. QCustomplot Use sharing ( 7、 ... and ) layer ( The end )

    One . Layered drawing It's been said that 2.0.0 edition , But always trying to 1.3.2 Compare the versions , This article is no exception .QCustomPlot2.0.0beta Version than 1.3.2release There is a big improvement in the version, which is layered drawing ...

  2. QCustomplot Use sharing ( 6、 ... and ) Axes and gridlines

    One . summary It has been written in the front 5 Right QCustomPlot Explanation , After reading the above articles , Basically can do some simple use , But if you want to have a high degree of control chart , So the axis will be an important part , Because the axis is a frame of reference for the diagram ...

  3. QCustomplot Use sharing ( 5、 ... and ) Layout

    One . Historical contrast About QCPLayoutElement Before I explain this element , I want to start with 1.3.2release Version and 2.0.0beta Version of this element to do with a simple comparison , First ,1.3.2release version , mouse ...

  4. QCustomplot Use sharing ( Two ) Source code interpretation

    One . Header file Overview Start with this article , We will officially enter into QCustomPlot In the practical study of , First of all, let's learn QCustomPlot The class diagram , If you download QCustomPlot Students of source code can go by themselves QCusto ...

  5. QCustomplot Use sharing ( 3、 ... and ) chart

    One . The diagram that can be realized Compared to other third-party libraries for charting ,QCustomPlot It's lighter , It's not just about function , And the second development is easier . Now let's talk about how he can implement those graphs QCPGraph: Broken line diagram ,Line ...

  6. QCustomplot Use sharing ( Four ) QCPAbstractItem

    One . What is it? Speaking of pictures , You may think of a line chart . Bar charts, pie charts, etc , But in addition to these conspicuous things, there are many auxiliary things , With these auxiliary things, the map will look meaningful , Or more real . Persuasive . These things include that ...

  7. QCustomplot Use sharing ( 8、 ... and ) Charting - load cvs file

    Catalog One . summary Two . design sketch 3、 ... and . Source code explanation 1. Source structure 2. The header file 3. Move cursor 4. Set the number of axis rectangles 5. Add chart data 6. Set line chart type 6. Other functions Four . Test method 1. Test Engineering 2. The test file ...

  8. QCustomplot Use sharing ( Nine ) Charting - Multi function cursor

    Catalog One . summary Two . design sketch 3、 ... and . Source code explanation 1. Source structure 2. The header file 3. Add cursor 4. Monitor movement 5. Move cursor 6. Other functions Four . Test method 1. Test Engineering 2. The test file 3. Test code 5、 ... and . Related articles 6、 ... and . total ...

  9. Share a self made SpringMVC Of PPT

    Share a self made SpringMVC Of PPT, Because I was busy, I only wrote some important parts

Random recommendation

  1. Uva 242 Stamps and envelopes

    Topic link :https://vjudge.net/contest/146179#problem/D The question : On the envelope at most S A stamp . Yes N A collection of stamps , Each set has a different face value . Which set has the largest continuous postage , Output ...

  2. linux Dynamic library loading RPATH, RUNPATH

    Excerpt from http://gotowqj.iteye.com/blog/1926771 linux Dynamic library loading RPATH, RUNPATH Link dynamic library How to use the shared library when the program connects , You have to be able to find a total of ...

  3. centos Next python Of pymssql Module installation and simple use

    1. install pymssq modular 1-1. Environmental preparation : 1-1-1.unixODBC install yum install unixODBC unixODBC-devel -y 1-1-2.freetds install download fr ...

  4. On discuz

    test : vim /etc/hosts       ##ip address translation modify windows Configuration file for , The tablet opens vim /usr/local/apache/conf/httpd.conf vim /u ...

  5. java There are many ways to realize asynchronous query to synchronous query : Loop waiting for ,CountDownLatch,Spring EventListener, Timeout processing and empty loop performance optimization

    Asynchronous to synchronous Business needs Some interface query feedback results are returned asynchronously , Unable to get query results immediately . Normal processing logic Trigger asynchronous operations , And then pass a unique ID . Wait until the asynchronous result returns , Based on the unique ID passed in , Match this result . How to convert to synchronization ...

  6. ThinkPHP3.1 Quick start tutorial

    ThinkPHP3.1 Quick start tutorial http://www.thinkphp.cn/info/155.html   ------------------------------------------- ...

  7. after Hadoop Thinking about big data technology in the era : Data as a service

    1. Hadoop The myth of the world is breaking IBM leads BigInsights for Hadoop out behind barn. Shots heard IBM has announced th ...

  8. python Module of py_compile usage ( take py The file is converted to pyc file )

    # -*- coding: cp936 -*- #python 27 #xiaodeng #python Module of py_compile usage ( take py The file is converted to pyc file ): Binary , By py The file is compiled ...

  9. Oracle Add primary keys and indexes

    The primary key and index of data are generally required , Especially when the table has a lot of data , Indexes and primary keys are essential , This can provide data query efficiency : One . Create a primary key constraint while creating a table (1) No name create table studen ...

  10. 【CF1009F】 Dominant Indices ( A long chain splits +DP)

    Topic link \(O(n^2)\) Of \(DP\) It's easy to think ,\(f[u][i]\) It means that \(u\) The distance in the subtree of \(u\) by \(i\) The number of points , be \(f[u][i]=\sum f[v][i-1]\) Long chain dissection ...