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

Cannot flush output to file without destructing the Gnuplot instance #6

Open
dmikushin opened this issue Jun 2, 2018 · 1 comment

Comments

@dmikushin
Copy link

Apparently, none of gp << "set output";, gp << std::flush;, gp.do_flush() can do proper flushing of output svg file, if it's done without destructing the gp instance. I keep getting an empty output file. I guess, the library does not offer any explicit flushing API. Is there any workaround?

Thanks!

@dstahlke
Copy link
Owner

dstahlke commented Jun 3, 2018

I don't know. gp.do_flush() sends std::flush to boost::iostreams::stream and then calls fflush on the underlying file handle. If data is not getting through, it's probably held up in boost::iostreams. You can check whether boost has any extra flush functions. Make sure you're putting a newline at the end of each gnuplot command.

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