Results 1 to 2 of 2

Thread: Showing text to label curves on QwtPlot

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

    Default Showing text to label curves on QwtPlot

    Hi everyone, I am pretty new to using Qt so I apologize if there is an obvious solution I am missing. I am working on an application that draws vacuum tube plate curves. Everything is working great but I am stuck on how to label the curves.

    Each curve is a plot of points on the plate voltage (xAxis) vs plate current (yAxis) for a fixed grid bias voltage. however I cannot figure out how to label the curves so the user knows what the bias voltage of each curve is. A legend doesn't work because I want all the curves to be the same color and there could be up to 200 curves on a plot which makes for a huge legend.

    What I need to be able to do is label each curve on the plot with text that contains its bias voltage. I can't figure out how to make that happen. The axis's are both scalable by the users and the bias voltage steps are adjustable also (this simply hides the unused curves).

    A picture is always easier to understand so here is a picture of the way the program looks now:



    and here is the same image modified to show how I would like it to look:



    any ideas on how to implement this. I have poured through all the documentation of the Qwt classes and can't seem to figure out how to do this. I am new to Qt and don't have alot of experience programming in C++ so maybe I am just overlooking something obvious. I would just like to know how to get this working. Thanks in advance for any advice.

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

    Default Re: Showing text to label curves on QwtPlot

    You could try to use a QwtPlotMarker.

    Uwe

Similar Threads

  1. Replies: 15
    Last Post: 31st January 2020, 18:25
  2. Unhandled exception in qatomic
    By NewGuy in forum Qt Programming
    Replies: 14
    Last Post: 23rd July 2013, 09:49
  3. Replies: 10
    Last Post: 18th September 2008, 15:14
  4. Replies: 1
    Last Post: 24th October 2006, 16:40

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.