Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

I'm in a time limited situation on which I have to represent an array of numbers as a chart. The chart is pretty complex, with different scales and representations, because it use a rich library (which is not open source).

At this moment, I need to add a bar chart which represents the positive and negative values of an array. The library that I'm using doesn't generate this type of chart (or I didn't find it yet - but I'm desperate), so I'll have to use something that is already implemented: the function which draws derivatives chart of a series taken as argument.

I know the input array, and in the chart I need to represent the negatives and the positive values not the derivatives (but using the derivatives chart function). I'll have to hack the input array in order to get a chart with positive and negative values marked and not the derivatives.

How do I have to modify the input array?

share|improve this question
Could you make a sketch of an example of what you're expecting to see? –  J. M. Oct 14 '11 at 16:31
If $(a_k)_{1\leq k\leq n}$ is your array then (assuming all $a_k$ are $\ne0$) define a new array $(s_k)_{1\leq k\leq n}$ via $$s_k\ :=\ {a_k\over |a_k|}\ =\ {a_k\over\sqrt{a_k^2}}\ .$$ –  Christian Blatter Oct 14 '11 at 17:46

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.