Examples of addSubtitle()


Examples of org.jfree.chart.JFreeChart.addSubtitle()

            "Military Spending 2008 - Top 10 Countries",
            dataset, false, // legend?
            true, // tooltips?
            false // URLs?
            );
        chart.addSubtitle(new TextTitle("http://en.wikipedia.org/wiki/List_of_countries_by_military_expenditures"));
        PiePlot plot = (PiePlot) chart.getPlot();
        plot.setLabelGenerator(new StandardPieSectionLabelGenerator("{0} ({2})"));
        plot.setBackgroundPaint(Color.WHITE);
        plot.setOutlinePaint(null);
View Full Code Here

Examples of org.jfree.chart.JFreeChart.addSubtitle()

      titleStr = "weighted " + titleStr;
    JFreeChart chart = new JFreeChart(titleStr, TextTitle.DEFAULT_FONT,
        plot, false);
    LegendTitle legend = new LegendTitle(plot);
    legend.setPosition(RectangleEdge.BOTTOM);
    chart.addSubtitle(legend);
    ChartUtilities.applyCurrentTheme(chart);
    return chart;

  }
View Full Code Here

Examples of org.jfree.chart.JFreeChart.addSubtitle()

                false);
        if (!title.equals("")) {
            TextTitle source = new TextTitle(fileName);
            source.setFont(new Font("SanSerif", Font.PLAIN, 12));
            source.setPosition(RectangleEdge.TOP);
            chart.addSubtitle(source);
        }
        chart.getTitle().setFont(new Font("Tahoma", Font.PLAIN, 13));
        final XYPlot plot = chart.getXYPlot();
        if (shapeRenderer) {
            plot.setRenderer(renderer);
View Full Code Here

Examples of org.jfree.chart.JFreeChart.addSubtitle()

    JFreeChart chart = ChartFactory.createScatterPlot(
        "Dependency Scatter Plot", firstValue.text() + "  " + firstValue.unit(),
        secondValue.text() + "  " + secondValue.unit(), dataCol,
        PlotOrientation.HORIZONTAL, true, true, false);
    chart.addSubtitle(new TextTitle("Each dot represents the value combination of one edge\n" +
        "Only non-zero values are considered"));
    ChartFrame frame = new ChartFrame("Dependency Scatter Plot", chart);
    frame.setIconImage(Toolkit.getDefaultToolkit().getImage(
        GenericGraphs.class.getClassLoader().getResource("chart.png")));
    frame.pack();
View Full Code Here

Examples of org.jfree.chart.JFreeChart.addSubtitle()

        PlotOrientation.VERTICAL, true, // include legend
        true, // tooltips
        false // urls
        );
   
    chart.addSubtitle(new TextTitle("Only values > 0 are taken into account"));
    //configure domain axis (interval numbers and simulation steps
    final XYPlot plot = chart.getXYPlot();
    NumberAxis stepAxis = (NumberAxis) plot.getDomainAxis();
    stepAxis.setAutoTickUnitSelection(false);
    stepAxis.setTickUnit(new NumberTickUnit(
View Full Code Here

Examples of org.jfree.chart.JFreeChart.addSubtitle()

        // return a new chart containing the overlaid plot...
        JFreeChart chart = new JFreeChart("CombinedXYPlotDemo1",
                JFreeChart.DEFAULT_TITLE_FONT, cplot, false);
        chart.setBackgroundPaint(Color.white);
        LegendTitle legend = new LegendTitle(cplot);
        chart.addSubtitle(legend);
        return chart;
    }

    /**
     * Creates a sample dataset.  You wouldn't normally hard-code the
View Full Code Here

Examples of org.jfree.chart.JFreeChart.addSubtitle()

        assertTrue(chart1.equals(chart2));

        // subtitles
        chart1.addSubtitle(new TextTitle("Subtitle"));
        assertFalse(chart1.equals(chart2));
        chart2.addSubtitle(new TextTitle("Subtitle"));
        assertTrue(chart1.equals(chart2));

        // plot
        chart1 = new JFreeChart("Title",
                new Font("SansSerif", Font.PLAIN, 12), new RingPlot(), false);
View Full Code Here

Examples of org.jfree.chart.JFreeChart.addSubtitle()

        DefaultPieDataset dataset = new DefaultPieDataset();
        JFreeChart chart = ChartFactory.createPieChart("title", dataset, true,
                false, false);

        TextTitle t0 = new TextTitle("T0");
        chart.addSubtitle(0, t0);
        assertEquals(t0, chart.getSubtitle(0));

        TextTitle t1 = new TextTitle("T1");
        chart.addSubtitle(t1);
        assertEquals(t1, chart.getSubtitle(2))// subtitle 1 is the legend
View Full Code Here

Examples of org.jfree.chart.JFreeChart.addSubtitle()

        TextTitle t0 = new TextTitle("T0");
        chart.addSubtitle(0, t0);
        assertEquals(t0, chart.getSubtitle(0));

        TextTitle t1 = new TextTitle("T1");
        chart.addSubtitle(t1);
        assertEquals(t1, chart.getSubtitle(2))// subtitle 1 is the legend

        boolean pass = false;
        try {
            chart.addSubtitle(null);
View Full Code Here

Examples of org.jfree.chart.JFreeChart.addSubtitle()

        chart.addSubtitle(t1);
        assertEquals(t1, chart.getSubtitle(2))// subtitle 1 is the legend

        boolean pass = false;
        try {
            chart.addSubtitle(null);
        }
        catch (IllegalArgumentException e) {
            pass = true;
        }
        assertTrue(pass);
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.