当前位置:网站首页>Qtcharts notes (V) scatter diagram qscatterseries
Qtcharts notes (V) scatter diagram qscatterseries
2022-07-03 23:59:00 【I'm classmate Huang】
One .QScatterSeries Introduce
Original document
1.The QScatterSeries class presents data in scatter charts
The translation means :QScatterSeries Classes represent data in the form of scatter diagrams
2.The scatter data is displayed as a collection of points on the chart. For each point, two values are specified that determine its position on the horizontal axis and the vertical axis
The translation means : Scatter data is displayed on the chart as a collection of points , For each point , There are two definite values to determine its position in x Axis and y Position on the shaft
Two . Use examples
1. Set display container , Drag one widget, And promote it to QChartView
2. Core code
Points of attention : You must use a namespace :QT_CHARTS_USE_NAMESPACE
void Widget::createScatterChart()
{
// Set title
ui->widge_ScatterChart->chart()->setTitle(" Scatter plot ");
// Set anti aliasing
ui->widge_ScatterChart->setRenderHint(QPainter::Antialiasing);
// Set theme style
ui->widge_ScatterChart->chart()->setTheme(QChart::ChartThemeQt);
// Set up chart Properties of
QScatterSeries *scatterSeries1=new QScatterSeries();
scatterSeries1->setName(" Icon text ");
// Set the label display attribute of scatter
scatterSeries1->setPointLabelsVisible();
scatterSeries1->setPointLabelsFormat("(@xPoint,@yPoint)");
scatterSeries1->setPointLabelsClipping(false);
scatterSeries1->setPointLabelsColor(Qt::blue);
// Set three-point attribute
scatterSeries1->setMarkerShape(QScatterSeries::MarkerShape::MarkerShapeCircle);
scatterSeries1->setMarkerSize(15);
// Add data
scatterSeries1->append(8,6);
scatterSeries1->append(1,10);
scatterSeries1->append(4,12);
scatterSeries1->append(6,5);
// Display on the screen
ui->widge_ScatterChart->chart()->addSeries(scatterSeries1);
ui->widge_ScatterChart->chart()->createDefaultAxes();
}
3. effect 
边栏推荐
- Gossip about redis source code 79
- How to make recv have a little temper?
- Private project practice sharing populate joint query in mongoose makes the template unable to render - solve the error message: syntaxerror: unexpected token r in JSON at
- [Happy Valentine's day] "I still like you very much, like sin ² a+cos ² A consistent "(white code in the attached table)
- 2022 t elevator repair registration examination and the latest analysis of T elevator repair
- 2022 chemical automation control instrument examination content and chemical automation control instrument simulation examination
- How to write a good title of 10w+?
- Unity elementary case notes of angry birds Siki college 1-6
- 【leetcode】374. Guess the size of the number
- How will the complete NFT platform work in 2022? How about its core functions and online time?
猜你喜欢

How to solve the "safe startup function prevents the operating system from starting" prompt when installing windows10 on parallel desktop?
![[2021]NeRF in the Wild: Neural Radiance Fields for Unconstrained Photo Collections](/img/c6/3dc7d01600f6713afdbb4cf3df5238.jpg)
[2021]NeRF in the Wild: Neural Radiance Fields for Unconstrained Photo Collections

2022 system integration project management engineer examination knowledge points: software development model

Idea set class header comments

Recommendation of knowledge base management system

How to understand the gain bandwidth product operational amplifier gain

Smart fan system based on stm32f407

The difference between single power amplifier and dual power amplifier

Detailed explanation of the relationship between Zhongtai, wechat and DDD

Kubedl hostnetwork: accelerating the efficiency of distributed training communication
随机推荐
Selenium library 4.5.0 keyword explanation (III)
Distributed transaction -- middleware of TCC -- selection / comparison
AI Challenger 2018 text mining competition related solutions and code summary
Selenium check box
Private project practice sharing populate joint query in mongoose makes the template unable to render - solve the error message: syntaxerror: unexpected token r in JSON at
IO flow principle and classification
Selenium library 4.5.0 keyword explanation (II)
Sword finger offer day 4 (Sword finger offer 03. duplicate numbers in the array, sword finger offer 53 - I. find the number I in the sorted array, and the missing numbers in sword finger offer 53 - ii
股票開戶傭金最低的券商有哪些大家推薦一下,手機上開戶安全嗎
[source code] VB6 chat robot
NLP Chinese corpus project: large scale Chinese natural language processing corpus
Les sociétés de valeurs mobilières dont la Commission d'ouverture d'un compte d'actions est la plus faible ont ce que tout le monde recommande.
2022 a special equipment related management (elevator) examination questions and a special equipment related management (elevator) examination contents
Gossip about redis source code 82
Interesting 10 CMD commands
Ramble 72 of redis source code
Collation of the most complete Chinese naturallanguageprocessing data sets, platforms and tools
Briefly understand the operation mode of developing NFT platform
Ningde times and BYD have refuted rumors one after another. Why does someone always want to harm domestic brands?
Axure resources and prototype tool Axure RP 9 download