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

Export to file-like object #938

Merged
merged 20 commits into from
Dec 18, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix path name
  • Loading branch information
RYangazov committed Dec 13, 2023
commit 6741bff117f0bfe6953f1d53cf324da0f33d55be
4 changes: 2 additions & 2 deletions python-package/lets_plot/export/ggsave_.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,9 @@ def ggsave(plot: Union[PlotSpec, SupPlotsSpec, GGBunch], filename: str, *, path:
elif ext in ['html', 'htm']:
return _to_html(plot, pathname, iframe=iframe)
elif ext == 'png':
return _export_as_raster(self, path, scale, 'png')
return _export_as_raster(plot, pathname, scale, 'png')
elif ext == 'pdf':
return _export_as_raster(self, path, scale, 'pdf')
return _export_as_raster(plot, pathname, scale, 'pdf')
else:
raise ValueError(
"Unsupported file extension: '{}'\nPlease use one of: 'png', 'svg', 'pdf', 'html', 'htm'".format(ext)
Expand Down