Results 1 to 3 of 3

Thread: Space between axis and graph.

  1. #1
    Join Date
    Dec 2010
    Posts
    4
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Space between axis and graph.

    Hi.

    How to remove space between axis and graph.
    See attached file.

    I am using qwt-6.0.1 ...

    Thanks, BasY
    Attached Images Attached Images

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

    Default Re: Space between axis and graph.

    Qt Code:
    1. QwtPlotCanvas* canvas = dynamic_cast<QwtPlotCanvas*>( plot->canvas() );
    2. canvas->setFrameStyle( QFrame::Box );
    3. canvas->setLineWidth(1);
    4.  
    5. plot->plotLayout()->setAlignCanvasToScales( true );
    6. for ( int i = 0; i < QwtPlot::axisCnt; i++ )
    7. {
    8. plot->axisWidget(i)->setMargin( 0 );
    9. plot->axisScaleDraw(i)->enableComponent( QwtScaleDraw::Backbone, false );
    10. }
    To copy to clipboard, switch view to plain text mode 
    When playing with those parameters you might find your type of alignment.

    Uwe

  3. #3
    Join Date
    Dec 2010
    Posts
    4
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Space between axis and graph.

    Thank you, it works...

Similar Threads

  1. Change Title of graph or axis
    By mikrocat in forum Qwt
    Replies: 2
    Last Post: 18th January 2016, 07:06
  2. Remove space between axis and plot
    By Ozzy in forum Qwt
    Replies: 12
    Last Post: 16th January 2014, 13:48
  3. How to create own graph(Curve graph) using Qt ?
    By karankumar1609 in forum Qt Programming
    Replies: 3
    Last Post: 11th July 2013, 11:48
  4. Replies: 1
    Last Post: 26th July 2009, 15:08
  5. linking user space and kernel space programs with qmake
    By zielchri in forum Qt Programming
    Replies: 9
    Last Post: 8th March 2006, 23:11

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.