Best Answer

final XYSeries series1 = new XYSeries("First");

series1.add(1.0, 1.0);

// series1.add(2.0, 4.0);

// series1.add(3.0, 3.0);

// series1.add(4.0, 5.0);

// series1.add(5.0, 5.0);

// series1.add(6.0, 7.0);

// series1.add(7.0, 7.0);

// series1.add(8.0, 8.0);

final XYSeries series2 = new XYSeries("Second");

series2.add(1.0, 1.0);

// series2.add(2.0, 4.0);

// series2.add(3.0, 6.0);

// series2.add(4.0, 8.0);

// series2.add(5.0, 4.0);

// series2.add(6.0, 4.0);

// series2.add(7.0, 2.0);

// series2.add(8.0, 1.0);

final XYSeries series3 = new XYSeries("Third");

series3.add(1.0, 1.0);

// series3.add(4.0, 3.0);

// series3.add(5.0, 2.0);

// series3.add(6.0, 3.0);

// series3.add(7.0, 6.0);

// series3.add(8.0, 3.0);

// series3.add(9.0, 4.0);

// series3.add(10.0, 3.0);

final XYSeriesCollection dataset = new XYSeriesCollection();

dataset.addSeries(series1);

dataset.addSeries(series2);

dataset.addSeries(series3);

JFreeChart chart = ChartFactory.createXYLineChart(

"Line Chart Demo 6", // chart title

"X", // x axis label

"Y", // y axis label

dataset, // data

PlotOrientation.VERTICAL,

true, // include legend

true, // tooltips

false // urls

);

XYPlot xyPlot = (XYPlot) chart.getPlot();

xyPlot.setDomainCrosshairVisible(true);

xyPlot.setRangeCrosshairVisible(true);

XYItemRenderer renderer = xyPlot.getRenderer();

renderer.setSeriesPaint(0, Color.blue);

return chart;

Q: When iam using jfreechart for plotting a linechart can i give a point in y axis and find the exact chart intersection point at x axis?

Write your answer...

Submit

Still have questions?

Continue Learning about Engineering

create chart than print chart

draw a line chart.

Reflect the chart in the line y = x.

embedded chart

drawing McDonald flow chart service process.

Related questions

nothing

It is a chart for plotting points and can also be used to chart lines and curves.

Working out with chart folios ( maps of the ocean ) what way you are going to go. The plotting is done by drawing on the nautical charts . The charts will show everything from water depth to rocks.

Intersection of SHR line and saturation line on the Psych Chart

No. It is good for showing how each data point compares to the whole data set.

A graph is an image representing a mathematical concept, such as the relationship between a set of linked objects, or that of a set of points and the function operating on those points. A data chart is an image which visually presents the relationship between two data sets, one of which may or may not be a function of the other. There is some overlap, as a particular graph can also be a data chart. For example, a plotting of the parabola defined by the function y=x2 is a graph. A plotting of the variable curve defined by the number of animals in a region vs. the amount of available food is a data chart. And a plotting of the logarithmically-curved line showing how the mass of stars relates to their age could very well be both.

The two unknowns that are easiest to obtain for making plots on the psychrometric chart are dry-bulb temperature and relative humidity. These parameters are usually measured directly or can be easily determined using standard instruments, allowing for quick and accurate plotting on the chart.

A pie chart is one way. But it is not suitable if there are too many categories or if any of them are very large or very small.

Class E airspace at low altitude federal airways are indicated by center line. Intersection-arrows are directed towards facilities which establish intersection. Class E airspace at low altitude federal airways are indicated by center line. Intersection -arrow are directed towards facilities which establish intersection. Class E low altitude RNAV 2 routes are indicated by center line.

The great circle chart is a type of navigational projection known as an orthographic projection. It displays the Earth's surface as if projected onto a flat plane from an infinite distance, resulting in great circles appearing as straight lines. This projection is useful for plotting and navigating along the shortest route between two points on the Earth's surface.

Turn on the snap-to options:Click the chart in the worksheet.Under Drawing Tools on the Format tab, in the Arrange group, click Align.To position shapes or objects to the closest intersection of the grid, click Snap to Grid.You can override the snap-to setting by holding down the ALT key when you click and drag the chart.

Time-series techniques use trend projections of past economic activity to extend into the future. Projecting is done by plotting data for the past years on a chart and, from the latest data, extending a line into future time