Menu

Strange behaviour of Area method

Help
Anonymous
2012-04-09
2012-10-16
  • Anonymous

    Anonymous - 2012-04-09

    Hello!

    I am using the mglGraphZB class to plot an "Area" plot:

        mglData* frontsDistributions_;
        mglData* frontsXaxis_;
        ...
    

    Then I make some computations and compute the data and point the two pointers
    at it.

        graph_->XRange(*frontsXaxis_, true);
        graph_->YRange(*frontsDistributions_,true);
        graph_->Axis("xy", true);
        graph_->Area(*frontsXaxis_, *frontsDistributions_);
    

    The problem is that the data is plotted differently each time I run the
    program. I change only the data, but the coloring also changes.

    Sometimes it is such as on the left side and sometimes as on the right side
    of:

    Moreover, this happens randomly. So for example I run the program two times
    with the result on the left, then three times wit h that on the right.

    Please what is causing this behaviour?

    Thanks

    Martin Drozdik

     
  • Anonymous

    Anonymous - 2012-04-09

     
  • Anonymous

    Anonymous - 2012-04-09

     
  • Anonymous

    Anonymous - 2012-04-09

    Hello,

    It seems that I was using the old documentation. In the new one it is
    explained

    Also you can use gradient filling if number of specified colors is equal to
    2*number of curves.

    So I guess this explains this mysterious behaviour.

    Sorry

     
  • Alexey Balakin

    Alexey Balakin - 2012-04-09

    Yes

     

Log in to post a comment.