当前位置:网站首页>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 
边栏推荐
- Ningde times and BYD have refuted rumors one after another. Why does someone always want to harm domestic brands?
- leetcode-43. String multiplication
- Apple released a supplementary update to MacOS Catalina 10.15.5, which mainly fixes security vulnerabilities
- Social network analysis -social network analysis
- 【leetcode】374. Guess the size of the number
- 股票开户佣金最低的券商有哪些大家推荐一下,手机上开户安全吗
- Gossip about redis source code 78
- 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
- URL (data:image/png; Base64, ivborw0k... Use case
- Zipper table in data warehouse (compressed storage)
猜你喜欢

Ningde times and BYD have refuted rumors one after another. Why does someone always want to harm domestic brands?

Unity elementary case notes of angry birds Siki college 1-6

URL (data:image/png; Base64, ivborw0k... Use case
![[MySQL] classification of multi table queries](/img/96/2e51ae8d52ea8184945e0540ce18f5.jpg)
[MySQL] classification of multi table queries

Ningde times and BYD have refuted rumors one after another. Why does someone always want to harm domestic brands?

Analysis on the scale of China's smart health industry and prediction report on the investment trend of the 14th five year plan 2022-2028 Edition

Tencent interview: can you pour water?

Tencent interview: can you find the number of 1 in binary?

The difference between single power amplifier and dual power amplifier

I wrote a chat software with timeout connect function
随机推荐
The interviewer's biggest lie to deceive you, bypassing three years of less struggle
What are the securities companies with the lowest Commission for stock account opening? Would you recommend it? Is it safe to open an account on your mobile phone
Advanced C language - pointer 2 - knowledge points sorting
D26: the nearest number (translation + solution)
股票開戶傭金最低的券商有哪些大家推薦一下,手機上開戶安全嗎
D23:multiple of 3 or 5 (multiple of 3 or 5, translation + solution)
[about text classification trick] things you don't know
2022 chemical automation control instrument examination content and chemical automation control instrument simulation examination
股票开户最低佣金炒股开户免费,网上开户安全吗
Gossip about redis source code 74
D25:sequence search (sequence search, translation + problem solving)
Distributed transaction -- middleware of TCC -- selection / comparison
Pandaoxi's video
Gossip about redis source code 80
A treasure open source software, cross platform terminal artifact tabby
Idea set class header comments
P1339 [USACO09OCT]Heat Wave G
Test the influence of influent swacth on the electromagnetic coil of quartz meter
[BSP video tutorial] stm32h7 video tutorial phase 5: MDK topic, system introduction to MDK debugging, AC5, AC6 compilers, RTE development environment and the role of various configuration items (2022-
Axure resources and prototype tool Axure RP 9 download