Package org.opensourcephysics.display
Class HistogramDataset
java.lang.Object
org.opensourcephysics.display.DataTable.DataModel
org.opensourcephysics.display.Dataset
org.opensourcephysics.display.HistogramDataset
- All Implemented Interfaces:
Data,Drawable,LogMeasurable,Measurable
HistogramDataset creates a histogram of appended data points.
- Version:
- 1.0
- Author:
- Wolfgang Christian
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class org.opensourcephysics.display.Dataset
Dataset.Loader, Dataset.Model -
Field Summary
Fields inherited from class org.opensourcephysics.display.Dataset
AREA, BAR, CIRCLE, columnID, CUSTOM, customMarker, datasetID, errorBars, generalPath, id, index, maxPoints, maxPointsMultiplier, model, NO_MARKER, PIXEL, POST, shift, sorted, SQUARE, update, visible, xColumnDescription, xmax, xmaxLogscale, xmin, xminLogscale, xpoints, yColumnDescription, ymax, ymaxLogscale, ymin, yminLogscale, ypoints -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedConstructs a HistogramDataset for values from 0 through 100.HistogramDataset(double binMin, double binMax, double binSize) Constructor HistogramDataset -
Method Summary
Modifier and TypeMethodDescriptionvoidappend(double[] xpoints, double[] ypoints) Appends (x,y) data-arrays to the Stipchart.voidappend(double x, double y) Appends an (x,y) datum to the Stipchart.voidclear()Clears data from the histogram.static XML.ObjectLoaderReturns the XML.ObjectLoader for this class.doublegetXMax()Gets the x world coordinate for the right hand side of the panel.doublegetXMin()Gets the x world coordinate for the left hand side of the panel.voidsetBinWidth(double binMin, double binMax, double binSize) Methods inherited from class org.opensourcephysics.display.Dataset
append, append, append, convertTableColumnIndex, countColumnsVisible, draw, drawable, drawClip, drawData, drawScatterPlot, findDataSet, getColumnCount, getColumnID, getColumnName, getColumnNames, getData2D, getData3D, getDataList, getDatasets, getEdgeColor, getFillColor, getFillColors, getID, getIndex, getLineColor, getLineColors, getMarkerShape, getMarkerSize, getMean, getName, getNaNCount, getPoints, getRowCount, getShift, getTranslateInstance, getValidXPoints, getValidYPoints, getValueAt, getVisible, getX, getXColumnDescription, getXColumnName, getXMaxLogscale, getXMinLogscale, getXPoints, getXPointsRaw, getY, getYColumnDescription, getYColumnName, getYMax, getYMaxLogscale, getYMin, getYMinLogscale, getYPoints, getYPointsRaw, getYShifted, insertionSort, isConnected, isMeasured, isShifted, isSorted, isXColumnVisible, isYColumnVisible, loadDatasets, read, recalculatePath, set, setColumnID, setConnected, setCustomMarker, setID, setLineColor, setMarkerColor, setMarkerColor, setMarkerColor, setMarkerShape, setMarkerSize, setMaximumPoints, setName, setShift, setShifted, setShiftedValue, setSorted, setStride, setVisible, setXColumnDescription, setXColumnVisible, setXYColumnNames, setXYColumnNames, setYColumnDescription, setYColumnVisible, toBoolArray, toString, writeMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.opensourcephysics.display.Drawable
isInteractive
-
Constructor Details
-
HistogramDataset
public HistogramDataset(double binMin, double binMax, double binSize) Constructor HistogramDataset- Parameters:
binMin-binMax-binSize-
-
HistogramDataset
protected HistogramDataset()Constructs a HistogramDataset for values from 0 through 100.
-
-
Method Details
-
append
public void append(double x, double y) Appends an (x,y) datum to the Stipchart. -
append
public void append(double[] xpoints, double[] ypoints) Appends (x,y) data-arrays to the Stipchart. -
getXMin
public double getXMin()Gets the x world coordinate for the left hand side of the panel.- Specified by:
getXMinin interfaceMeasurable- Overrides:
getXMinin classDataset- Returns:
- xmin
-
getXMax
public double getXMax()Gets the x world coordinate for the right hand side of the panel.- Specified by:
getXMaxin interfaceMeasurable- Overrides:
getXMaxin classDataset- Returns:
- xmax
-
setBinWidth
public void setBinWidth(double binMin, double binMax, double binSize) -
clear
public void clear()Clears data from the histogram. -
getLoader
Returns the XML.ObjectLoader for this class.- Returns:
- the object loader
-