Created
February 14, 2019 01:13
-
-
Save gkhays/710d84188eff5a1155d736418fd05f4d to your computer and use it in GitHub Desktop.
Java plot example from BeakerX. See https://nbviewer.jupyter.org/github/twosigma/beakerx/blob/master/doc/java/Java.ipynb.
This file contains hidden or 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 java.util.List; | |
import java.util.ArrayList; | |
import com.twosigma.beakerx.chart.xychart.Plot; | |
import com.twosigma.beakerx.chart.xychart.plotitem.*; | |
import com.twosigma.beakerx.chart.Color; | |
Plot p = new Plot(); | |
p.setTitle("this is a Java plot"); | |
Bars b = new Bars(); | |
List<Number> yList = new ArrayList<Number>(); | |
yList.add(2); | |
yList.add(5); | |
yList.add(4); | |
yList.add(8); | |
b.setY(yList); | |
b.setColor(Color.blue); | |
b.setWidth(0.5); | |
p.add(b); | |
return p; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Results:
