com.panayotis.gnuplot.plot
Class Axis

java.lang.Object
  extended by java.util.AbstractMap<K,V>
      extended by java.util.HashMap<java.lang.String,java.lang.String>
          extended by com.panayotis.gnuplot.PropertiesHolder
              extended by com.panayotis.gnuplot.plot.Axis
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, java.util.Map<java.lang.String,java.lang.String>

public class Axis
extends PropertiesHolder

This class represents the various axes of the plot. It is used to set various axis-related parameters

See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.panayotis.gnuplot.PropertiesHolder
NL
 
Method Summary
 java.lang.String getName()
          Get the name of this axis as a String.
 void setBoundaries(double from, double to)
          Define the area to plot.
 void setLabel(java.lang.String label)
          Set the label of this axis.
 void setLabel(java.lang.String label, java.lang.String font, int size)
          Set the label and the font of the current axis
 void setLogScale(boolean log)
          Set whether this axis is in logarithmic scale or not
 
Methods inherited from class com.panayotis.gnuplot.PropertiesHolder
appendProperties, set, set, unset
 
Methods inherited from class java.util.HashMap
clear, clone, containsKey, containsValue, entrySet, get, isEmpty, keySet, put, putAll, remove, size, values
 
Methods inherited from class java.util.AbstractMap
equals, hashCode, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Map
equals, hashCode
 

Method Detail

getName

public java.lang.String getName()
Get the name of this axis as a String.

Returns:
The name of the axis. Usually it is "x" or "y".

setLogScale

public void setLogScale(boolean log)
Set whether this axis is in logarithmic scale or not

Parameters:
log - Set, if this axis is in logarithmic scale

setLabel

public void setLabel(java.lang.String label)
Set the label of this axis.

Parameters:
label - THe label of this axis
See Also:
setLabel(String,String,int)

setLabel

public void setLabel(java.lang.String label,
                     java.lang.String font,
                     int size)
Set the label and the font of the current axis

Parameters:
label - The label of this axis
font - Font name
size - Font size

setBoundaries

public void setBoundaries(double from,
                          double to)
Define the area to plot.
Note that if we have choosed log scale, then the values should be guaranteed to be larger than zero. If the axis is in log scale, do not set a value less than zero or else a plot error will occure.

Parameters:
from - The minimum value
to - The maximum value