当前位置:网站首页>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
边栏推荐
- It is the most difficult to teach AI to play iron fist frame by frame. Now arcade game lovers have something
- Comment obtenir une commission préférentielle pour l'ouverture d'un compte en bourse? Est - ce que l'ouverture d'un compte en ligne est sécurisée?
- 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.
- Loop compensation - explanation and calculation of first-order, second-order and op amp compensation
- Analysis of refrigeration and air conditioning equipment operation in 2022 and examination question bank of refrigeration and air conditioning equipment operation
- Op amp related - link
- The first game of the new year, many bug awards submitted
- Fluent learning (5) GridView
- [MySQL] classification of multi table queries
- Interesting 10 CMD commands
猜你喜欢
It is forbidden to splice SQL in code
Entropy and full connection layer
It is the most difficult to teach AI to play iron fist frame by frame. Now arcade game lovers have something
How to make recv have a little temper?
Research Report on the scale prediction of China's municipal engineering industry and the prospect of the 14th five year plan 2022-2028
2022 free examination questions for hoisting machinery command and hoisting machinery command theory examination
Unity elementary case notes of angry birds Siki college 1-6
How will the complete NFT platform work in 2022? How about its core functions and online time?
Test the influence of influent swacth on the electromagnetic coil of quartz meter
Introducing Software Testing
随机推荐
Detailed explanation of the relationship between Zhongtai, wechat and DDD
Minimum commission for stock account opening. Stock account opening is free. Is online account opening safe
Regular expressions and text processors for shell programming
NLP Chinese corpus project: large scale Chinese natural language processing corpus
C # basic knowledge (3)
D28:maximum sum (maximum sum, translation)
IO flow principle and classification
Tencent interview: can you find the number of 1 in binary?
D24:divisor and multiple (divisor and multiple, translation + solution)
ITK learning notes (VII) the position of ITK rotation direction remains unchanged
Solve the problem that the kaggle account registration does not display the verification code
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
炒股开户佣金优惠怎么才能获得,网上开户安全吗
股票开户佣金最低的券商有哪些大家推荐一下,手机上开户安全吗
Cgb2201 preparatory class evening self-study and lecture content
Generic tips
What is the difference between NFT, SFT and dnft? How to build NFT platform applications?
2022 a special equipment related management (elevator) examination questions and a special equipment related management (elevator) examination contents
2022 examination of safety production management personnel of hazardous chemical production units and examination skills of safety production management personnel of hazardous chemical production unit
2022 system integration project management engineer examination knowledge points: software development model