org.jfree.data.contour

Class NonGridContourDataset

public class NonGridContourDataset extends DefaultContourDataset

Deprecated: This class is no longer supported. If you are creating contour plots, please try to use XYPlot and XYBlockRenderer.

A convenience class that extends the DefaultContourDataset to accommodate non-grid data.
Constructor Summary
NonGridContourDataset()
Default constructor.
NonGridContourDataset(String seriesName, Object[] xData, Object[] yData, Object[] zData)
Constructor for NonGridContourDataset.
NonGridContourDataset(String seriesName, Object[] xData, Object[] yData, Object[] zData, int numX, int numY, int power)
Constructor for NonGridContourDataset.
Method Summary
protected voidbuildGrid(int numX, int numY, int power)
Builds a regular grid.
protected doubledistance(double xDataPt, double yDataPt, double xGrdPt, double yGrdPt)
Calculates the distance between two points.

Constructor Detail

NonGridContourDataset

public NonGridContourDataset()
Default constructor.

NonGridContourDataset

public NonGridContourDataset(String seriesName, Object[] xData, Object[] yData, Object[] zData)
Constructor for NonGridContourDataset. Uses default values for grid dimensions and weighting.

Parameters: seriesName the series name. xData the x values. yData the y values. zData the z values.

NonGridContourDataset

public NonGridContourDataset(String seriesName, Object[] xData, Object[] yData, Object[] zData, int numX, int numY, int power)
Constructor for NonGridContourDataset.

Parameters: seriesName the series name. xData the x values. yData the y values. zData the z values. numX number grid cells in along the x-axis numY number grid cells in along the y-axis power exponent for inverse distance weighting

Method Detail

buildGrid

protected void buildGrid(int numX, int numY, int power)
Builds a regular grid. Maps the non-grid data into the regular grid using an inverse distance between grid and non-grid points. Weighting of distance can be controlled by setting through the power parameter that controls the exponent used on the distance weighting (e.g., distance^power).

Parameters: numX number grid points in along the x-axis numY number grid points in along the y-axis power exponent for inverse distance weighting

distance

protected double distance(double xDataPt, double yDataPt, double xGrdPt, double yGrdPt)
Calculates the distance between two points.

Parameters: xDataPt the x coordinate. yDataPt the y coordinate. xGrdPt the x grid coordinate. yGrdPt the y grid coordinate.

Returns: The distance between two points.