Menu

Axis numbers + selecting plot rectangle

Help
Big Muscle
2009-03-15
2013-05-02
  • Big Muscle

    Big Muscle - 2009-03-15

    Hello, I have following two problems:

    1. When I draw plot from floating point numbers with very small difference (as 4,262085 and 4,2623901), it will show same numbers (only 4,26 for both numbers) on axis. Solution would be to display more decimal digits in number. Is there any solution for it?

    Check axis Y on this image to see problem: http://i41.tinypic.com/k4ezvm.png

    2. When I want to select a rectangle on the plot (with left mouse button), I don't see that selected rectangle. Correct area is displayed when mouse button is released. The only problem is that selection rectangle isn't visible.

    Thank you for you help!

     
    • cdron77

      cdron77 - 2009-03-15

      Well, both questions require a bit of discussion:

      1. the matter is this: it is possible to increment the precision, by controlling format at lines 904 and 906 of mathplot.cpp. This may lead the labels to exit on the left side of the window. To avoid that you should increment left margin. I blieve that current behaviour is a compromise to get adequate accuracy in most situations, without having horribly truncated labels. Anyway, you can change this to fit your needs.

      2. The rectangle is drawn actually. The matters are that (I) it is not persistent, so when you stop moving mouse it disappears, and (II), on some platforms, its draw line is very thin, making it almost invisible. I'll try to make it more evident in next releases.

      Thank you for your feedback!

      CD-RON77

       
      • Big Muscle

        Big Muscle - 2009-03-15

        Thank you! I've changed the format to "%.10G" to follow our specifications. Now it displays more digits when it's needed and less digits when it's not needed :-)

         
    • Big Muscle

      Big Muscle - 2009-03-16

      Btw I noticed that selection rectangle isn't visible when double buffering is enabled.

       
      • Big Muscle

        Big Muscle - 2009-03-22

        I fixed this by moving rectangle drawing to onPaint() procedure. Now it works correctly except of the case when plot is drawn with many layers or from many data. Then the rectangle drawing is delayed a bit :(

         

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.