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

Allow getting back the svg as a string #40

Closed
Hampei opened this issue Nov 4, 2015 · 2 comments
Closed

Allow getting back the svg as a string #40

Hampei opened this issue Nov 4, 2015 · 2 comments

Comments

@Hampei
Copy link

Hampei commented Nov 4, 2015

We're trying out a few ways of rendering svg's from R and svglite seems to create the nicest svg's by far.

But we use R as service and only ever return json from our scripts, which makes writing to disk and reading from it a unnecessary expensive task that needs clean up.

Defining either a ofstream or a std::stringstream at the top, based on whether a filename has been passed, should make this doable, without too much overhead.
Though I appreciate the code will need to be move a bit more to the c++ side of syntax.

I might have a go at this soon if you feel you would accept such a pull l request.

@hadley
Copy link
Member

hadley commented Nov 4, 2015

I'd be happy to review a PR.

@hadley
Copy link
Member

hadley commented Nov 10, 2015

This would also be a nice way of supporting #6, assuming there's a C++ stream class that does compression.

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