Summing magnitudes of individual frequency bins I am working on signal analyser and have problem with understanding relationship between display resolution and frequency resolution (range).
My frequency range is $ 1-20000\quad [ H z ] $ so to project each frequencies magnitude on display (horizontally in linear scale) I need display horizontal resolution at least 20000.
But of course I don't have :)

So let's say I have 1000 pixels horizontal resolution. So to project whole frequency range I need to express $ \frac { 20000} { 1000} = 20 $ frequency bin magnitudes by one pixel.

And my question is what is the most relevant manner to do that?

Should I just sum all 20 magnitudes? Or better make some avarage value like $ \frac { 1} { 20} \sum _ { i = 1} ^ { 20} mag_{fbin} $

I am pretty sure it's concern a lot of other subjects like: is magnitude print in decibels (log) scale or as range from 0 to 1? Also important thing is perception of human ear (if it's audio). And other things. But I don't know how to deal with that. Could you give any advice? To make the answer easier, let's say I want to create audio signal analyser.

Please help. Thanks in advance.
Having an interface that limits what can be  presented is a common problem. The solution depends a lot on the application and if you want a zoom function.

You can average, take a max, take a median, interpolate, decimate, or whatever seems to work.  

Its a cognition problem.