Package ptolemy.plot

Examples of ptolemy.plot.Plot.addPoint()


            plot.addPoint(3, i, 3.5 * Math.cos((Math.PI * i) / 35), !first);
            plot.addPoint(4, i, 3 * Math.cos((Math.PI * i) / 40), !first);
            plot.addPoint(5, i, 2.5 * Math.cos((Math.PI * i) / 45), !first);
            plot.addPoint(6, i, 2 * Math.cos((Math.PI * i) / 50), !first);
            plot.addPoint(7, i, 1.5 * Math.cos((Math.PI * i) / 55), !first);
            plot.addPoint(8, i, 1 * Math.cos((Math.PI * i) / 60), !first);
            plot.addPoint(9, i, 0.5 * Math.cos((Math.PI * i) / 65), !first);
            first = false;
        }
    }
}
View Full Code Here


            plot.addPoint(4, i, 3 * Math.cos((Math.PI * i) / 40), !first);
            plot.addPoint(5, i, 2.5 * Math.cos((Math.PI * i) / 45), !first);
            plot.addPoint(6, i, 2 * Math.cos((Math.PI * i) / 50), !first);
            plot.addPoint(7, i, 1.5 * Math.cos((Math.PI * i) / 55), !first);
            plot.addPoint(8, i, 1 * Math.cos((Math.PI * i) / 60), !first);
            plot.addPoint(9, i, 0.5 * Math.cos((Math.PI * i) / 65), !first);
            first = false;
        }
    }
}
View Full Code Here

        for (int j = 2; j <= 10; j++) {
            plot.addLegend(j, j + " sinusoids");
        }

        boolean first = true;
        plot.addPoint(0, 0.0, 0.0, false);

        for (int i = 0; i <= 400; i++) {
            double approximation = 0.0;

            for (int j = 1; j <= 10; j++) {
View Full Code Here

            for (int j = 1; j <= 10; j++) {
                double sig = (4.0 * Math
                        .sin((i * 2.0 * Math.PI * ((2 * j) - 1)) / 400.0))
                        / (Math.PI * ((2 * j) - 1));
                approximation += sig;
                plot.addPoint(j, i, approximation, !first);
            }

            first = false;

            if (i <= 200) {
View Full Code Here

            }

            first = false;

            if (i <= 200) {
                plot.addPoint(0, i, 1.0, true);
            }

            if (i >= 200) {
                plot.addPoint(0, i, -1.0, true);
            }
View Full Code Here

            if (i <= 200) {
                plot.addPoint(0, i, 1.0, true);
            }

            if (i >= 200) {
                plot.addPoint(0, i, -1.0, true);
            }
        }

        plot.addPoint(0, 400.0, 0.0, true);
    }
View Full Code Here

            if (i >= 200) {
                plot.addPoint(0, i, -1.0, true);
            }
        }

        plot.addPoint(0, 400.0, 0.0, true);
    }
}
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.