Code Yarns ‍👨‍💻
Tech BlogPersonal Blog

How to output to PDF in Gnuplot

📅 2015-Jun-19 ⬩ ✍️ Ashwin Nanjappa ⬩ 🏷️ gnuplot, pdf, terminal ⬩ 📚 Archive

Gnuplot is a great tool for quickly plotting data from a file and viewing it in a window:

plot("sales_data.txt")

To write or print this plot to a PDF file, set the pdf terminal, specify the output filename and plot again:

set terminal pdf
set output "sales_data.pdf"
plot("sales_data.txt")

Tried with: Gnuplot 5.0 and Ubuntu 14.04


© 2022 Ashwin Nanjappa • All writing under CC BY-SA license • 🐘 @codeyarns@hachyderm.io📧