Results 1 to 6 of 6

Thread: qwtpolar radius scale step always autosteps regardless of setting

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Mar 2014
    Location
    USA
    Posts
    85
    Thanks
    17
    Thanked 2 Times in 2 Posts
    Qt products
    Qt5
    Platforms
    Windows

    Default qwtpolar radius scale step always autosteps regardless of setting

    void CPolFileGraph::SetupPolarPlot()
    {

    m_pPolarPlot = new QwtPolarPlot(ui.m_frame_Graph);
    if(m_GraphSettings.GetAzimuthRange() == AZIMUTH_NEG_180_TO_180)
    {
    m_pPolarPlot->setScale(QwtPolar::Azimuth,180.0,-180.0,m_GraphSettings.GetAzimuthLabeling());
    m_pPolarPlot->setAzimuthOrigin(3 * M_PI_2);
    }
    else
    {
    m_pPolarPlot->setScale(QwtPolar::Azimuth,360.0,0.0,m_GraphSetti ngs.GetAzimuthLabeling());
    m_pPolarPlot->setAzimuthOrigin(M_PI_2);
    }
    m_pPolarPlot->setScale(QwtPolar::Radius,-40,40,2.0);
    bool AutoScaleOn1 = m_pPolarPlot->hasAutoScale(Qwt::Azimuth); // returns false showing auto scale is off
    bool AutoScaleOn2 = m_pPolarPlot->hasAutoScale(QwtPolar::Radius); // returns false showing auto scale is off
    m_PolarPlotGrid.showGrid(QwtPolar::Azimuth,true);
    m_PolarPlotGrid.showGrid(QwtPolar::Radius,true);
    m_PolarPlotGrid.showAxis(QwtPolar::AxisAzimuth,tru e);
    m_PolarPlotGrid.showAxis(QwtPolar::AxisBottom,fals e);
    m_PolarPlotGrid.showAxis(QwtPolar::AxisLeft,false) ;
    m_PolarPlotGrid.showAxis(QwtPolar::AxisRight,true) ;
    m_PolarPlotGrid.showAxis(QwtPolar::AxisTop,false);
    m_PolarPlotGrid.attach(m_pPolarPlot);
    m_pPanner = new QwtPolarPanner(m_pPolarPlot->canvas());
    m_pPanner->setEnabled(true);
    m_pMagnifier = new QwtPolarMagnifier(m_pPolarPlot->canvas());
    m_pMagnifier->setEnabled(true);
    }

    I set up a polar plot with the above code. When I set the radius scale I set step to 2. I check to see if autoscale is on for Azimuth and Radius, Azimuth is off and Radius is on. I don't want it to be on. My radius axis seems to auto step the plot even though I set it for 2. In this case I get a step of 10 instead of 2. Am I doing something wrong or is it a bug in QwtPolar? Just for the heck of it I tried setting the step to 20 and still get the same result, it sets to 10.

    Edit starts here.
    OK, I screwed up on checking if autoscale is on/off. I fixed the code. It shows that autoscale is turned off for both axis, but the radius axis displays autoscale instead of the step I manually entered (F.e. 10.0 instead of 2.0 in the above code).
    Last edited by TonyInSoMD; 19th March 2015 at 12:54.

Similar Threads

  1. Setting QT in Xcode step by step guide
    By anupam in forum Qt Programming
    Replies: 2
    Last Post: 29th September 2015, 19:06
  2. QwtPolar - Title for Radius Axis
    By Crowley in forum Qwt
    Replies: 3
    Last Post: 23rd May 2014, 07:14
  3. Replies: 1
    Last Post: 13th August 2012, 11:32
  4. Replies: 7
    Last Post: 13th April 2011, 08:42
  5. QwtPolarPlot radius scale
    By brutus35 in forum Qwt
    Replies: 2
    Last Post: 24th February 2011, 17:46

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.