Search code examples
androidandroidplot

Remove Margin AndroidPlot


I'm trying to remove the margins of my Plot on Android. I've implemented AndroidPlot 1.5.1 Library.

That's my xml-Code

        <com.androidplot.xy.XYPlot
        style="@style/APDefacto.Dark"
        android:id="@+id/plot"
        android:layout_width="match_parent"
        android:layout_height="300dp"
        android:layout_below="@id/CubeView"
        android:layout_alignParentBottom="true"
        ap:renderMode="use_background_thread"
        ap:domainLineColor="@color/ap_transparent"
        ap:rangeLineColor="@color/ap_transparent"
        ap:domainOriginLineColor="@color/ap_transparent"
        ap:rangeOriginLineColor="@color/ap_transparent"
        ap:lineLabelTextColorBottom="@color/ap_transparent"
        ap:lineLabelTextColorLeft="@color/ap_transparent"

        />

And that's my java Code

    plot = (XYPlot) findViewById(R.id.plot);

    ecg = new ECGModel(2000);
    MyFadeFormatter formatter =new MyFadeFormatter(2000);
    formatter.setLegendIconEnabled(false);
    plot.addSeries(ecg, formatter);

    plot.setRangeBoundaries(0, 800, BoundaryMode.FIXED);
    plot.setDomainBoundaries(0, 2000, BoundaryMode.FIXED);
    redrawer = new Redrawer(plot, 30, true);

enter image description here


Solution

  • You can replace style="@style/APDefacto.Dark" with style="@style/FullScreenGraph". That should get you pretty close.