update the functions for draw curves using python script.