A function for making a pie chart. With the values ​​of a variable and a label for every value, this function prepares a file with instructions to be sent to Gnuplot (the program which gretl uses for making graphics). This file is saved in the 'dotdir' Gretl directory. Then, the file is executed by Gnuplot and the graph is presented in a popup window. This package has a single function with four parameters: A: An N x 1 matrix (where N is the number of observations, N<11) S: optional string (consisting of N labels, separated by spaces) radius: optional scalar, determines the radius of the circle dist: optional scalar, determines where the labels are placed An image of 640x480 pixels is created. The radius is a value in the range [0,1] which is measured according to the total width of the image. In tests it has been found that suitable values ​​may be between 0.2 and 0.35; the default value if omitted is 0.3. Labels are placed at an intermediate angle of each piece. The parameter 'dist' determines the distance from the origin; dist = 1 indicates that the labels will be placed right on the edge of the circle. In our tests, values ​​between 1.1 and 1.5 have been quite adequate; the default value if omitted is 1.2. Passing the labels string S is optional if the input matrix has row labels attached (e.g. through the rnameset function), but S will be given priority if present. Note that if your labels are stored in an array of strings S you can easily convert them to a space-separated string by doing 'flatten(S, 1)'. If S is omitted but A has no row names an error occurs. Changelog (after v1.0): - version 1.2, January 2026, applied by the gretl team: fix a bug with blanks in file paths (which probably prevented it to work on many Windows systems -- people, please do report bugs!) - version 1.11, 2021, applied by the gretl team - version 1.1, March 2020, applied by the gretl team: fix possible problems when the comma is the local decimal separator; increase gretl version requirement to 2018c due to internally modernized syntax