If you don't want to use Qwt, then have a look at QCustomPlot. I might not have understood your requirement, but suggesting an alternative if you cannot use Qwt.