integrate matplotlib in flask