|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectptolemy.kernel.util.NamedObj
ptolemy.kernel.InstantiableNamedObj
ptolemy.kernel.Entity
ptolemy.kernel.ComponentEntity
ptolemy.actor.AtomicActor
ptolemy.actor.TypedAtomicActor
ptolemy.actor.lib.gui.PlotterBase
ptolemy.actor.lib.gui.HistogramPlotter
A histogram plotter. This plotter contains an instance of the Histogram class from the Ptolemy plot package as a public member. A histogram of data at the input port, which can consist of any number of channels, is plotted on this instance. The input data type is double.
The output plot consists of a set of vertical bars, each representing a histogram bin. The height of the bar is the count of the number of inputs that have been observed that fall within that bin. The n-th bin represents values in the range (x - w/2 + o, x + w/2 + o), where w is the value of the binWidth parameter, and o is the value of the binOffset parameter. So for example, if o = w/2, then each bin represents values from nw to (n + 1)w for some integer n. The default offset is 0.5, half the default bin width, which is 1.0.
This actor has a legend parameter, which gives a comma-separated list of labels to attach to each dataset. Normally, the number of elements in this list should equal the number of input channels, although this is not enforced.
Histogram,
Serialized Form
| Green (cxh) |
| Green (eal) |
| Nested Class Summary |
| Nested classes inherited from class ptolemy.actor.lib.gui.PlotterBase |
PlotterBase.PlotterPlotFrame, PlotterBase.PlotWindowTableau |
| Nested classes inherited from class ptolemy.kernel.Entity |
ptolemy.kernel.Entity.ContainedObjectsIterator |
| Field Summary | |
ptolemy.data.expr.Parameter |
binOffset
The offset for bins of the histogram. |
ptolemy.data.expr.Parameter |
binWidth
The width of the bin of the histogram. |
ptolemy.actor.TypedIOPort |
input
The input port, which is a multiport. |
| Fields inherited from class ptolemy.actor.lib.gui.PlotterBase |
_base, _container, _frame, _plotSize, _source, _text, _windowProperties, fillOnWrapup, legend, plot |
| Fields inherited from class ptolemy.actor.AtomicActor |
_stopRequested |
| Fields inherited from class ptolemy.kernel.util.NamedObj |
_changeListeners, _changeLock, _changeRequests, _debugging, _debugListeners, _elementName, _isPersistent, _workspace, ATTRIBUTES, CLASSNAME, COMPLETE, CONTENTS, DEEP, FULLNAME, LINKS |
| Fields inherited from interface ptolemy.actor.Executable |
COMPLETED, NOT_READY, STOP_ITERATING |
| Constructor Summary | |
HistogramPlotter(ptolemy.kernel.CompositeEntity container,
java.lang.String name)
Construct an actor with the given container and name. |
|
| Method Summary | |
protected void |
_implementDeferredConfigurations()
If configurations have been deferred, implement them now. |
protected ptolemy.plot.PlotBox |
_newPlot()
Create a new Histogram plot. |
void |
attributeChanged(ptolemy.kernel.util.Attribute attribute)
If the parameter is binWidth or binOffset, then configure the histogram with the specified bin width or offset. |
void |
configure(java.net.URL base,
java.lang.String source,
java.lang.String text)
Configure the plot with data from the specified input source (a URL) and/or textual data, assumed to be in PlotML format. |
java.lang.String |
getSource()
Return the input source that was specified the last time the configure method was called. |
void |
initialize()
If the histogram has not already been created, create it using place(). |
boolean |
postfire()
Read at most one input token from each input channel and update the histogram. |
| Methods inherited from class ptolemy.actor.lib.gui.PlotterBase |
_exportMoMLContents, _propagateValue, clone, getConfigureSource, getConfigureText, place, preinitialize, setContainer, wrapup |
| Methods inherited from class ptolemy.actor.TypedAtomicActor |
_addPort, attributeTypeChanged, clone, newPort, typeConstraintList |
| Methods inherited from class ptolemy.actor.AtomicActor |
_createReceivers, connectionsChanged, fire, getDirector, getExecutiveDirector, getFunctionDependency, getManager, inputPortList, iterate, newReceiver, outputPortList, prefire, pruneDependencies, removeDependency, stop, stopFire, terminate |
| Methods inherited from class ptolemy.kernel.ComponentEntity |
_adjustDeferrals, _checkContainer, _getContainedObject, _propagateExistence, getContainer, instantiate, isAtomic, isOpaque, propagateExistence, setName |
| Methods inherited from class ptolemy.kernel.Entity |
_description, _removePort, connectedPortList, connectedPorts, containedObjectsIterator, getAttribute, getPort, getPorts, linkedRelationList, linkedRelations, portList, removeAllPorts, setClassDefinition, uniqueName, validateSettables |
| Methods inherited from class ptolemy.kernel.InstantiableNamedObj |
_setParent, exportMoML, getChildren, getElementName, getParent, getPrototypeList, isClassDefinition |
| Methods inherited from class ptolemy.kernel.util.NamedObj |
_addAttribute, _attachText, _cloneFixAttributeFields, _debug, _debug, _debug, _debug, _debug, _getIndentPrefix, _isMoMLSuppressed, _markContentsDerived, _removeAttribute, _splitName, _stripNumericSuffix, addChangeListener, addDebugListener, attributeList, attributeList, deepContains, depthInHierarchy, description, description, event, executeChangeRequests, exportMoML, exportMoML, exportMoML, exportMoML, getAttribute, getAttributes, getChangeListeners, getClassName, getDerivedLevel, getDerivedList, getFullName, getModelErrorHandler, getName, getName, handleModelError, isDeferringChangeRequests, isOverridden, isPersistent, message, propagateValue, propagateValues, removeChangeListener, removeDebugListener, requestChange, setClassName, setDeferringChangeRequests, setDerivedLevel, setModelErrorHandler, setPersistent, setSource, toplevel, toString, workspace |
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface ptolemy.actor.gui.Placeable |
place |
| Methods inherited from interface ptolemy.actor.Actor |
getDirector, getExecutiveDirector, getFunctionDependency, getManager, inputPortList, newReceiver, outputPortList |
| Methods inherited from interface ptolemy.actor.Executable |
fire, iterate, prefire, stop, stopFire, terminate |
| Methods inherited from interface ptolemy.kernel.util.Derivable |
getDerivedLevel, getDerivedList, propagateValue |
| Methods inherited from interface ptolemy.kernel.util.Nameable |
description, getFullName, getName, getName |
| Field Detail |
public ptolemy.data.expr.Parameter binWidth
public ptolemy.data.expr.Parameter binOffset
public ptolemy.actor.TypedIOPort input
| Constructor Detail |
public HistogramPlotter(ptolemy.kernel.CompositeEntity container,
java.lang.String name)
throws ptolemy.kernel.util.IllegalActionException,
ptolemy.kernel.util.NameDuplicationException
container - The container.name - The name of this actor.
ptolemy.kernel.util.IllegalActionException - If the actor cannot be contained
by the proposed container.
ptolemy.kernel.util.NameDuplicationException - If the container already has an
actor with this name.| Method Detail |
public void attributeChanged(ptolemy.kernel.util.Attribute attribute)
throws ptolemy.kernel.util.IllegalActionException
attributeChanged in class PlotterBaseattribute - The attribute that changed.
ptolemy.kernel.util.IllegalActionException - If the bin width is not positive.
public void configure(java.net.URL base,
java.lang.String source,
java.lang.String text)
throws java.lang.Exception
configure in interface ptolemy.kernel.util.Configurableconfigure in class PlotterBasebase - The base relative to which references within the input
stream are found, or null if this is not known.source - The input source, which specifies a URL.text - Configuration information given as text.
java.lang.Exception - If the configuration source cannot be read
or if the configuration information is incorrect.public java.lang.String getSource()
getSource in interface ptolemy.kernel.util.MoMLExportable
public void initialize()
throws ptolemy.kernel.util.IllegalActionException
initialize in interface ptolemy.actor.Executableptolemy.kernel.util.IllegalActionException - If the parent class throws it.
public boolean postfire()
throws ptolemy.kernel.util.IllegalActionException
postfire in interface ptolemy.actor.Executableptolemy.kernel.util.IllegalActionException - If there is no director.protected void _implementDeferredConfigurations()
_implementDeferredConfigurations in class PlotterBaseprotected ptolemy.plot.PlotBox _newPlot()
_newPlot in class PlotterBase
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||