The program KUPLOT allows the user to save loaded data sets to a file. This might be necessary after a data set was altered or in cases where only part of the data shall be saved. To save a data set, use the command 'ksav' followed by the number of the data set to be saved. After entering the 'ksav' sublevel, you need to specify the output filename and the file format for the output file. In this section we will only discuss the saving of 1D data sets and the only available file format is 'xy' (see previous example). The following commands will save the loaded data set 1 (e.g. 'test.xy' from the example above):
1 ksav 1
2 outfile export.xy
3 form xy,0.0,5.0
4 show
5 run
In line 1 we enter the 'ksav' sublevel. The parameter specifies the data set we want to save, here data set 1. Next the output filename is set to 'export.xy' (line 2). The file format is set to 'xy' and the optional further parameters give x-limits (line 3), i.e. only data points with x-values between 0.0 and 5.0 will be saved. Note, that the default range are defined by the current plot window limits. Thus if the plot window set by the command 'skal' is smaller than the extend of the actual data set, only point that are visible in the current plot are saved if no limits are given with the 'form' command. The command 'show' (line 4) lists the current limits and finally the data are written to the specified file via the 'run' command (line 5). The command 'run' also exits the 'ksav' sublevel. To exit without actually writing a file use the 'exit' command.
The 'ksav' command has many additional options to save 2D data such as format conversion and the export of cross sections. These functions are discussed in chapter 3.4.