Statistical Diagram Classification