Results 1 to 3 of 3

Thread: Are custom Axis Tags and Axis Labels possible?

  1. #1
    Join Date
    Mar 2020
    Posts
    3
    Qt products
    Qt5
    Platforms
    MacOS X Windows

    Default Are custom Axis Tags and Axis Labels possible?

    QCustomPlot has some nice features around items on the chart. I'm working if that functionality is possible with Qwt? I've read the the docs and went through every example, but nothing stuck out to me. Here is an example:

    AxisTagExample.PNG

    I put a tag with a bit of an arrow for the last received price right on the y-axis and it looks great with or without the horizontal price line.

    What do ya think?

    Thanks in advanced,

    Josh

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

    Default Re: Are custom Axis Tags and Axis Labels possible?

    QwtPlot is a composite widget, what makes certain things easier and other things harder.
    For your particular use case you have the problem, that the line has to painted on the plot canvas, while the label has to be painted on the scale widget.

    The line on the canvas would simply be a QwtPlotMarker - note, that such a marker could consist of a line and a text label ( see the bode example ).
    Putting some labels on top of the scale is not supported out of the box, but can be implemented without too much work by overloading QwtScaleDraw::draw.

    Uwe

  3. #3
    Join Date
    Mar 2020
    Posts
    3
    Qt products
    Qt5
    Platforms
    MacOS X Windows

    Default Re: Are custom Axis Tags and Axis Labels possible?

    Thanks for the explanation and tips.

    Josh

Similar Threads

  1. Draw Custom Y-Axis Labels
    By TEAmerc in forum Qwt
    Replies: 4
    Last Post: 25th November 2015, 16:58
  2. Can an Axis' Labels be Redrawn?
    By TEAmerc in forum Qwt
    Replies: 1
    Last Post: 4th November 2015, 08:19
  3. QwtPlot axis labels
    By Kutuska in forum Qwt
    Replies: 7
    Last Post: 29th August 2012, 17:08
  4. Labels on axis.
    By eugene in forum Qwt
    Replies: 5
    Last Post: 6th August 2010, 14:30
  5. Axis with more labels
    By rakkar in forum Qwt
    Replies: 1
    Last Post: 11th October 2009, 10:26

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.