File tree Expand file tree Collapse file tree 1 file changed +41
-0
lines changed Expand file tree Collapse file tree 1 file changed +41
-0
lines changed Original file line number Diff line number Diff line change
1
+ # JMathPlot: interactive 2D and 3D plots #
2
+
3
+ Provides interactive 2D/3D plot (without openGL) :
4
+
5
+ 2D/3D scatter plot
6
+ 2D/3D line plot
7
+ 2D staircase plot
8
+ 2D/3D histogram plot
9
+ 2D/3D boxplot
10
+ 3D grid plot
11
+ 2D/3D quantiles on plots
12
+
13
+ Note: for a true OpenGL java plot library, try the good jzy3d project
14
+
15
+ ## Example Java code ##
16
+
17
+ ``` java
18
+ import org.math.plot.* ;
19
+ ...
20
+
21
+ double [] x = ...
22
+ double [] y = ...
23
+
24
+ // create your PlotPanel (you can use it as a JPanel)
25
+ Plot2DPanel plot = new Plot2DPanel ();
26
+
27
+ // add a line plot to the PlotPanel
28
+ plot. addLinePlot(" my plot" , x, y);
29
+
30
+ // put the PlotPanel in a JFrame, as a JPanel
31
+ JFrame frame = new JFrame (" a plot panel" );
32
+ frame. setContentPane(plot);
33
+ frame. setVisible(true );
34
+ ```
35
+
36
+ ## Use it ##
37
+
38
+ - put jmathplot.jar in your java classpath
39
+ - create a new PlotPanel instance: PlotPanel plot = new Plot2DPanel();
40
+ - add a plot inside plot.addLinePlot("my plot", x, y);
41
+ - use the PlotPanel as any Swing component (all PlotPanel extends JPanel, in fact)
You can’t perform that action at this time.
0 commit comments