Results 1 to 2 of 2

Thread: How to prevent to draw the plotcurve in the inner x axis scale area?

  1. #1
    Join Date
    Sep 2011
    Posts
    30
    Thanks
    6
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11

    Default How to prevent to draw the plotcurve in the inner x axis scale area?

    In my application, I put the x scale into plot area, but the data curve will display over the x axis and scale label. So, I want to prevent the curve draw in this area, please give any suggestion to me. thanks.

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

    Default Re: How to prevent to draw the plotcurve in the inner x axis scale area?

    Not so easy, but possible:

    The first step is to implement a method that calculates a clip region for your scale. F.e you could simply draw the scale item to a QImage, then translate it into a QBitmap and build a QRegion from it.

    Then you have to overload QwtPlot::drawItems. Copy the code into your overloaded method and insert calculating and setting of the clip region before you draw the curves.

    Uwe

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

    josentop (11th October 2011)

Similar Threads

  1. Date Scale for X-Axis
    By mishani99 in forum Qwt
    Replies: 3
    Last Post: 6th September 2011, 11:40
  2. Axis Auto Scale
    By gkarthick5 in forum Qwt
    Replies: 3
    Last Post: 13th July 2011, 13:57
  3. Replies: 4
    Last Post: 16th January 2011, 10:32
  4. qwp plot axis scale
    By Cal in forum Qwt
    Replies: 1
    Last Post: 11th May 2009, 17:10
  5. 4 axis auto scale..
    By Vincenzo in forum Qwt
    Replies: 0
    Last Post: 22nd March 2009, 01: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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.