import java.awt.Color; import plotter.Graphic; import plotter.Plotter; import plotter.LineStyle; public class LineStyleDemo { Graphic graphic = new Graphic("LineStyle Demo"); Plotter plotter = graphic.getPlotter(); public static void main(String[] args) { (new LineStyleDemo()).demo(); } private void demo() { // Beispiel mit zwei Datensaetzen, einmal ohne Schluessel, einmal mit Schluessel // "Kreise" plotter.setDataLineStyle("Kreise", LineStyle.SYMBOL); plotter.setDataColor("Kreise", Color.BLACK); plotter.setSymbolSize(10); plotter.setYLine(0); for (double x = 0.001; x < 5 * Math.PI; x += 0.01) { double y = Math.sin(x) / x; plotter.add(x, y); if (Math.abs(y) < 0.001) { // Nullstelle? plotter.add("Kreise", x, y); } } } }