Class ScatterplotSimulationPlotterRefreshable

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible, RootPaneContainer, WindowConstants, EventListener

public class ScatterplotSimulationPlotterRefreshable extends JInternalFrame implements EventListener
A ScatterplotSimulationPlotterRefreshable is able to trace one or more pairs of data sources between scheduled simulation time-steps, creating a scatterplot chart that is updated on demand (e.g. for visualising the progress of the simulation between time-steps). It is based on ScatterplotSimulationPlotter, which is itself based on JFreeChart library and uses data sources based on the microsim.statistics.* interfaces.

Title: JAS-mine

Description: Java Agent-based Simulation library

Copyright (C) 2017 Ross Richardson

This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
Author:
Ross Richardson
See Also:
  • Constructor Details

    • ScatterplotSimulationPlotterRefreshable

      public ScatterplotSimulationPlotterRefreshable(String title, String xaxis, String yaxis)
      Constructor for scatterplot chart objects with chart legend displayed by default and all data samples shown, accumulating as time moves forward. If it is desired to turn the legend off, or set a limit to the number of previous time-steps of data displayed in the chart, use the constructor ScatterplotSimulationPlotter(String title, String xaxis, String yaxis, boolean includeLegend, int maxSamples)
      Parameters:
      title - - title of the chart
      xaxis - - name of the x-axis
      yaxis - - name of the y-axis
    • ScatterplotSimulationPlotterRefreshable

      public ScatterplotSimulationPlotterRefreshable(String title, String xaxis, String yaxis, boolean includeLegend, int maxSamples)
      Constructor for scatterplot chart objects, featuring a toggle to hide the chart legend and to set the number of previous time-steps of data to display in the chart.
      Parameters:
      title - - title of the chart
      xaxis - - name of the x-axis
      yaxis - - name of the y-axis
      includeLegend - - toggles whether to include the legend. If displaying a very large number of different series in the chart, it may be useful to turn the legend off as it will occupy a lot of space in the GUI.
      maxSamples - - the number of 'snapshots' of data displayed in the chart. Only data from the last 'maxSamples' updates will be displayed in the chart, so if the chart is updated at each 'time-step', then only the most recent 'maxSamples' time-steps will be shown on the chart. If the user wishes to accumulate all data points from the simulation run, i.e. to display all available data from all previous time-steps, set this to 0.
  • Method Details