简体   繁体   中英

Fix (freeze) y axis for Android GraphView package

I need a way to fix the y axis for the graph view package. I am showing real time frequency spectra but it is not possible to visualise the data properly as the y axis adjusts to the current largest value. Please advise. I will offer a bounty to any answer that easily solves my problem.

Package: http://android-graphview.org/#documentation

If you know the range if Y axis, the method setManualYAxisBounds(max,min) can be used. For example, if you are using a sin function,

graphView.setManualYAxisBounds(1,-1);

Or if yours is a percentage graph,

graphView.setManualYAxisBounds(100,0);

If you have the values to be plotted in an array, again the method can be used with the max and min values of the array (with formatting looks neater).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM