gpt4 book ai didi

AndroidPlot 设置网格间距

转载 作者:塔克拉玛干 更新时间:2023-11-03 00:40:56 24 4
gpt4 key购买 nike

我想知道如何使用 AndroidPlot 更改网格间距.我的网格目前有 9 行域和 9 行范围,我不知道这是从哪里来的。

此外,如果您碰巧知道如何使图形线条粗一点,我们将不胜感激。

最后两点应该得到修复,我已经搜索了一段时间。

我几乎已经找到了“让其他一切看起来都漂亮”的方法。

非常感谢您的帮助和时间。

最佳答案

如何改变GRID(两种可能的方式):

plot.setRangeStep(XYStepMode.INCREMENT_BY_VAL, 125);
plot.setDomainStep(XYStepMode.SUBDIVIDE, 16);

如何改变图线的粗细:您需要完全按照这种方式更改您正在使用的 LineAndPointFormatter(使用 lineAndPointFormatter 的当前 Paint 初始化 Paint 是必不可少的,否则您会得到非常奇怪的行为):

LineAndPointFormatter lineAndPointFormatter = new LineAndPointFormatter(
Color.rgb(0, 0, 0), null, null);

//change the line width
Paint paint = lineAndPointFormatter.getLinePaint();
paint.setStrokeWidth(3);
lineAndPointFormatter.setLinePaint(paint);

// create a series using a temporary formatter, with a transparent fill
// applied immediately
xyPlot.addSeries(currentConsumptionSeries, lineAndPointFormatter);

关于AndroidPlot 设置网格间距,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10625920/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com