intermediate fix for analyze.
Added legend.