Package ptolemy.plot

Examples of ptolemy.plot.Histogram


    /** Create a new Histogram plot.
     *  @return A new plot object.
     */
    protected PlotBox _newPlot() {
        return new Histogram();
    }
View Full Code Here


                    ((Histogram) _plot).setBars(width, offset);
                }
            } else if (elementName.equals("bin")) {
                // Ignore if plot is not an instance of Histogram.
                if (_plot instanceof Histogram) {
                    Histogram histogram = (Histogram) _plot;
                    String widthSpec = (String) _attributes.get("width");
                    String offsetSpec = (String) _attributes.get("offset");

                    // NOTE: If only one of these is given, then the other
                    // is ignored.
                    if ((widthSpec != null) && (offsetSpec != null)) {
                        double width = (Double.valueOf(widthSpec))
                                .doubleValue();
                        histogram.setBinWidth(width);

                        double offset = (Double.valueOf(offsetSpec))
                                .doubleValue();
                        histogram.setBinOffset(offset);
                    }
                }
            } else if (elementName.equals("dataset")) {
                // Override the base class to ignore things irrelevant
                // to histograms...
View Full Code Here

    /** Create a new Plot object for the applet.  Derived classes can
     *  redefine this method to return a different type of plot object.
     */
    public PlotBox newPlot() {
        return new Histogram();
    }
View Full Code Here

    /** Construct a plot with the specified command-line arguments.
     *  @param args The command-line arguments.
     *  @exception Exception If command line arguments have problems.
     */
    public HistogramMLApplication(String[] args) throws Exception {
        this(new Histogram(), args);
    }
View Full Code Here

    public static void main(final String[] args) {
        try {
            Runnable doActions = new Runnable() {
                public void run() {
                    try {
                        new HistogramMLApplication(new Histogram(), args);
                    } catch (Exception ex) {
                        System.err.println(ex.toString());
                        ex.printStackTrace();
                    }
                }
View Full Code Here

TOP

Related Classes of ptolemy.plot.Histogram

Copyright © 2018 www.massapicom. 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.