1
有沒有辦法讓AndroidPlot XYPlot的圖形填充整個視圖而沒有填充?有一個GraphWidget在AndroidPlot中填充整個視圖
我特別談到在左邊,我標誌着圖像紅色空間:
我的目標是覆蓋在圖表上的圖像,並把它與父意見平齊邊界。我已經刪除了我的XYPlot的子類中的所有標籤,通過將它們的Paint設置爲null,它們將佔用的空間仍然存在。
這裏是我設置的情節:
public void setup() {
this.setBackgroundPaint(null);
setPlotMarginLeft(0);
setRangeBoundaries(-2, 2, BoundaryMode.FIXED);
setDomainBoundaries(0, HISTORY_SIZE, BoundaryMode.FIXED);
XYGraphWidget g = getGraphWidget();
g.setDomainLabelPaint(null);
g.setRangeLabelPaint(null);
g.setDomainOriginLabelPaint(null);
g.setRangeOriginLabelPaint(null);
g.setGridBackgroundPaint(null);
g.setGridPaddingLeft(0);
g.setGridPaddingRight(0);
g.setMarginLeft(0);
g.setBackgroundPaint(null);
g.position(-0.5f, XLayoutStyle.RELATIVE_TO_RIGHT,
-0.5f, YLayoutStyle.RELATIVE_TO_BOTTOM,
AnchorPosition.CENTER);
g.setSize(new SizeMetrics(
0, SizeLayoutType.FILL,
0, SizeLayoutType.FILL));
LayoutManager l = getLayoutManager();
l.remove(this.getDomainLabelWidget());
l.remove(this.getRangeLabelWidget());
l.remove(getLegendWidget());
mSeries = new SimpleXYSeries("Azimuth");
mSeries.useImplicitXVals();
addSeries(mSeries, new LineAndPointFormatter(Color.BLACK, null, null, null));
}