Results 1 to 3 of 3

Thread: Problem saving a plot

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Mar 2006
    Posts
    56
    Qt products
    Qt3 Qt4
    Platforms
    MacOS X Unix/X11 Windows
    Thanks
    7
    Thanked 3 Times in 2 Posts

    Default Problem saving a plot

    Hi,

    I'm saving a plot to an image file using the QwtPlot print function.
    The problem is that the saved image has a bad black margin (see the image attached).

    This is the code I'm using to save the plot image. I'm using Qt 3.3.7 on Windows

    Qt Code:
    1. void MyPlot::savePlot(const QString &sOutputFilename, int w, int h)
    2. {
    3. // get the plot pixmap
    4. QPixmap plotPxm(w, h);
    5. print(plotPxm);
    6.  
    7. plotPxm.save(sOutputFilename, "PNG");
    8. }
    To copy to clipboard, switch view to plain text mode 


    How can I solve the problem?

    Thank you in advance for your help.
    Attached Images Attached Images

Similar Threads

  1. Reg multiple plots in Qwt
    By Tavit in forum Qwt
    Replies: 4
    Last Post: 23rd June 2008, 13:43
  2. setScaleAxis(), setScaleDiv() problem..
    By halberdier83 in forum Qwt
    Replies: 1
    Last Post: 4th April 2008, 08:02
  3. Qwt plot problem on compile
    By sincnarf in forum Qwt
    Replies: 2
    Last Post: 14th October 2007, 11:36
  4. My scientific plot problem
    By baray98 in forum Qt Programming
    Replies: 2
    Last Post: 5th August 2007, 15:01
  5. problem with saving QCstrings
    By nass in forum Qt Programming
    Replies: 3
    Last Post: 5th October 2006, 15:12

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.