当前位置:网站首页>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
边栏推荐
- AI Challenger 2018 text mining competition related solutions and code summary
- Docking Alipay process [pay in person, QR code Payment]
- Kubedl hostnetwork: accelerating the efficiency of distributed training communication
- Maxwell equation and Euler formula - link
- Several ways to set up a blog locally [attach relevant software download links]
- Vscode regular match replace console log(.*)
- "Learning notes" recursive & recursive
- NLP Chinese corpus project: large scale Chinese natural language processing corpus
- 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
- 炒股開戶傭金優惠怎麼才能獲得,網上開戶安全嗎
猜你喜欢
"Learning notes" recursive & recursive
Smart fan system based on stm32f407
STM32 GPIO CSDN creative punch in
How to prevent malicious crawling of information by one-to-one live broadcast source server
How to write a good title of 10w+?
The interviewer's biggest lie to deceive you, bypassing three years of less struggle
Correlation analysis summary
How to solve the "safe startup function prevents the operating system from starting" prompt when installing windows10 on parallel desktop?
How will the complete NFT platform work in 2022? How about its core functions and online time?
It is the most difficult to teach AI to play iron fist frame by frame. Now arcade game lovers have something
随机推荐
Enter MySQL in docker container by command under Linux
Idea set class header comments
2022 Guangdong Provincial Safety Officer a certificate third batch (main person in charge) simulated examination and Guangdong Provincial Safety Officer a certificate third batch (main person in charg
Cgb2201 preparatory class evening self-study and lecture content
Double efficiency. Six easy-to-use pychar plug-ins are recommended
D29:post Office (post office, translation)
C # basic knowledge (1)
Gossip about redis source code 74
CSP window
股票开户最低佣金炒股开户免费,网上开户安全吗
Gossip about redis source code 75
Gossip about redis source code 73
2022 system integration project management engineer examination knowledge points: software development model
ESP Arduino playing with peripherals (V) basic concept of interrupt and timer interrupt
Detailed explanation of the relationship between Zhongtai, wechat and DDD
NLP Chinese corpus project: large scale Chinese natural language processing corpus
Current detection circuit - including op amp current scheme
How to solve the "safe startup function prevents the operating system from starting" prompt when installing windows10 on parallel desktop?
Analysis of refrigeration and air conditioning equipment operation in 2022 and examination question bank of refrigeration and air conditioning equipment operation
It is forbidden to splice SQL in code