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

Saveas doesn't support pdf #68

Closed
MRedies opened this issue Aug 17, 2021 · 2 comments
Closed

Saveas doesn't support pdf #68

MRedies opened this issue Aug 17, 2021 · 2 comments

Comments

@MRedies
Copy link
Contributor

MRedies commented Aug 17, 2021

The plotdos routine:
https://masci-tools.readthedocs.io/en/latest/module_guide/code.html?highlight=plot_dos#masci_tools.vis.plot_methods.plot_dos

has a saveas argument, which I call with saveas="bla.pdf". This results in a file called bla.pdf.png. This is a bit unfortunate, since often you want a pdf, rather than a png (it's a vector graphic).

@janssenhenning
Copy link
Contributor

The saveas option only takes the filename without extension (however we could change that if it is wanted, overrriding the format if it is included in the saveas argument). To specify the format you can pass the keyword argument save_format with the wanted format, i.e. 'pdf' (You can also pass a list of formats if you need multiple different ones). Note that you can also specify additional options for saving with the save_options argument

You can find the information in the table
https://masci-tools.readthedocs.io/en/latest/module_guide/code.html#module-masci_tools.vis.matplotlib_plotter

@MRedies
Copy link
Contributor Author

MRedies commented Aug 17, 2021

Ok then I was confused by the interface. In matplotlib they determine the type trough the name, but I think either way is fine.

@MRedies MRedies closed this as completed Aug 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants