PDA

View Full Version : How to add a right margin to the QWT plot canvas?



brianbat
16th May 2013, 18:26
Hello,

Can someone tell me how to add a right margin to the QWT plot canvas? I have a continuous curve plotting, such as an oscilloscope, and the curve currently goes all the way over to the right side. I would like a margin inserted on the right side so there is blank space between the end of the curve and the right border on the canvas.

Thanks.

Uwe
17th May 2013, 07:10
What about


plot->plotLayout()->setCanvasMargin( 20, QwtPlot::yRight() );
You could also add some offset to the x scale, so that its upper limit is always ahead of the x value of the current sample.

Uwe