Results 1 to 4 of 4

Thread: Save QwtPlot as an image

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Mar 2010
    Location
    Auckland, NZ
    Posts
    121
    Thanks
    9
    Qt products
    Qt4
    Platforms
    MacOS X Windows

    Default Re: Save QwtPlot as an image

    I can't recall now why I was reluctant to migrate to Qwt 6, but I think that something I was doing was not going to work the same way, and since 5 was doing everything I needed I decided not to rock the boat.


    Added after 55 minutes:


    I've been experimenting with the Bode example, saving the plot to an image file with
    d_plot->print(img,pf)
    Interestingly, in the image the only things that appear outside of the actual plot area are the short yellow and cyan lines that appear next to 'Amplitude and 'Phase' at the bottom. Since the image background is black, I surmise that nothing else shows because all the rest (axis title, title, axis markings etc) are black. Apparently I need to change the background of the printed image to white (it is grey onscreen). I thought that this might do it:
    pf.color(Qt::GlobalColor::white,QwtPlotPrintFilter ::WidgetBackground);
    but it has no effect, and nor does the same with CanvasBackground, and nor does trying to change AxisTitle by the method.
    Maybe I am misunderstanding what pf.color() is supposed to do.
    Last edited by gib; 22nd May 2018 at 01:25.

Similar Threads

  1. Replies: 15
    Last Post: 24th July 2015, 22:33
  2. save image
    By lozdog in forum Newbie
    Replies: 1
    Last Post: 19th May 2014, 07:06
  3. Replies: 4
    Last Post: 29th May 2012, 23:37
  4. Qwt & save as image
    By giostau in forum Qwt
    Replies: 1
    Last Post: 8th February 2012, 14:41
  5. Replies: 11
    Last Post: 31st December 2008, 12:30

Tags for this Thread

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.