Results 1 to 2 of 2

Thread: How to add a right margin to the QWT plot canvas?

  1. #1
    Join Date
    May 2013
    Posts
    5
    Qt products
    Qt4 Qt5
    Platforms
    Windows

    Default How to add a right margin to the QWT plot canvas?

    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.

  2. #2
    Join Date
    Feb 2006
    Location
    Munich, Germany
    Posts
    3,325
    Thanked 879 Times in 827 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: How to add a right margin to the QWT plot canvas?

    What about

    Qt Code:
    1. plot->plotLayout()->setCanvasMargin( 20, QwtPlot::yRight() );
    To copy to clipboard, switch view to plain text mode 
    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

  3. The following user says thank you to Uwe for this useful post:

    maxpyne (25th July 2013)

Similar Threads

  1. Replies: 3
    Last Post: 12th April 2013, 06:18
  2. Replies: 1
    Last Post: 17th April 2012, 10:10
  3. How to set margin on one side of canvas plot (QwtPlot)
    By balvinder in forum Qt Programming
    Replies: 1
    Last Post: 13th February 2012, 16:15
  4. QwtPlotZoomer zooming off the plot canvas
    By BettaUseYoNikes in forum Qwt
    Replies: 1
    Last Post: 26th June 2011, 11:38
  5. Replies: 7
    Last Post: 22nd September 2008, 22:05

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.