Example usage for java.awt Color blue

List of usage examples for java.awt Color blue

Introduction

In this page you can find the example usage for java.awt Color blue.

Prototype

Color blue

To view the source code for java.awt Color blue.

Click Source Link

Document

The color blue.

Usage

From source file:de.fub.maps.project.detector.model.inference.ui.charts.AttributeSelectionBarChart.java

/**
 * Creates new form AttributeSelectionBarChart
 *///  ww  w .  j  av a2s.  c o m
public AttributeSelectionBarChart() {
    initComponents();
    barChart = ChartFactory.createBarChart(
            NbBundle.getMessage(AttributeSelectionBarChart.class, "AttributeSelectionBarChart.CLT_Chart_Title"),
            NbBundle.getMessage(AttributeSelectionBarChart.class,
                    "AttributeSelectionBarChart.CLT_Domain_Axis_Name"),
            NbBundle.getMessage(AttributeSelectionBarChart.class,
                    "AttributeSelectionBarChart.CLT_Value_Axis_Name"),
            dataset, PlotOrientation.VERTICAL, true, true, true);
    plot = barChart.getCategoryPlot();
    Font font = new JLabel().getFont().deriveFont(Font.BOLD, 14);

    barChart.getTitle().setFont(font);
    barChart.getTitle().setPaint(new Color(153, 153, 153));

    plot.setRangeAxisLocation(0, AxisLocation.TOP_OR_LEFT);

    plot.setBackgroundPaint(Color.white);
    plot.getRangeAxis().setAutoRange(true);
    plot.getRangeAxis().setUpperMargin(.1);

    BarRenderer barRenderer = new BarRenderer();
    barRenderer.setBarPainter(new StandardBarPainter());
    barRenderer.setBaseToolTipGenerator(new StandardCategoryToolTipGenerator());
    barRenderer.setBaseFillPaint(Color.BLUE);
    barRenderer.setBasePaint(Color.BLUE);
    barRenderer.setAutoPopulateSeriesFillPaint(false);
    barRenderer.setAutoPopulateSeriesPaint(false);
    barRenderer.setBaseItemLabelGenerator(new StandardCategoryItemLabelGenerator(
            StandardCategoryItemLabelGenerator.DEFAULT_LABEL_FORMAT_STRING, new CustomNumberFormat()));
    barRenderer.setBaseItemLabelsVisible(true);

    plot.setRenderer(barRenderer);
    chartPanel = new ChartPanel(barChart, false);
    chartPanel.setVerticalAxisTrace(false);
    add(chartPanel, BorderLayout.CENTER);
}

From source file:org.pentaho.chart.plugin.jfreechart.dial.JFreeDialChartGeneratorIT.java

public void testPlotStyle() throws Exception {
    JFreeChart chart = getJFreeChart("testchart.xml", new Object[][] { { 8D } }); //$NON-NLS-1$
    DialPlot plot = (DialPlot) chart.getPlot();
    DoubleLineDialFrame frame = (DoubleLineDialFrame) plot.getDialFrame();
    assertEquals(frame.getForegroundPaint(), Color.RED);
    assertEquals(frame.getInnerForegroundPaint(), Color.BLUE);
    assertEquals(frame.getBackgroundPaint(), Color.WHITE);
    assertEquals(/* w  w w.  j a  va2  s .c o m*/
            String.format("expected: %s but was: %s", 3D, ((BasicStroke) frame.getStroke()).getLineWidth()), //$NON-NLS-1$
            frame.getStroke(),
            new BasicStroke(3F));
}

From source file:DashboardInterface.CableOutSpeedDial.java

