Class Charting


  • public final class Charting
    extends Object
    Code to produce various types of chart.
    Author:
    Guy Griffiths, Jon Blower, Kevin X. Yang
    • Constructor Detail

      • Charting

        public Charting()
    • Method Detail

      • createTransectPlot

        public static org.jfree.chart.JFreeChart createTransectPlot​(Map<PointCollectionFeature,​String> pointCollectionFeatures2Labels,
                                                                    LineString transectDomain,
                                                                    boolean hasVerticalAxis,
                                                                    String copyrightStatement)
        Creates a plot of TrajectoryFeatures which have been extracted along a transect. All TrajectoryFeatures must have been extracted along the same LineString for this graph to be correctly displayed.
        Parameters:
        pointCollectionFeatures2Labels - A List of TrajectoryFeatures to plot
        transectDomain - The transect domain along which *all* features must have been extracted.
        hasVerticalAxis -
        copyrightStatement - A copyright notice to display under the graph
        Returns:
        The plot
      • createVerticalSectionChart

        public static org.jfree.chart.JFreeChart createVerticalSectionChart​(List<ProfileFeature> features,
                                                                            LineString horizPath,
                                                                            ColourScheme colourScheme,
                                                                            Double zValue,
                                                                            Extent<Double> zExtent)
        Plot a vertical section chart
        Parameters:
        features - A List of evenly-spaced ProfileFeatures making up this vertical section. All features must have been extracted onto the same VerticalAxis. They must each only contain a single parameter.
        horizPath - The LineString along which the ProfileFeatures have been extracted
        colourScheme - The ColourScheme to use for the plot
        zValue - The elevation at which a matching transect is plotted (will be marked on the chart) - can be null
        zExtent - The range of elevations to include on the vertical section chart. If this is null the entire available range will be used
        Returns:
        The resulting chart
      • addVerticalSectionChart

        public static org.jfree.chart.JFreeChart addVerticalSectionChart​(org.jfree.chart.JFreeChart transectChart,
                                                                         org.jfree.chart.JFreeChart verticalSectionChart)
      • createPaintScale

        public static org.jfree.chart.renderer.PaintScale createPaintScale​(ColourScheme colourScheme)
        Creates and returns a JFreeChart PaintScale that converts data values to Colors.