Small values

Help
andrewd
2009-09-03
2013-05-02
  • andrewd
    andrewd
    2009-09-03

    Hi,

    In mpFXYVector::SetData() the following lines cause small values to display all scrunched up:

            m_minX-=0.5F;
            m_minY-=0.5F;
            m_maxX+=0.5F;
            m_maxY+=0.5F;
     
    Simply removing them solves all problems (for me).

    Thanks.

     
  • andrewd
    andrewd
    2009-10-05

    Also, in mpScaleY::Plot the fmt = format options are rather arbitrary. I changed it just %g for my needs.

     
  • DavidA
    DavidA
    2009-10-09

    I derived a class from mpFXYVector to allow me to set the min and max values.

     
  • andrewd
    andrewd
    2009-10-28

    That's A bit of overkill. A more general solution to solve I expect 99% of cases is:

    double diffY = (m_maxY - m_minY) * 0.05f;
    m_minY -= diffY;
    m_maxY += diffY;

    double diffX = (m_maxX - m_minX) * 0.05f;
    m_minX -= diffX;
    m_maxX += diffX;

    Gives a bit of space at top and bottom but scales to any arbitrary precision.