Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hello, how to get the spectrum of the coordinate array, I am a novice, hope to get your help #1

Open
zhubinsheng opened this issue Apr 30, 2021 · 1 comment

Comments

@zhubinsheng
Copy link

No description provided.

@berkiyo
Copy link
Owner

berkiyo commented Jun 14, 2021

Hi there,

Apologies for the late reply, while it has been a long time since I have updated Spectrum, I believe what you are after is how the graphview is used and what the coordinates are.

Most of the graphview plotting is done in the MainActivity and I am using the following libraries to achieve this:

import com.jjoe64.graphview.*;
import com.jjoe64.graphview.series.DataPoint;import com.jjoe64.graphview.series.LineGraphSeries;

Depending on what you are after, you may want to check out some of my graphview functions to get the graph coordinate system setup:

    public void initGraph(GraphView graph) {
        graph.getViewport().setXAxisBoundsManual(true);
        graph.getViewport().setMinX(0);
        graph.getViewport().setMaxX(10);

        graph.getGridLabelRenderer().setLabelVerticalWidth(100);

        // first mSeries is a line
        mSeries = new LineGraphSeries<>();
        mSeries.setDrawDataPoints(true);
        mSeries.setDrawBackground(true);
        graph.addSeries(mSeries);
    }

Hope this helps. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants