How to generate a three column data file in gnuplot

Noman Ahmad Khan :

its my first question in this community. I am running the following short script in gnuplot (5.2),

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

The resulting data file contains only two columns; first a series of numbers from -10 to 10, and second their squares (as expected), but the third column (which should be the cubes of entries in first column) is missing. How can I get that third column in my data file?

theozh :

Use with table. Check help plot with table.

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

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=398239&siteId=1