|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.knowceans.util.MayaShades
public class MayaShades
MayaShades creates Maya-esque visualisations of numeric data -- Maya-esqe because the plotted values resemble the Maya numeric symbols. For presentation of numerical data, the output has several advantages: (1) over numeric data: because the eye directly recognises where in a matrix the large values are located, (2) over visualised Hinton diagrams: because simple console or text file output can be used to present the data. (In a way, MayaShades is similar to the presentation in Hinton diagrams).
In addition to purely "shaded" numerical output, if data are over a specified maximum value, the numeric value is shown instead, resulting in a "heavier" shade that makes it consistent with the symbolic shades. This allows presentation of a specific middle range of data with "analogue" shading, which has proven very useful to visualise discrete probability distributions.
To layout the numeric data in an appropriate width, specific number formatting (unavailable in the NumberFormat framework in the the Java API) is provided for this class, which can be used independent of the shading facility.
Constructor Summary | |
---|---|
MayaShades()
|
Method Summary | |
---|---|
static java.lang.String |
format(double number,
int digits)
formats a number to the specified number of digits |
static java.lang.String |
format(double number,
int digits,
int maxlength)
formats a number to the specified number of digits |
static java.lang.String |
shadeDouble(double[] dd,
double max)
Create a string representation of the vector. |
static java.lang.String |
shadeDouble(double d,
double max)
create a string representation whose gray value appears as an indicator of magnitude, cf. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MayaShades()
Method Detail |
---|
public static java.lang.String shadeDouble(double[] dd, double max)
dd
- max
-
public static java.lang.String shadeDouble(double d, double max)
d
- valuemax
- maximum value
public static java.lang.String format(double number, int digits, int maxlength)
number
- digits
- number of active digitsmaxlength
- maximum length of string
public static java.lang.String format(double number, int digits)
number
- digits
- number of active digits
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |