android - 如何在 AndroidPlot 的 XYPlot 上隐藏水平范围线?

标签 android androidplot

我想从此 XYPlot 图表中删除水平线:

enter image description here

我已经尝试这样做了:

plot.getGraph().getGridBackgroundPaint().setColor(Color.TRANSPARENT);

并在 XYPlot 的 xml 描述中添加:

ap:rangeLineColor="@color/ap_transparent"

最佳答案

你需要的是调用这两个方法(删除两个背景线),如果你只需要删除水平线就调用第二个。

//this removes the vertical lines
plot.getGraph().setDomainGridLinePaint(null)

//this removes the horizontal lines
plot.getGraph().setRangeGridLinePaint(null)

PS: Obviously you can pass as parameter something different than null to get different results. For example you can pass a custom Paint object based on your needs.

这是将两者都设置为 null 的结果:

XYZ Plot without the background grid

关于android - 如何在 AndroidPlot 的 XYPlot 上隐藏水平范围线?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48620565/

相关文章:

android - 为android选择一个数据库

android - 如何在横向 fragment 布局中显示对话框横向方向?

android - AndroidPlot 的 ProGuard 配置

java - 使用zxing库生成QR时如何在QR码中编码多条记录?

android - Spring 安卓: using RestTemplate with https and cookies

java - AndroidPlot 对数轴?

java - Androidplot 方向传感器中的条形图旋转

android - RangeTickLabel AndroidPlot 的自定义值

android - 添加第二个 Y 轴标题,标记线 + 添加线标题

Android:单选按钮不是独占的