You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Plotter has a savedir parameter for which the documentation says it specifies the directory where to save the plot to. However, the _save function interprets this parameter as a file path:
This means plotting with savedir='/example/path' would result in a file /example/path__primary.png, where /example/path/__primary.png would be expected.
Besides, when choosing to not display the plot, I don't think __primary or __secondary should be added to the filename. From an API standpoint, it would probably be best to let the user flexibly choose the path and filename to save to (potentially adding the image extension).
The text was updated successfully, but these errors were encountered:
yes, this is indeed a bit of a mess, sorry for that.
Could you have a look at the savefig_handeling branch where I tried to address this? Specifically, I now added a savename argument to the CockpitPlotter.plot function, which lets you define the name, and now the savedir should really only describe the directory.
Great, this looks more convenient. I would not insist on adding the __primary string though. If the plot is not displayed anywhere, this seems to be irrelevant for the filename.
Description
Plotter has a
savedir
parameter for which the documentation says it specifies the directory where to save the plot to. However, the_save
function interprets this parameter as a file path:cockpit/cockpit/plotter.py
Lines 400 to 405 in 937b3ea
This means plotting with
savedir='/example/path'
would result in a file/example/path__primary.png
, where/example/path/__primary.png
would be expected.Besides, when choosing to not display the plot, I don't think
__primary
or__secondary
should be added to the filename. From an API standpoint, it would probably be best to let the user flexibly choose the path and filename to save to (potentially adding the image extension).The text was updated successfully, but these errors were encountered: