-
-
Save dafuer/18cded971a254dd9e379 to your computer and use it in GitHub Desktop.
Plot from terminal
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# This i script shows an example about how to plot data directly copy/paste in the terminal. | |
# Example of execution: | |
# ./script.sh | |
# 1 2 3 | |
# 2 3 4 | |
# CTRL-D | |
# Then a graph will pop up | |
input=`cat` | |
echo "set terminal x11 persist | |
\$data <<EOD | |
$input | |
EOD | |
plot '\$data' u 1:2 with lines, \ | |
'' u 1:3 with points" | gnuplot -p |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment