Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Androidplot: Improve Axis layout (remove cutoff values)

On Androidplot my Axis Vals are cut off, so the last values are only shown half. How to fix this issue?

like image 601
arket Avatar asked Dec 28 '22 01:12

arket


2 Answers

In case the solution by Coretek doesn't work for you, as it did not for me, I found this solution to produce the desired output:

YOURPLOT.getGraphWidget().setGridPaddingRight(AmountOfSpaceDesired);
YOURPLOT.getGraphWidget().setGridPaddingTop(AmountOfSpaceDesired);

This will not just move your axis to no longer be cut off, but also your graph. I wanted a little extra space on the top where I previously had a point touching along with the right side where another point was touching.

I hope this can help someone as it has helped me.

like image 76
buczek Avatar answered Jan 15 '23 11:01

buczek


dynamicPlot.getGraphWidget().setMarginTop(4);
dynamicPlot.getLegendWidget().setHeight(14);

Luckly I still found something in the androidplot forums cache.

like image 42
arket Avatar answered Jan 15 '23 09:01

arket