Menu

#45 allow specifying error bar sizes for each data point

open
5
2014-08-15
2010-04-20
ugemkow
No

We use jchart2d for displaying statistical results from our simulations. These statistical results also contain sizes of the error bar for each data point, the error bars are calculated ba performing several independant batch runs.

Currently jchart2d only allows to display error bars which are calculated internally by jchart2d, so we cannot display "our" error bars.

It would be helpful to allow specifying the error bar size (separate for "up" and "down" resp. "left" and "right") for each data point and to display them accordingly.

Thanks for listening and the great lib!

Discussion

  • Achim Westermann

    Hi ugemkow,
    sorry for the long silence. I understood your request but I also think it would bloat the API if I moved the error bar data down to each and every trace point. But that could be subject to discussion.

    By now I'd recommend to extend AErrobarPolicyConfigurable and override

    public void paintPoint(final int absoluteX, final int absoluteY, final int nextX,
    final int nextY, final Graphics g, final ITracePoint2D original)

    You should be able to calculate/obtain the error bar for every point there.

    HTH,
    Achim

     
  • Achim Westermann

    An additional trick to have your computed error bars in the trace points:
    Configure an ITracePointProvider on your Chart2D instance. Let it return your own subclass of ITracePoint2d. And finally do a dirty cast to your implementation in your custom IErrorBarPolicy.

     

Anonymous
Anonymous

Add attachments
Cancel





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.