title: Identify the grid of a plotted point in AndroidPlot
body: <p>I have an ecg graph plotting application and the graph looks like this.</p>
  
  <p><a href="https://i.stack.imgur.com/KcNzA.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/KcNzA.jpg" alt="enter image description here"></a></p>
  
  <p>What I need to know is,is it possible to know the subgrid in which the point is plotted... say in a format like (row_index,column_index) or something like this. Actually I don't know whether it is a possible scenario. So if there is no way to do this please let me know.
  Given below is my graph configuring method.</p>
  
  <pre><code>  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);
  
  }                                                                                                            
  </code></pre>
  
  <p>Thanks in advance</p>