Click here to Skip to main content
15,887,485 members
Please Sign up or sign in to vote.
3.00/5 (2 votes)
See more:
I have, e.g. a chart of voltages measured during the day, so I decided to make the minimum Y axis the lowest voltage, and the maximum the highest voltage. So I get hundreds (sampled per minute) of 240V, and one or two 0V. This means the whole graph is at the very top, all compresses, with a vast mass of emptiness underneath except for one or two zero points.

It looks much better when I remove the zero samples. Maybe a logarithmic Y axis, very tight at the bottom, so zeroes have little effect? I don't know. Hardly ever done anything except a very small line graph with much less diverse data samples.
Posted
Comments
Mehdi Gholam 19-Sep-14 2:39am    
I would think it depends on what you intend to show i.e. voltage consistency (straight line) or variance in the voltage within bounds (larger scale view).

Personally I would go for the latter and set the view range to the main bounds of the signal and have shooting outliers (off scale) for strangeness.
Sergey Alexandrovich Kryukov 19-Sep-14 4:32am    
The question is too uncertain to make sense. Chart? What chart? In a robust chart library, you need everything, and logarithmic, and linear, and other things. Starting from arbitrary point, not always zero, and having arbitrary axis limits. Starting from "nearest round value" (not very trivial algorithm; did you think about it?) And a lot more. Zoom. And a lot more. And, depending on data and some required features, different looks at the same data may be required...
—SA
Brady Kelly 19-Sep-14 4:52am    
Sergey, I am not asking how to chart. I have a good chart library, and I have the chart I want, a straight line chart. The points are just not evenly distributed across the Y axis, because I have 1 or 2 zero Y points, all the other hundreds of Y points are all compressed at the top of the chart.
Sergey Alexandrovich Kryukov 19-Sep-14 10:30am    
Oh, I see... But I never saw how they are distributed. You decide. Want an idea? Can you make the axes and other detail interactive. Data stay the same, but the look at them, point of view, which includes the linear/log choice, is chosen by a user and can be changed at any moment.
—SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900