Search code examples
androidmarkerpointsandroidplot

AndroidPlot invisible markers


I am adding real time data to an XY Plot. How can I remove the graph's dots/markers or make them invisible? I cannot find the according method in the java doc.

mSimpleXYPlot.getGraphWidget().setDrawMarkersEnabled(false);

is not working for me. Thanks


Solution

  • There are a few different options.

    //Sets all grid lines to transparent
    mySimpleXYPlot.getGraphWidget().getGridLinePaint().setColor(Color.TRANSPARENT);
    
    //Sets only the domain lines to transparent
    mySimpleXYPlot.getGraphWidget().getGridDomainLinePaint().setColor(Color.TRANSPARENT);
    
    //Sets only the range lines to transparent
    mySimpleXYPlot.getGraphWidget().getGridRangeLinePaint().setColor(Color.TRANSPARENT);
    

    And of course you can set the grid lines to any color this way, not just transparent.

    I hope this helps.