Results 1 to 2 of 2

Thread: understanding QwtPlot::transform()

  1. #1
    Join Date
    May 2008
    Posts
    1
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Question understanding QwtPlot::transform()

    Hi! I'm trying to draw Point and Figure chart (see attachment). As you can see on this chart the size of the symbols is too small for this scale. I want to compute the size of the symbols depending on the number of columns on the chart. I'm trying to use QwtPlot transform() function, but i dont understand how it works. For example it returns the same result in both of this cases:

    current_plot->transform(QwtPlot::xBottom, 20.0);
    current_plot->transform(QwtPlot::xBottom, 21.0);

    I'm new to qwt, can anyone help???
    Attached Images Attached Images

  2. #2
    Join Date
    Apr 2008
    Location
    Bangalore, India
    Posts
    7
    Qt products
    Qt3
    Platforms
    Unix/X11

    Default Re: understanding QwtPlot::transform()

    hi,
    QwtPlot::transform() is to be used to transform the (x,y) coordinates in the plot coordinates system to the global widget coordinates and the output is in units of screen points which are integers. Hence, both your code will give the same result because they are far to close. Try these:

    current_plot->transform(QwtPlot::xBottom, 20.0);
    current_plot->transform(QwtPlot::xBottom, 11.0);

    and you will see the difference in output.

    One way could be instead of using transform, you can directly set the size of the QwtSymbol depending on you column number, which is in plot-coordinates.

    Kaustav.

Similar Threads

  1. Problems understanding QGraphicsScene
    By Bocki in forum Qt Programming
    Replies: 3
    Last Post: 15th February 2008, 12:43
  2. QThread - general understanding
    By soul_rebel in forum Qt Programming
    Replies: 10
    Last Post: 21st August 2007, 23:15

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.