나는 그래프 그리기 응용 프로그램이 있으며 그래프는 다음과 같습니다. 무엇 내가 알 필요가AndroidPlot에서 플롯 된 점의 격자를 확인하십시오.
은 가능 이런 같은 형식 (ROW_INDEX, column_index) 또는 뭔가 말을 ... 점 플롯 된 아 격자를 아는 것입니다. 사실 그것이 가능한 시나리오인지 여부를 모르겠습니다. 그래서 이것을 할 방법이 없다면 저에게 알려주세요. 내 그래프 구성 방법은 다음과 같습니다. 사전에
private void configureGraph() {
/**
* ecgPlot corresponds to XYPlot
*/
XYGraphWidget graph = ecgPlot.getGraph();
/**
* Paint to denote line color
*/
Paint paint = new Paint();
paint.setColor(Color.WHITE);
paint.setStrokeWidth(3.0f);
/**
* Setting graph x and y boundary values
*/
ecgPlot.setRangeBoundaries(-40, 40, BoundaryMode.FIXED);
ecgPlot.setDomainBoundaries(0, 1500, BoundaryMode.FIXED);
ecgPlot.setPlotPadding(-10, 0, 0, 0);
/**
* Removes default bkg - ie; black
*/
ecgPlot.setBackgroundPaint(null);
graph.setBackgroundPaint(null);
graph.setGridBackgroundPaint(null);
/**
* Adjusting grid line width
*/
graph.getDomainGridLinePaint().setStrokeWidth(4.0f);
graph.getRangeGridLinePaint().setStrokeWidth(4.0f);
graph.getDomainSubGridLinePaint().setStrokeWidth(1.0f);
graph.getRangeSubGridLinePaint().setStrokeWidth(1.0f);
/**
* Removes border
*/
ecgPlot.setBorderPaint(null);
/**
* Setting grid color
*/
graph.getDomainGridLinePaint().setColor(getResources().getColor(R.color.colorECGGrid));
graph.getRangeGridLinePaint().setColor(getResources().getColor(R.color.colorECGGrid));
graph.getRangeSubGridLinePaint().setColor(getResources().getColor(R.color.colorECGGrid));
graph.getDomainSubGridLinePaint().setColor(getResources().getColor(R.color.colorECGGrid));
/**
* Setting number of sub grid lines per grid
*/
graph.setLinesPerDomainLabel(5);
graph.setLinesPerRangeLabel(5);
ecgPlot.setRangeStep(StepMode.INCREMENT_BY_VAL, 1);
ecgPlot.setDomainStepValue(75);
ecgPlot.setLinesPerDomainLabel(5);
ecgPlot.setDomainLabel(null);
ecgPlot.setRangeLabel(null);
Paint paintTest = new Paint();
paintTest.setColor(Color.TRANSPARENT);
paintTest.setStrokeWidth(3.0f);
ecgLinePointFormatter.setLegendIconEnabled(false);
// PointLabelFormatter pointLabelFormatter = new PointLabelFormatter();
// pointLabelFormatter.setTextPaint(paint);
}
감사
위의 그리드의 5x5 섹션을 의미하는 subgrid로 확인 하시겠습니까? – Nick
예. 정확히 @Nick –
그리드 간격과 특정 도메인/범위 경계 설정을 정의하는 코드 부분을 보여줄 수 있습니까? (당신이 당신의 요구가 그 변수들에 달려있는 것을 이루는 방법) – Nick