Created
January 9, 2015 00:04
-
-
Save digorithm/47873ced1f8a4f872a00 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import javax.swing.JFrame; | |
import org.math.plot.*; | |
public class InitialData{ | |
public static double[] x = {2, 4, 6, 8}; | |
public static double[] y = {2, 5, 5, 8}; | |
public void plotData(){ | |
Plot2DPanel plot = new Plot2DPanel(); | |
plot.addScatterPlot("X-Y", this.x, this.y); | |
JFrame frame = new JFrame("Original X-Y Data"); | |
frame.setContentPane(plot); | |
frame.setSize(600, 600); | |
frame.setVisible(true); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment