Skip to content

Commit 2526bad

Browse files
authored
Merge pull request #6 from tferr/patch-1
README: include links to demos
2 parents 1c909ab + 9d0855b commit 2526bad

1 file changed

Lines changed: 19 additions & 0 deletions

File tree

README.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,22 @@
33
# SciJava PlotService
44

55
UI-independent framework for creating scientific plots.
6+
7+
8+
# Usage and Demos
9+
10+
Run the following Groovy snippet from the [Script Editor](https://github.com/scijava/script-editor):
11+
12+
```groovy
13+
#@ UIService uiService
14+
#@ PlotService plotService
15+
16+
plot = plotService.newXYPlot()
17+
plot.setTitle("XY Plot")
18+
series = plot.addXYSeries()
19+
series.setLabel("Series 1")
20+
series.setValues([1,2,3], [7,3,9])
21+
uiService.show(plot)
22+
```
23+
24+
Several Java demos (XY, BoxPlot, Category plots, etc.) are available in [scijava-ui-swing](https://github.com/scijava/scijava-ui-swing/tree/909e16b5cbf1b92e1d8ccce96a3521050c93174a/src/test/java/org/scijava/ui/swing/viewer/plot).

0 commit comments

Comments
 (0)