SimplePlot class
This class allows you to display one or several arrays as polylines (curves) inside the browser, along with coordinate axes and a a coordinate grid, an some title text. It is recommended to use this class if a plot needs to be generated with a few lines of code, rather than exploitimg the full capabilities of the classes Polyline, Axis, Legend for more complex layouts.
Constructors
-
SimplePlot(List<
Float64List> arrays, DivElement plotDiv, List<Map< plotAttr, Map<PyA, String> >AxA, String> xaxisAttr, Map<AxA, String> yaxisAttr, Map<LegA, String> legendAttr, List<String> poly_colors) -
SimplePlot.mult(List<
Float64List> arrays, List<Map< plotAttr, Map<PyA, String> >AxA, String> xaxisAttr, Map<AxA, String> yaxisAttr, Map<LegA, String> legendAttr, List<String> poly_colors, PlotLayoutSVG pl, int plotnum) -
Plots
arrays
as polylines (curves), along with coordinate axes, a coordinate grid and legend text.plotDiv
- the html DivElement that will contain the plot.plotAttr
- plot attributes controlling the appearance and layout of the polylines. Ifnull
, internal defaults are used.xaxisAttr
- x axis attributes controlling the appearance and layout of the x (horizontal) coordinate axis. Ifnull
, internal defaults are used.yaxisAttr
- y axis attributes controlling the appearance and layout of the y (vertical) coordinate axis. Ifnull
, internal defaults are used.legendAttr
- attributes controlling the appearance and layout of the text legend. Ifnull
, internal defaults are used.poly_colors
- these are the color in whicharrays
get displayed. This list may be bigger than the list aarrays
, but not smaller. Ifnull
, internal default colors are used.pl
- the containers where the graphics is to be drawn See the example provided with this package how simple is it is to generate the plot. NOTE 1: Displaying more than a single array only makes sense if the value ranges in the different arrays are commensurable, otherwise a simultaneous plot is not meaningful. NOTE 2: The sizes of the arrays may be different. The width of the plot is computed fromplotDiv
.
Properties
-
arrays
↔ List<
Float64List> -
The arrays to be plotted
read / write
- hashCode → int
-
The hash code for this object. [...]
read-only, inherited
- legend ↔ Legend
-
read / write
-
legendAttr
↔ Map<
LegA, String> -
read / write
- pl ↔ PlotLayoutSVG
-
read / write
-
plotAttr
↔ List<
Map< PyA, String> > -
read / write
- plotnum ↔ int
-
read / write
-
POLY_COLORS
→ List<
String> -
final
-
poly_colors
↔ List<
String> -
read / write
-
polylines
↔ List<
Polyline> -
read / write
- runtimeType → Type
-
A representation of the runtime type of the object.
read-only, inherited
- xaxis ↔ Axis
-
The axes
read / write
-
xaxisAttr
↔ Map<
AxA, String> -
read / write
- yaxis ↔ Axis
-
The axes
read / write
-
yaxisAttr
↔ Map<
AxA, String> -
read / write
Methods
-
createAxes(
Polyline polyline) → void -
Create an x and a y axis for
polyline
. -
createPolylines(
) → void - Creates a polyline for each element of arrays
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a non-existent method or property is accessed. [...]
inherited
-
toString(
) → String -
Returns a string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator. [...]
inherited
Static Methods
-
createLegend(
Map< LegA, String> legendAttr, List<String> poly_colors) → Legend -
Creates a legend from
legendAttr
.poly_colors
, if not null, draws colored subtitle rectangles if there are subtitles specified inlegendAttr
.