Results 1 to 5 of 5

Thread: Exotic axis scaling

  1. #1
    Join Date
    Aug 2019
    Posts
    3
    Thanks
    1
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Question Exotic axis scaling

    I'm currently working on a software which displays some data using linear and logarithmic scales. Since this data may contain a lot of noise, we want to give the user the possibility to set a noise threshold to highlight the outlier values. Because of the nature of the software, these outliers are on both sides of the 0-line.

    Just removing the data without changes to the scales is easy, since we just need to adjust the series data of the curves. But it would be better to collapse the threshold area completely since this may take a lot of screen space. As example, the y axis should have the following labels: 10000 1000 +/-100 -1000 -10000 where +/- 100 acts as 0-line and each value with y <= 100 is drawn on this line.

    The only solution I came up with, is to introduce a lot of transformation logic to transform "raw value" into "value - threshold" and determining the correct label and position for those transformed values. I think this approach is cumbersome, but currently the only one I can think of. Does Qwt support such a scenario or are there any facilities which may ease the implementation?

    The best solution would obviously a single spot to set the transformation - but until now, I could find any. I hope someone can provide some hints about this.

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

    Default Re: Exotic axis scaling

    Did you already have a look at playground/scaleengine ?

    Uwe

  3. #3
    Join Date
    Aug 2019
    Posts
    3
    Thanks
    1
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Exotic axis scaling

    Quote Originally Posted by Uwe View Post
    Did you already have a look at playground/scaleengine ?
    Sure. It uses the QwtTransform to manipulate the data of the series directly, so every sample is converted to something else. Using this approach allows me to "hide" the noise, but it does not collapse the resulting empty area.

  4. #4
    Join Date
    Feb 2006
    Location
    Munich, Germany
    Posts
    3,199
    Thanked 847 Times in 796 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Exotic axis scaling

    The "At 400" shows how to extend a region around a specific value. The same way it should be possible to shrink a region - in your case [-100, 100].

    Mapping all values from this region to the same pixel position breaks bijection, but you could choose something tiny - maybe inside the range of one pixel.
    Isn't that what you are looking for ?

    Uwe

  5. The following user says thank you to Uwe for this useful post:

    ckieschnick (28th August 2019)

  6. #5
    Join Date
    Aug 2019
    Posts
    3
    Thanks
    1
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Exotic axis scaling

    It seems that I was missing this hint. Thanks.

Similar Threads

  1. Replies: 6
    Last Post: 14th February 2013, 03:21
  2. QwtSpectogram and scaling the Axis
    By revellix in forum Qwt
    Replies: 1
    Last Post: 25th August 2011, 09:36
  3. improve the auto scaling of axis
    By 21did21 in forum Qwt
    Replies: 7
    Last Post: 7th July 2011, 19:26
  4. Y axis not auto scaling
    By pkj in forum Qwt
    Replies: 0
    Last Post: 12th May 2011, 16:05

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