In my application, I put the x scale into plot area, but the data curve will display over the x axis and scale label. So, I want to prevent the curve draw in this area, please give any suggestion to me. thanks.
In my application, I put the x scale into plot area, but the data curve will display over the x axis and scale label. So, I want to prevent the curve draw in this area, please give any suggestion to me. thanks.
Not so easy, but possible:
The first step is to implement a method that calculates a clip region for your scale. F.e you could simply draw the scale item to a QImage, then translate it into a QBitmap and build a QRegion from it.
Then you have to overload QwtPlot::drawItems. Copy the code into your overloaded method and insert calculating and setting of the clip region before you draw the curves.
Uwe
josentop (11th October 2011)
Bookmarks