public CableOutSpeedDial(JPanel parentIn) {
    super(new BorderLayout());
    parent = parentIn;/*www.jav a2  s .  com*/
    dataset1 = new DefaultValueDataset(0D);
    dataset2 = new DefaultValueDataset(0D);
    pipe = MessagePipeline.getInstance();
    pipe.attach(this);
    DialPlot dialplot = new DialPlot();
    dialplot.setView(0.0D, 0.0D, 1.0D, 1.0D);
    dialplot.setDataset(0, dataset1);
    dialplot.setDataset(1, dataset2);
    setBackground(Color.WHITE);
    StandardDialFrame standarddialframe = new StandardDialFrame();
    standarddialframe.setBackgroundPaint(Color.lightGray);
    standarddialframe.setForegroundPaint(Color.darkGray);

    dialplot.setDialFrame(standarddialframe);

    DialBackground dialbackground = new DialBackground(Color.LIGHT_GRAY);

    dialbackground.setGradientPaintTransformer(
            new StandardGradientPaintTransformer(GradientPaintTransformType.VERTICAL));
    dialplot.setBackground(dialbackground);

    DialTextAnnotation dialtextannotation = new DialTextAnnotation("Cable Out (ft)");
    dialtextannotation.setFont(new Font("Dialog", 1, 12));
    dialtextannotation.setPaint(new Color(36, 130, 9));
    dialtextannotation.setRadius(0.47999999999999996D);
    dialplot.addLayer(dialtextannotation);

    DialTextAnnotation dialtextannotation2 = new DialTextAnnotation("Speed (kts)");
    dialtextannotation2.setFont(new Font("Dialog", 1, 12));
    dialtextannotation2.setPaint(Color.BLUE);
    dialtextannotation2.setRadius(0.78999999999999996D);
    dialplot.addLayer(dialtextannotation2);

    /*DialValueIndicator dialvalueindicator = new DialValueIndicator(0);
    dialvalueindicator.setFont(new Font("Dialog", 0, 10));
    dialvalueindicator.setOutlinePaint(Color.BLACK);
    dialvalueindicator.setRadius(0.84999999999999998D);
    dialvalueindicator.setAngle(-90D);
    dialplot.addLayer(dialvalueindicator);
            
    DialValueIndicator dialvalueindicator1 = new DialValueIndicator(1);
    dialvalueindicator1.setFont(new Font("Dialog", 0, 10));
    dialvalueindicator1.setOutlinePaint(Color.BLACK);
    dialvalueindicator1.setRadius(0.60999999999999998D);
    dialvalueindicator1.setAngle(-90D);
    dialplot.addLayer(dialvalueindicator1);*/

    StandardDialScale standarddialscale = new StandardDialScale(0D, 90D, -110D, -320D, 10D, 4);
    standarddialscale.setTickRadius(0.88D);
    standarddialscale.setTickLabelOffset(0.14999999999999999D);
    standarddialscale.setTickLabelFont(new Font("Dialog", 0, 14));
    standarddialscale.setMajorTickPaint(Color.BLUE);
    standarddialscale.setMinorTickPaint(Color.BLUE);
    dialplot.addScale(0, standarddialscale);

    StandardDialScale standarddialscale1 = new StandardDialScale(0.0D, 6000D, -110D, -320D, 750D, 4);
    standarddialscale1.setTickRadius(0.5D);
    standarddialscale1.setTickLabelOffset(0.14999999999999999D);
    standarddialscale1.setTickLabelFont(new Font("Dialog", 0, 10));
    standarddialscale1.setTickLabelPaint(new Color(36, 130, 9));
    standarddialscale1.setMajorTickPaint(new Color(36, 130, 9));
    standarddialscale1.setMinorTickPaint(new Color(36, 130, 9));
    dialplot.addScale(1, standarddialscale1);

    dialplot.mapDatasetToScale(1, 1);

    org.jfree.chart.plot.dial.DialPointer.Pointer pointer = new org.jfree.chart.plot.dial.DialPointer.Pointer(
            0);
    pointer.setFillPaint(Color.BLUE);
    dialplot.addPointer(pointer);

    org.jfree.chart.plot.dial.DialPointer.Pointer pin = new org.jfree.chart.plot.dial.DialPointer.Pointer(1);
    pin.setRadius(0.55000000000000004D);
    pin.setFillPaint(new Color(36, 130, 9));
    dialplot.addPointer(pin);

    DialCap dialcap = new DialCap();
    dialcap.setRadius(0.10000000000000001D);
    dialplot.setCap(dialcap);

    Dimension size = parent.getBounds().getSize();
    int width = parent.getWidth();
    int height = parent.getHeight();

    width = 200;

    JFreeChart jfreechart = new JFreeChart(dialplot);
    jfreechart.setBackgroundPaint(Color.WHITE);
    ChartPanel chartpanel = new ChartPanel(jfreechart);
    chartpanel.setPreferredSize(new Dimension(width, width));

    add(chartpanel);
}

