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

Consider plotXY writing binary file format #22

Open
ericjster opened this issue May 16, 2019 · 0 comments
Open

Consider plotXY writing binary file format #22

ericjster opened this issue May 16, 2019 · 0 comments

Comments

@ericjster
Copy link

Consider changing Plot.plotXY to write a binary file, for faster execution and less IO in both the go code and gnuplot code.

This is a consideration when plotting millions or tens of millions of points. Most other plotting packages can't handle that size. For term png or gif, 20M points takes about 5 seconds.

Here is an example of a gnuplot command for reading a binary file with an array of struct { x, y float32 }:
plot '/tmp/gnuplotdata.bin' binary format='%float32%float32' using 1:2

Here is a gist for writing a binary file, using memory mapped IO. It takes about 200 ms for 20M points.
https://gist.github.com/ericjster/eea32820660e26b16174fadd4034dd9d

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

1 participant