title: How do I get the axis labels in QtChart QLineSeries
body: <p>I am able to generate graphs using the QtCharts library in Python but I can't seem to figure out how to add axis labels to my graphs... </p>
  
  <p>I see the ability to setLabelFormat() for a QValueAxis, but nothing on how to set the text itself. I'm sure there's something simple I am missing.</p>
  
  <p>Here's the code I have to generate the graphs:</p>
  
  <pre><code>def plotLossesChart(self):
  
        set0 = QBarSet('Conduction Loss')
        set1 = QBarSet('Switching Loss')
  
        set0.append([random.randint(0, 10) for i in range(5)])
        set1.append([random.randint(0, 10) for i in range(5)])
  
        series = QStackedBarSeries()
        series.append(set0)
        series.append(set1)
  
        chart = QChart()
        chart.addSeries(series)
        chart.setTitle('Loss Summary')
        chart.setAnimationOptions(QChart.SeriesAnimations)
  
        months = ('Upper FET', 'Lower FET', 'Driver', 'Inductor', 'Cap ESR')
  
        axisX = QBarCategoryAxis()
        axisX.append(months)
  
        axisY = QValueAxis()
        axisY.setRange(0, 15)
  
        chart.addAxis(axisX, Qt.AlignBottom)
        chart.addAxis(axisY, Qt.AlignLeft)
  
        chart.legend().setVisible(True)
        chart.legend().setAlignment(Qt.AlignBottom)
  
        return chart
  
  def plotEfficiencyChart(self):
  
        series = QLineSeries()
  
        load = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 15, 20, 30]
        eff = [0, 0.5726, 0.7321, 0.7978, 0.8398, 0.8616, 0.8798, 
               0.8903, 0.9002, 0.9062, 0.9127, 0.9267, 0.9379, 0.9430, 0.9448]
  
        for i, e in zip(load, eff):
          series.append(QPointF(float(i), float(e)*100))
  
        chart = QChart()
        chart.addSeries(series)
        chart.setTitle('Efficiency vs. Load')
        chart.setAnimationOptions(QChart.SeriesAnimations)
  
        axisX = QValueAxis()
        axisX.setRange(0, 30)
        axisX.setLabelFormat("%.1f")
        axisX.setTickCount(7)
  
        axisY = QValueAxis()
        axisY.setRange(0, 100)
        axisY.setLabelFormat("%d")
        axisY.setMinorTickCount(5)
  
        chart.addAxis(axisX, Qt.AlignBottom)
        chart.addAxis(axisY, Qt.AlignLeft)
  
        series.attachAxis(axisX)
        series.attachAxis(axisY)
  
        chart.legend().setVisible(False)
  
        return chart
  </code></pre>
  
  <p>In the main program I add the chart to a ChartView and attach it to a QGridLayout. </p>
  
  <p>This is what I get:</p>
  
  <p><a href="https://i.stack.imgur.com/wQZS1.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/wQZS1.png" alt="This is what I get:"></a></p>
  
  <p>This is what I want (add labels to my axis):</p>
  
  <p><a href="https://i.stack.imgur.com/dsyqY.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/dsyqY.png" alt="enter image description here"></a></p>
  
  <p>I can't seem to find how to do this in the documentation... can anyone help me?</p>