From source file:com.att.aro.ui.view.diagnostictab.plot.BurstPlot.java

public void populate(XYPlot plot, AROTraceData analysis) {

    if (analysis != null) {
        burstDataCollection.removeAllSeries();
        Map<BurstCategory, XYIntervalSeries> seriesMap = new EnumMap<BurstCategory, XYIntervalSeries>(
                BurstCategory.class);
        final Map<BurstCategory, List<Burst>> burstMap = new HashMap<BurstCategory, List<Burst>>();
        for (BurstCategory eventType : BurstCategory.values()) {
            XYIntervalSeries series = new XYIntervalSeries(eventType);
            seriesMap.put(eventType, series);
            burstDataCollection.addSeries(series);
            burstMap.put(eventType, new ArrayList<Burst>());
        }//from  w w  w. ja  va 2 s. c  o m
        final List<Burst> burstStates = analysis.getAnalyzerResult().getBurstcollectionAnalysisData()
                .getBurstCollection();
        Iterator<Burst> iter = burstStates.iterator();
        while (iter.hasNext()) {
            Burst currEvent = iter.next();
            if (currEvent != null) {
                BurstCategory burstState = currEvent.getBurstCategory();
                if (burstState != null) {
                    seriesMap.get(burstState).add(currEvent.getBeginTime(), currEvent.getBeginTime(),
                            currEvent.getEndTime(), 0.5, 0, 1);
                    burstMap.get(burstState).add(currEvent);
                }
            }
        }

        Color myGreen = new Color(34, 177, 76);
        Color lightGreen = new Color(134, 232, 162);

        XYItemRenderer renderer = plot.getRenderer();
        renderer.setSeriesPaint(burstDataCollection.indexOf(BurstCategory.TCP_PROTOCOL), Color.blue);
        renderer.setSeriesPaint(burstDataCollection.indexOf(BurstCategory.TCP_LOSS_OR_DUP), Color.black);
        renderer.setSeriesPaint(burstDataCollection.indexOf(BurstCategory.USER_INPUT), myGreen);
        renderer.setSeriesPaint(burstDataCollection.indexOf(BurstCategory.SCREEN_ROTATION), lightGreen);
        renderer.setSeriesPaint(burstDataCollection.indexOf(BurstCategory.CLIENT_APP), Color.red);
        renderer.setSeriesPaint(burstDataCollection.indexOf(BurstCategory.SERVER_NET_DELAY), Color.yellow);
        renderer.setSeriesPaint(burstDataCollection.indexOf(BurstCategory.LONG), Color.gray);
        renderer.setSeriesPaint(burstDataCollection.indexOf(BurstCategory.PERIODICAL), Color.magenta);
        renderer.setSeriesPaint(burstDataCollection.indexOf(BurstCategory.CPU), Color.cyan);
        renderer.setSeriesPaint(burstDataCollection.indexOf(BurstCategory.UNKNOWN), Color.darkGray);

        // Assign ToolTip to renderer
        renderer.setBaseToolTipGenerator(new XYToolTipGenerator() {
            @Override
            public String generateToolTip(XYDataset dataset, int series, int item) {
                BurstCategory eventType = (BurstCategory) burstDataCollection.getSeries(series).getKey();
                Burst b;
                int size = burstMap.get(eventType).size();
                if (size > item) {
                    b = burstMap.get(eventType).get(item);
                } else {
                    b = burstMap.get(eventType).get(size);
                }
                final String PREFIX = "BurstCategory.";
                return MessageFormat.format(ResourceBundleHelper.getMessageString(PREFIX + eventType.ordinal()),
                        b.getPackets().size(), b.getBurstBytes(), b.getBurstThroughPut());
            }
        });

    }

    plot.setDataset(burstDataCollection);

    //      return plot;

}

