chart = QChart() axisY = QValueAxis() axisY.setRange(0, 100) chart.setAxisY(axisY)
chart = QChart() axisY = QValueAxis() axisY.setLabelFormat("%.1f") axisY.setTitleText("Scores") chart.setAxisY(axisY)This example adds a label format with one decimal place and a title to the Y-axis of a QChart object. Overall, PyQt5.QtChart is a powerful library for creating data visualizations and the setAxisY() function can be used to customize the Y-axis of a chart.