* Any other value will be ignored and an error message will be sent to
* the error output.
*/
public void addLegend(String location) {
if (location.equalsIgnoreCase(EAST)) {
plotLegend = new LegendPanel(this, LegendPanel.VERTICAL);
add(plotLegend, EAST);
} else if (location.equalsIgnoreCase(SOUTH)) {
plotLegend = new LegendPanel(this, LegendPanel.HORIZONTAL);
add(plotLegend, SOUTH);
} else if (location.equalsIgnoreCase(WEST)) {
plotLegend = new LegendPanel(this, LegendPanel.VERTICAL);
add(plotLegend, WEST);
} else if (location.equalsIgnoreCase(NORTH)) {
plotLegend = new LegendPanel(this, LegendPanel.HORIZONTAL);
add(plotLegend, NORTH);
} else if (location.equalsIgnoreCase(INVISIBLE)) {
plotLegend = new LegendPanel(this, LegendPanel.INVISIBLE);
// add(legends, BorderLayout.NORTH);
} else {
System.err.println("Orientation " + location + " is unknonw.");
}
}