Update figure.py and relates
Bug fix