hack to get figure from the graphs