0

I have been using GraphView library for my project and it has been working fine for everything except for one graph - which needs to plot (X,Y) coordinates.It plots everything but wherever the x coordinate is negative, it doesn't show anything on the graph.

Apparently, GraphView library has no way out where a graph with values on neg. x axis can be displayed. Could anyone please help me out with this?

if(flag == 0){
    gvs_Y_DistanceData.appendData(new GraphViewData(new_point.x(), new_point.y()), false);      writerobject.writeToFile(new_point.x()+"\t"+new_point.y()+"\n");
    gvPathPlot.redrawAll();
    }
else if(flag ==1){
    gvs_Y_DistanceData.appendData(new GraphViewData(init_point.x(), init_point.y()), false);
    writerobject.writeToFile(init_point.x()+"\t"+init_point.y()+"\n");
    gvPathPlot.redrawAll();
    }
Arjun
  • 1
  • 1

1 Answers1

0

you could do a bad workaround. If you know you maximal negativ number, you could offset all x values with this number. And then you have to write a custom label formatter, that labels the x value minus that offset.

appsthatmatter
  • 6,347
  • 3
  • 36
  • 40