Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MAINT: Change plotting function label/path behavior #51

Open
nawtrey opened this issue Dec 8, 2021 · 1 comment
Open

MAINT: Change plotting function label/path behavior #51

nawtrey opened this issue Dec 8, 2021 · 1 comment
Labels
API API-related changes maintenance

Comments

@nawtrey
Copy link
Collaborator

nawtrey commented Dec 8, 2021

The public plotting functions have parameters label and path that allow a user to specify a unique file name (without extension) and a save path to store their plot/plots. The way this is implemented is a bit awkward. It's probably sufficient to simply have a single parameter filename which, if specified, stores the plot/plots in the current working directory. It may not be the worst idea to give the option of specifying a separate path, but the current implementation requires both parameters, which is not ideal.

It would also be nice to save figures with different file types (e.g. .png, .pdf, .svg) based on user preference. For example, if the filename kinetic_diagram.svg is specified it will save it as this type, but if only kinetic_diagram is specified without an extension it defaults to .pdf. This will require some string parsing since not all file types would be supported, but it would be nice to have the option to choose the file type without too much hassle.

@nawtrey
Copy link
Collaborator Author

nawtrey commented Aug 18, 2024

Right now most figures are being closed (i.e. plt.close()) right before returning. I think we should change this slightly -- if a save path is given I think figures should be automatically closed, but if not I think it may be useful for some diagrams to be left open. Might be worth adding a check for the number of diagrams and raising a warning if the number exceeds 20 or something.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API API-related changes maintenance
Projects
None yet
Development

No branches or pull requests

1 participant