From source file:net.sf.dynamicreports.test.jasper.chart.DifferenceChartTest.java

@Override
protected void configureReport(JasperReportBuilder rb) {
    TextColumnBuilder<Date> column1;
    TextColumnBuilder<Timestamp> column2;
    TextColumnBuilder<Integer> column3;
    TextColumnBuilder<Integer> column4;

    Locale.setDefault(Locale.ENGLISH);

    rb.columns(column1 = col.column("Column1", "field1", Date.class),
            column2 = col.column("Column2", "field2", Timestamp.class),
            column3 = col.column("Column3", "field3", Integer.class),
            column4 = col.column("Column4", "field4", Integer.class))
            .summary(//  w  w  w.  j ava  2  s. c  om
                    cht.differenceChart().customizers(new ChartCustomizer()).setTimePeriod(column1)
                            .series(cht.serie(column3), cht.serie(column4)).setTimePeriodType(TimePeriod.DAY)
                            .setShowShapes(false).setPositiveColor(Color.BLUE).setNegativeColor(Color.MAGENTA),
                    cht.differenceChart().setTimePeriod(column1).series(cht.serie(column3))
                            .setTimeAxisFormat(cht.axisFormat().setLabel("time").setLabelColor(Color.BLUE)
                                    .setLabelFont(stl.fontArialBold())
                                    .setTickLabelFont(stl.fontArial().setItalic(true))
                                    .setTickLabelColor(Color.CYAN).setLineColor(Color.LIGHT_GRAY)
                                    .setVerticalTickLabels(true)),
                    cht.differenceChart().setTimePeriod(column2).series(cht.serie(column3))
                            .setValueAxisFormat(cht.axisFormat().setLabel("value").setLabelColor(Color.BLUE)
                                    .setLabelFont(stl.fontArialBold())
                                    .setTickLabelFont(stl.fontArial().setItalic(true))
                                    .setTickLabelColor(Color.CYAN).setTickLabelMask("#,##0.00")
                                    .setLineColor(Color.LIGHT_GRAY).setRangeMinValueExpression(1)
                                    .setRangeMaxValueExpression(15).setVerticalTickLabels(true)));
}

From source file:ancat.visualizers.UndirectedModelVisualizer.java

