I suggest looking into QCustomPlot.