Saving/ returning plots #322
-
In plotting.py wouldn't it make more sense to return the fig and the axes? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
We do not return the |
Beta Was this translation helpful? Give feedback.
-
@EleniSmyrniou although we only return the axes in the
This will allow you to save your figure until you create another Returning just the axes allows for more flexibility in adjusting/appending to existing axes, while keeping a consistent function signature and it still allows you to access the Figure, so it seems like the best solution in our view. For maximum control you can create your own Subplot figure and provide the axes as arguments to the plotting functions. One thing that we could do is also provide this signature philosophy to the |
Beta Was this translation helpful? Give feedback.
@EleniSmyrniou although we only return the axes in the
plot_cpt
andplot_bore
functions, the Figure that is created under the hood is still active in matplotlib and can still be accessed by the general APIThis will allow you to save your figure until you create another
Figure
.Returning just the axes allows for more flexibility in adjusting/appending to existing axes, while keeping a consistent function signature and it still allows you to access the Figure, so it seems like the best solution in our view.
For maximum control you can create your own Subplot figure and provide the axes as arguments to the plotting functions.
One thing that we could…