private void produce(String fileName) {
    _currentLayout.setSize(new Dimension(600, 600));

    VisualizationImageServer<V, E> vv = new VisualizationImageServer<V, E>(_currentLayout,
            new Dimension(600, 600));

    vv.setPreferredSize(new Dimension(600, 600));

    // Setup up a new vertex to paint transformer...
    Transformer<V, Paint> vertexPaint = new Transformer<V, Paint>() {
        public Paint transform(V v) {
            //return Color.GREEN;
            ancat.common.Vertex vertex = (Vertex) v;

            if (vertex instanceof ancat.common.ExecutableFile)
                return Color.BLUE;

            if (vertex instanceof ancat.common.DynamicLibrary)
                return Color.YELLOW;

            if (vertex instanceof ancat.common.ConfigurationFile)
                return Color.ORANGE;

            if (vertex instanceof ancat.common.Unspecified)
                return Color.RED;

            return Color.darkGray;
        }//from   w  w w . ja v  a2s .  c  o m
    };
    // Set up a new stroke Transformer for the edges
    float dash[] = { 10.0f };

    final Stroke edgeStroke = new BasicStroke(1.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER, 10.0f, dash,
            0.0f);

    Transformer<E, Stroke> edgeStrokeTransformer = new Transformer<E, Stroke>() {
        public Stroke transform(E s) {
            return edgeStroke;
        }
    };

    Transformer<E, Font> edgeFontTransformer = new Transformer<E, Font>() {
        public Font transform(E e) {
            return new Font("Dialog", Font.PLAIN, 10);
        }
    };

    Transformer<E, String> lblTransformer = new Transformer<E, String>() {
        public String transform(E e) {
            Edge edge = (Edge) e;
            //return edge.getXMLId();
            return edge.getXMLId() != null ? edge.getXMLId() : "";
        }
    };

    Transformer<V, Font> vertexFontTransformer = new Transformer<V, Font>() {
        public Font transform(V v) {
            return new Font("Dialog", Font.PLAIN, 10);
        }
    };

    Transformer<V, String> vLblTransformer = new Transformer<V, String>() {
        public String transform(V v) {
            Vertex vertex = (Vertex) v;
            return vertex.getElementID();
        }
    };

    vv.getRenderContext().setVertexFillPaintTransformer(vertexPaint);
    vv.getRenderContext().setEdgeStrokeTransformer(edgeStrokeTransformer);
    vv.getRenderContext().setVertexLabelTransformer(new ToStringLabeller<V>());
    vv.getRenderContext().setEdgeLabelTransformer(new ToStringLabeller<E>());
    // ---->
    vv.getRenderContext().setEdgeFontTransformer(edgeFontTransformer);
    vv.getRenderContext().setLabelOffset(20);
    vv.getRenderContext().setEdgeLabelTransformer(lblTransformer);

    vv.getRenderContext().setVertexFontTransformer(vertexFontTransformer);
    vv.getRenderContext().setVertexLabelTransformer(vLblTransformer);

    vv.getRenderer().getVertexLabelRenderer().setPosition(Position.N);

    BufferedImage img = new BufferedImage((int) _currentLayout.getSize().getWidth(),
            (int) _currentLayout.getSize().getHeight(), BufferedImage.TYPE_INT_ARGB);

    vv.getImage(new Point(0, 0), new Dimension(700, 700));

    Graphics2D g2d = (Graphics2D) img.getGraphics();

    vv.paint(g2d);

    setDisclaimer(g2d);

    g2d.dispose();

    try {
        File file = new File(fileName);

        ImageIO.write(img, "png", file);
    } catch (IOException e) {
        e.printStackTrace();
    }
}

From source file:org.jfree.chart.demo.GanttDemo2.java

/**
 * Creates a new demo./*from   w w  w .  ja  va2 s.c  om*/
 *
 * @param title  the frame title.
 */
public GanttDemo2(final String title) {

    super(title);

    final IntervalCategoryDataset dataset = createSampleDataset();

    // create the chart...
    final JFreeChart chart = ChartFactory.createGanttChart("Gantt Chart Demo", // chart title
            "Task", // domain axis label
            "Date", // range axis label
            dataset, // data
            true, // include legend
            true, // tooltips
            false // urls
    );
    final CategoryPlot plot = (CategoryPlot) chart.getPlot();
    //      plot.getDomainAxis().setMaxCategoryLabelWidthRatio(10.0f);
    final CategoryItemRenderer renderer = plot.getRenderer();
    renderer.setSeriesPaint(0, Color.blue);

    // add the chart to a panel...
    final ChartPanel chartPanel = new ChartPanel(chart);
    chartPanel.setPreferredSize(new java.awt.Dimension(500, 270));
    setContentPane(chartPanel);

}

From source file:org.jfree.chart.demo.selection.SelectionDemo3.java

