Legends
Though you can see basic examples of legends in the previous examples the basic commands are outlined below:
-
Legend() create a new legend and returns the reference
-
legend.add(object,text) where object is either a node, edge or convex hull. This command will add the object as a “prototype” and use the text as the title next to it. The text must be unique for a given legend.
-
legend.remove(text) will remove the object labeled by text from the legend
-
legend.removeAll() removes all objects from the legend
As of the 0.6 release of GUESS we also include a special GradientLegend object to visualize continuous data. The syntax for this GradientLegend object is:
GradientLegend(start_color, end_color, min, max, tick_mark_every)
The visualization will show the min and maximum value with a tick mark every tick_mark_every units. The following code generated the figure below:
colorize(freq,red,yellow) GradientLegend(red,yellow,freq.min,freq.max,10)



