plot
Class ScrolledPlot

java.lang.Object
  extended by plot.ScrolledPlot

public class ScrolledPlot
extends java.lang.Object

This class defines the scrolled plot structure used by the PlotPanel to display the plot data using a scrolled image in a plot area with straight plot lines for each plot item (data line), and the lines vary by color or brightness based on each point value.


Constructor Summary
ScrolledPlot(java.lang.String title, java.lang.String x_axis_title, java.lang.String y_axis_title, int num_x_values_max, double x_values_min, double x_values_incr)
          Create a ScrolledPlot instance, setting titles and assuming a linear horizontal axis.
 
Method Summary
static java.awt.Color getColorForValue(double value, double min_val, double max_val, boolean colors_selected)
          Generate a color to use given the current value.
 Plot getColumnLinesPlot()
          Get a plot of the column lines.
 Plot getRowLinesPlot()
          Get a plot of the row lines, each entry in a column for that row becomes a point in that row line.
 void setValuesRange(double mag_min, double mag_max)
          Set display magnitude range to map into the rainbow colors.
 void setVerticals(java.util.ArrayList<java.lang.Double> y_values)
          Set the vertical values for the lines to include.
 void setVerticals(double[] y_values)
          Set the vertical values for the lines to include.
 void storePlotValues(java.lang.String key_string, double x_value, java.lang.Double[] magnitudes)
          Store another time instance set of plot points (a single vertical line).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ScrolledPlot

public ScrolledPlot(java.lang.String title,
                    java.lang.String x_axis_title,
                    java.lang.String y_axis_title,
                    int num_x_values_max,
                    double x_values_min,
                    double x_values_incr)
Create a ScrolledPlot instance, setting titles and assuming a linear horizontal axis.

Parameters:
title - the plot title
x_axis_title - the horizontal axis title.
y_axis_title - the vertical axis title.
num_x_values_max - the number of horizontal values to include, dropping extra ones off the left side as the plot scrolls.
x_values_incr - the amount to increment the horizontal "tics" for each new sample column.
Method Detail

setVerticals

public void setVerticals(double[] y_values)
Set the vertical values for the lines to include. This gets the min and scale factor for later rescaling of the input values as needed for various plot sizes.

Parameters:
y_values - the values for each of the vertical locations.

setVerticals

public void setVerticals(java.util.ArrayList<java.lang.Double> y_values)
Set the vertical values for the lines to include. This gets the min and scale factor for later rescaling of the input values as needed for various plot sizes.

Parameters:
y_values - the values for each of the vertical locations.

setValuesRange

public void setValuesRange(double mag_min,
                           double mag_max)
Set display magnitude range to map into the rainbow colors.

Parameters:
mag_min - the minimum value expected.
mag_max - the maximum value expected.

storePlotValues

public void storePlotValues(java.lang.String key_string,
                            double x_value,
                            java.lang.Double[] magnitudes)
Store another time instance set of plot points (a single vertical line).

Parameters:
key_string - the key string for the line.
x_value - the time value for the samples.
magnitudes - the array of magnitudes, one each for the vertical values reserved.

getColumnLinesPlot

public Plot getColumnLinesPlot()
Get a plot of the column lines.


getRowLinesPlot

public Plot getRowLinesPlot()
Get a plot of the row lines, each entry in a column for that row becomes a point in that row line.


getColorForValue

public static java.awt.Color getColorForValue(double value,
                                              double min_val,
                                              double max_val,
                                              boolean colors_selected)
Generate a color to use given the current value.

Parameters:
value - the value to convert to a color.
Returns:
the color for that value.