private static JFreeChart createChart(XYDataset dataset, DatasetSelectionExtension<XYCursor> ext) {
    JFreeChart chart = ChartFactory.createScatterPlot("SelectionDemo3", "X", "Y", dataset);

    XYPlot plot = (XYPlot) chart.getPlot();
    plot.setNoDataMessage("NO DATA");

    plot.setDomainPannable(true);/*ww w  .ja  v  a 2s .  c  o  m*/
    plot.setRangePannable(true);
    plot.setDomainZeroBaselineVisible(true);
    plot.setRangeZeroBaselineVisible(true);

    plot.setDomainGridlineStroke(new BasicStroke(0.0f));
    plot.setRangeGridlineStroke(new BasicStroke(0.0f));

    plot.setDomainMinorGridlinesVisible(true);
    plot.setRangeMinorGridlinesVisible(true);

    //XYItemRenderer r = plot.getRenderer();
    XYDotRenderer r = new XYDotRenderer();
    r.setDotHeight(2);
    r.setDotWidth(2);

    r.setSeriesPaint(0, Color.blue);
    r.setSeriesPaint(1, Color.green);
    r.setSeriesPaint(2, Color.yellow);
    r.setSeriesPaint(3, Color.orange);
    plot.setRenderer(r);
    NumberAxis domainAxis = (NumberAxis) plot.getDomainAxis();
    domainAxis.setAutoRangeIncludesZero(false);

    domainAxis.setTickMarkInsideLength(2.0f);
    domainAxis.setTickMarkOutsideLength(2.0f);

    domainAxis.setMinorTickMarksVisible(true);

    NumberAxis rangeAxis = (NumberAxis) plot.getRangeAxis();
    rangeAxis.setTickMarkInsideLength(2.0f);
    rangeAxis.setTickMarkOutsideLength(2.0f);
    rangeAxis.setMinorTickMarksVisible(true);

    //add selection specific rendering
    IRSUtilities.setSelectedItemPaint(r, ext, Color.red);

    //register plot as selection change listener
    ext.addChangeListener(plot);

    return chart;
}

From source file:jat.examples.CRTBP.CRTBPPlot.java

