Vishal
Vishal

Reputation: 39

Androidplot: How can I disable the X and Y axes lines while using the androidplot library?

I am developing an app, for which I am using androidplot library. My requirement is to draw a curved graph - very similar to what is shown here

I am able to draw the smooth graph fine, but I want to remove the X and Y axes that are shown along with the graph. I need to display ONLY the waveform graph and not the X and Y co-ordinates. Is this possible? If so, how I can I achieve this?

Thanks in advance.

Upvotes: 1

Views: 754

Answers (1)

Nick
Nick

Reputation: 8317

It would be helpful to see what you currently have, but going from the image you provided it sounds like you want to:

  • Remove domain and range grid lines
  • Remove vertices from the plotted line.

To remove domain & range grid lines, add this to your plot's xml:

ap:domainLineColor="@color/ap_transparent"
ap:rangeLineColor="@color/ap_transparent"
ap:domainOriginLineColor="@color/ap_transparent"
ap:rangeOriginLineColor="@color/ap_transparent"

To remove vertices from your plotted line, just pass in a null value for the vertex param of your LineAndPointFormatter's constructor. For example, this would draw a read line with no fill or vertices:

LineAndPointFormatter myLineFormat = new LineAndPointFormatter(Color.RED, null, null, null);

Upvotes: 3

Related Questions