Patlak plot, preliminary version. Also, helper functions for Patlak and Logan (still not modified)