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
The 2 image export functions (export_svg and, export_png) require a "filename" target destination.
However, some use cases don't require the filesystem. E.g., to generate and send back directly a chart PNG to a client from a web server.
It would be very convenient to be able to specify as target, alternatively to a filename, a file-like-object. This is the approach used by pandas (they call usually the argument covering both cases "path", e.g. in DataFrame.to_feather(..., path=..., ...).
This would be easy to implement, as the underlying cairosvg library can handle both of these cases with the same call.
Absent this improvement, the current workaround is to use a temporary file, which lengthens the code and involves an unnecessary write access to the filesystem (use of temp files or not, security, cleanup logic in case of crashes, etc...)
lets_plot 4.0.1
python 3.11.5
macos 13.5.2
The text was updated successfully, but these errors were encountered:
The 2 image export functions (export_svg and, export_png) require a "filename" target destination.
However, some use cases don't require the filesystem. E.g., to generate and send back directly a chart PNG to a client from a web server.
It would be very convenient to be able to specify as target, alternatively to a filename, a file-like-object. This is the approach used by pandas (they call usually the argument covering both cases "path", e.g. in DataFrame.to_feather(..., path=..., ...).
This would be easy to implement, as the underlying cairosvg library can handle both of these cases with the same call.
Absent this improvement, the current workaround is to use a temporary file, which lengthens the code and involves an unnecessary write access to the filesystem (use of temp files or not, security, cleanup logic in case of crashes, etc...)
lets_plot 4.0.1
python 3.11.5
macos 13.5.2
The text was updated successfully, but these errors were encountered: