using Agg for dotprod.py