We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProcessing DevelopmentLibraries,  Tool Development › nightingale's coxcombs - sort problem
Page Index Toggle Pages: 1
nightingale's coxcombs - sort problem (Read 593 times)
nightingale's coxcombs - sort problem
Dec 29th, 2008, 3:31am
 
I saw a nice graph (http://understandinguncertainty.org/node/213)and i'm making a class for it.

Before drawing each line of a matrix "valor" (means value), the line is sorted in a descending order and stored in a array called "ordem".

So to get access the information, after it has been sorted, i use something like "valor[line][ordem[x]]".

It has to have a descending order so the label can be seen, like the other slices of the graph.

The problem is that 11 lines are sorted right, but one value ("valor[2][1] = 14.9071;") is not. This leads to a improper drawning.

I lost an entire sunday looking for a bug, but could not find it. Can anyone help? Thank you.

Get the code here, because it's too big for the pemited message size:

http://www.arruda.adv.br/coxcomb3.pde
Page Index Toggle Pages: 1