Results 1 to 4 of 4

Thread: how to set the y-axis width?

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Aug 2017
    Location
    Munich, Germany
    Posts
    8
    Thanks
    5
    Qt products
    Qt5
    Platforms
    Unix/X11

    Question how to set the y-axis width?

    Hello,

    i am playing with Qwt. Thanks for the great library! I have written an application with one or more plotters. In the first one i will draw a Chart of an financial market. In the plotter below i will draw as example an indicator. Please see the screenshot.
    Clipboard 1.jpg

    How can i set the width of the Y-axis on the right side of the plotter below?

    I would have the same width as the plotter above (with the candle-sticks). I tried so many things with plotter->axisWidget(QwtPlot::yRight)->resize() etc. but nothing work. Thanks for any suggestions!

    Best regards,
    johno


    EDIT: The vertical line is a QwtPlotMarker. I set the position with: plottMarker->setValue(chartPlotter->invTransform(QwtPlot::xBottom, pos.x()), 0); from the plotter above (with the signal: moved(QPoint) from QwtPlotPicker). It works, but it looks crazy because of the different width of the y-axis.
    Last edited by johno; 7th July 2021 at 02:01.

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

    Default Re: how to set the y-axis width?

    Have a look at the plotmatrix example.

    Uwe

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

    johno (15th July 2021)

Similar Threads

  1. Replies: 0
    Last Post: 23rd January 2017, 11:55
  2. yLeft axis constant width
    By baray98 in forum Qwt
    Replies: 4
    Last Post: 4th January 2013, 16:40
  3. Replies: 9
    Last Post: 3rd May 2011, 21:21
  4. QToolBox width fixed to maximum content width
    By ghorwin in forum Qt Programming
    Replies: 0
    Last Post: 10th July 2009, 09:58
  5. How to set QTableView width to width of horizontal header?
    By martinb0820 in forum Qt Programming
    Replies: 0
    Last Post: 2nd December 2008, 20:51

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.