plot animated graph, HTML and pdf