如何在 gnuplot 中生成三列数据文件

How to generate a three column data file in gnuplot

这是我在这个社区中的第一个问题。我是 运行 gnuplot (5.2) 中的以下简短脚本,

set table "testable.txt" plot '+' using 1:(**2):(**3) unset table

生成的数据文件仅包含两列;首先是从 -10 到 10 的一系列数字,其次是它们的平方(如预期的那样),但是第三列(应该是第一列中条目的立方体)丢失了。如何在我的数据文件中获取第三列?

使用with table。检查 help plot with table.

set table "testable.txt"
plot '+' using 1:(**2):(**3) with table
unset table