void doExample() {
    double mu = 0.15;
    double[] y0 = { .11, 0, 0, 1.35, 1.33, 0 }; // initial state

    // double mu = 0.1;
    // double mu = 3.035909999e-6;

    // double mu = 0.012277471;
    // double[] y0 = { .1, 0, 0, 2.69, 2.69, 0 }; // initial state

    // double mu = 0.2;

    CRTBP myCRTBP = new CRTBP(mu);
    FirstOrderIntegrator dp853 = new DormandPrince853Integrator(1.0e-8, 100.0, 1.0e-10, 1.0e-10);
    dp853.addStepHandler(myCRTBP.stepHandler);

    FirstOrderDifferentialEquations ode = myCRTBP;

    double tf;/*from   w  ww . j  av a 2  s. com*/
    double[] y = new double[6]; // initial state

    // for (int i = 1; i < 2; i++) {
    // tf = i * 20.;
    tf = 40.;
    System.arraycopy(y0, 0, y, 0, 6);

    dp853.integrate(ode, 0.0, y, tf, y); // now y contains final state
    // at
    // time tf
    if (print) {
        System.out.printf("%9.6f %9.6f %9.6f %9.6f %9.6f", tf, y[0], y[1], y[2], myCRTBP.JacobiIntegral(y));
        System.out.println();
    }

    int arraySize = myCRTBP.time.size();
    double[] timeArray = ArrayUtils.toPrimitive(myCRTBP.time.toArray(new Double[arraySize]));
    double[] xsolArray = ArrayUtils.toPrimitive(myCRTBP.xsol.toArray(new Double[arraySize]));
    double[] ysolArray = ArrayUtils.toPrimitive(myCRTBP.ysol.toArray(new Double[arraySize]));
    double[][] XY = new double[timeArray.length][2];
    for (int i = 0; i < timeArray.length; i++) {
        XY[i][0] = xsolArray[i];
        XY[i][1] = ysolArray[i];
    }

    Plot2DPanel p = new Plot2DPanel();
    LinePlot l = new LinePlot("spacecraft", Color.RED, XY);
    l.closed_curve = false;
    l.draw_dot = true;
    p.addPlot(l);
    double plotSize = 1.2;
    myCRTBP.findLibrationPoints();
    Color darkGreen = new java.awt.Color(0, 190, 0);

    addPoint(p, "Earth", java.awt.Color.BLUE, -mu, 0);
    addPoint(p, "Moon", java.awt.Color.gray, 1 - mu, 0);
    addPoint(p, "L1", darkGreen, myCRTBP.LibPoints[0].getX(), 0);
    addPoint(p, "L2", darkGreen, myCRTBP.LibPoints[1].getX(), 0);
    addPoint(p, "L3", darkGreen, myCRTBP.LibPoints[2].getX(), 0);

    String Labelmu = "mu = " + myCRTBP.mu;
    p.addLabel(Labelmu, java.awt.Color.black, 1, .9 * plotSize);
    String initial = "initial x,v = (" + y0[0] + "," + y0[1] + "),(" + y0[3] + "," + y0[4] + ")";
    p.addLabel(initial, java.awt.Color.black, 1, .8 * plotSize);
    String Jacobi = "spacecraft C = " + myCRTBP.C;
    p.addLabel(Jacobi, java.awt.Color.black, 1, .7 * plotSize);
    String L1C = "L1 C = " + myCRTBP.C1;
    p.addLabel(L1C, java.awt.Color.black, 1, .6 * plotSize);

    myCRTBP.findZeroVelocity();
    int size = myCRTBP.xzv.size();
    double[] xzvArray = ArrayUtils.toPrimitive(myCRTBP.xzv.toArray(new Double[size]));
    double[] yzvArray = ArrayUtils.toPrimitive(myCRTBP.yzv.toArray(new Double[size]));
    double[][] XYzv = new double[size][2];
    for (int i = 0; i < size; i++) {
        XYzv[i][0] = xzvArray[i];
        XYzv[i][1] = yzvArray[i];
    }
    LinePlot lzv = new LinePlot("zero vel", Color.blue, XYzv);
    lzv.closed_curve = false;
    lzv.draw_dot = true;
    p.addPlot(lzv);

    p.setLegendOrientation(PlotPanel.SOUTH);
    p.setFixedBounds(0, -plotSize, plotSize);
    p.setFixedBounds(1, -plotSize, plotSize);
    new FrameView(p).setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

}

From source file:org.jfree.chart.demo.BubblyBubblesDemo.java

/**
 * A demonstration application showing a bubble chart using matrix series.
 *
 * @param title the frame title.//w  ww .  j  a  v  a 2s. c o  m
 */
public BubblyBubblesDemo(final String title) {
    super(title);

    this.series = createInitialSeries();

    final MatrixSeriesCollection dataset = new MatrixSeriesCollection(this.series);

    final JFreeChart chart = ChartFactory.createBubbleChart(TITLE, "X", "Y", dataset, PlotOrientation.VERTICAL,
            true, true, false);

    chart.setBackgroundPaint(new GradientPaint(0, 0, Color.white, 0, 1000, Color.blue));

    final XYPlot plot = chart.getXYPlot();
    plot.setForegroundAlpha(0.5f);

    final NumberAxis domainAxis = (NumberAxis) plot.getDomainAxis();
    domainAxis.setLowerBound(-0.5);

    final NumberAxis rangeAxis = (NumberAxis) plot.getRangeAxis();

    // rangeAxis.setInverted(true);  // uncoment to reproduce a bug in jFreeChart
    rangeAxis.setLowerBound(-0.5);

    final ChartPanel chartPanel = new ChartPanel(chart);
    //        chartPanel.setVerticalZoom(true);
    //      chartPanel.setHorizontalZoom(true);
    setContentPane(chartPanel);
}