Skip to content

Commit 41e8759

Browse files
committed
Create README.md
1 parent bb49b06 commit 41e8759

File tree

1 file changed

+41
-0
lines changed

1 file changed

+41
-0
lines changed

README.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
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)

0 commit comments

Comments
 (0)