|
|
|||||||||||||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||||||||||||
java.lang.Objectde.lmu.ifi.dbs.elki.visualization.scales.LinearScale
public class LinearScale
Class to handle a linear scale for an axis. The computed scales are rounded to be on decimal borders, choosing an appropriate resolution to have between 4 and 31 major tics (3 to 30 intervals). Future versions might use major/minor tics to get even nicer values.
| Field Summary | |
|---|---|
private double |
delta
Scale delta := max - min |
private int |
log10res
Scale resolution in log10. |
private double |
max
max value of the scale |
private double |
min
min value of the scale |
private double |
res
Scale resolution |
private double |
ZOOMFACTOR
|
| Constructor Summary | |
|---|---|
LinearScale(double min,
double max)
Constructor. |
|
| Method Summary | |
|---|---|
String |
formatValue(double val)
Format value according to the scales resolution (i.e. appropriate number of digits) |
double |
getLog10Res()
Get resolution (scale interval size) |
double |
getMax()
Get maximum value (scale, not data). |
double |
getMin()
Get minimum value (scale, not data). |
double |
getRes()
Get resolution (scale interval size) |
double |
getScaled(double val)
Covert a value to it's scale position |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private final double ZOOMFACTOR
private double min
private double max
private double res
private int log10res
private double delta
| Constructor Detail |
|---|
public LinearScale(double min,
double max)
min - actual minimum in the datamax - actual maximum in the data| Method Detail |
|---|
public double getMin()
public double getMax()
public double getRes()
public double getLog10Res()
public double getScaled(double val)
val - data value
public String formatValue(double val)
val -
|
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||