当前位置:网站首页>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 
边栏推荐
- The upload experience version of uniapp wechat applet enters the blank page for the first time, and the page data can be seen only after it is refreshed again
- Deep learning ----- using NN, CNN, RNN neural network to realize MNIST data set processing
- STM32 GPIO CSDN creative punch in
- Report on prospects and future investment recommendations of China's assisted reproductive industry, 2022-2028 Edition
- Design of logic level conversion in high speed circuit
- Test the influence of influent swacth on the electromagnetic coil of quartz meter
- Selenium check box
- China standard gas market prospect investment and development feasibility study report 2022-2028
- Loop compensation - explanation and calculation of first-order, second-order and op amp compensation
- A method to solve Bert long text matching
猜你喜欢

2022 chemical automation control instrument examination content and chemical automation control instrument simulation examination

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

Tencent interview: can you pour water?

Schematic diagram of crystal oscillator clock and PCB Design Guide

Common mode interference of EMC

How to write a good title of 10w+?
![[PHP basics] cookie basics, application case code and attack and defense](/img/7c/551b79fd5dd8a411de85c800c3a034.jpg)
[PHP basics] cookie basics, application case code and attack and defense

STM32 GPIO CSDN creative punch in

Alibaba cloud container service differentiation SLO hybrid technology practice

Ningde times and BYD have refuted rumors one after another. Why does someone always want to harm domestic brands?
随机推荐
[about text classification trick] things you don't know
Schematic diagram of crystal oscillator clock and PCB Design Guide
Investment demand and income forecast report of China's building ceramics industry, 2022-2028
P1339 [USACO09OCT]Heat Wave G
Fudan 961 review
Amway by head has this project management tool to improve productivity in a straight line
NLP Chinese corpus project: large scale Chinese natural language processing corpus
Idea integrates Microsoft TFs plug-in
Introducing Software Testing
炒股開戶傭金優惠怎麼才能獲得,網上開戶安全嗎
2022 free examination questions for hoisting machinery command and hoisting machinery command theory examination
Fluent learning (4) listview
Gossip about redis source code 75
NLP pre training technology development
ITK learning notes (VII) the position of ITK rotation direction remains unchanged
Cgb2201 preparatory class evening self-study and lecture content
Ramble 72 of redis source code
C # basic knowledge (2)
IO flow principle and classification
Generic tips