Results 1 to 3 of 3

Thread: change plot and axis background color

  1. #1
    Join Date
    Dec 2008
    Posts
    16
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default change plot and axis background color

    Hi,

    i couldnt find any hints on how to change the basic layout of the qwt plot. All i want is to change the axis and plot background to a different color and remove the frame border between the axis and the plot.
    as far as i understood it i have to change a QwtPlotPrintFilter object.

    i tried it with this in the constructor method of my plot class:
    Qt Code:
    1. filter.color(Qt::white,QwtPlotPrintFilter::WidgetBackground );
    2. filter.apply(this);
    3. this->replot();
    To copy to clipboard, switch view to plain text mode 

    but this doesnt work... maybe someone could help me out here.

    thx!
    lutz

  2. #2
    Join Date
    Mar 2009
    Posts
    98
    Thanks
    3
    Thanked 9 Times in 9 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: change plot and axis background color

    Have you try this method to change the plot background?

    plot->setCanvasBackground(QColor(29, 100, 141)); // nice blue

  3. #3
    Join Date
    Dec 2008
    Posts
    16
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: change plot and axis background color

    thanks. that works for the background. but how can i change the axis background and remove that little border-frame?

Similar Threads

  1. Put plot axis out of the plot
    By KosyakOFF in forum Qwt
    Replies: 7
    Last Post: 21st June 2013, 13:36
  2. Replies: 1
    Last Post: 19th May 2009, 11:14
  3. qwp plot axis scale
    By Cal in forum Qwt
    Replies: 1
    Last Post: 11th May 2009, 17:10
  4. Detecting changes in the qwt plot axis
    By mrcolin in forum Qwt
    Replies: 2
    Last Post: 27th January 2009, 12:53

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.