Skip to content

Instantly share code, notes, and snippets.

@retorillo
Last active July 8, 2018 21:45
Show Gist options
  • Save retorillo/7d48cb0845bbd4e9e28bd68e79cfa6d5 to your computer and use it in GitHub Desktop.
Save retorillo/7d48cb0845bbd4e9e28bd68e79cfa6d5 to your computer and use it in GitHub Desktop.

GNUPLOT References

  • power is ** (not ^)
  • show variables
  • e = 2.7182818284 naiper's constant is not defined by default
  • unset key
  • set size ratio -1
  • set autoscale
  • set margin and set bmargin
  • set xrange[0:1] and set xrange[0:1]
  • plot <expression> and replot <expression> and replot (without expression, update only)

Execute handy

-e argument can be put multiple times. -p is mandatory if want to prevent that window instantly exit.

gnuplot -p -e "plot 'data' using 1:2 with line, 'data' using 1:3 with line"
\ -e "set xrange [0:100]" -e "replot"

Execute by script file

gnuplot -p script.gpi
gnuplot -c script.gpi

*.gpi seems to be recommended. https://stackoverflow.com/questions/5497889/is-there-a-standard-file-extension-for-gnuplot-files#10053805

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment