Results 1 to 2 of 2

Thread: How do I change plot scale based on the selection

  1. #1
    Join Date
    Sep 2011
    Location
    Bangalore
    Posts
    254
    Thanks
    92
    Thanked 16 Times in 16 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Windows

    Default How do I change plot scale based on the selection

    I'm plotting 5000 values of histogram(used from TV Plot example), on QwtPlot which has a scroll area. So the xBottom tick values are shown according to my step size in setAxisScale.
    The graph is shown with certain number of samples between two major ticks. Assume like this is monthly data.
    Now I want to provide an option where user selects the weekly data, then the graph should be plotted for weekly data. The monthly data graph should look crowded one, but the weekly data plot should look a bit relaxed compared to monthly. But when the user selects the daily data option, the scale should be even relaxed.

    What I mean is the distance between two ticks should always be same. But the tick values, number of values between two ticks and graph width should differ based on each selection. How do I implement this?

  2. #2
    Join Date
    Sep 2011
    Location
    Manchester
    Posts
    538
    Thanks
    3
    Thanked 106 Times in 103 Posts
    Qt products
    Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: How do I change plot scale based on the selection

    I'm guessing you just need to set x axis range (upper and lower values, like zooming).
    That will stretch therange set (month/week) to fit in the visible area.
    The distances between ticks will still be the same but less data (in more 'relaxes' fashion) will be visible.

  3. The following user says thank you to Spitfire for this useful post:

    rawfool (7th June 2012)

Similar Threads

  1. Scale Breaks in the QWT plot axis
    By OzQTNoob in forum Qwt
    Replies: 1
    Last Post: 10th May 2012, 10:38
  2. sync plot grid w/ external scale widget
    By Kevin Ching in forum Qwt
    Replies: 6
    Last Post: 30th September 2010, 18:12
  3. Replies: 2
    Last Post: 12th October 2009, 22:17
  4. qwp plot axis scale
    By Cal in forum Qwt
    Replies: 1
    Last Post: 11th May 2009, 18:10
  5. how to hide the scale in qwt plot
    By babu198649 in forum Qwt
    Replies: 2
    Last Post: 7th March 2008, 07:38

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.