1
votes

I would like to be able to control the font size for the labels produced by

plot file u 1:2:(sprintf("%4.3f", $1)) with labels offset char 0,2 t ""

but have not found a way yet. Let me add that I use the epslatex terminal.

1
From help labels: plot 'cities.dat' using 5:4:1 with labels font "Times,8" - user8153
Does not seem to have any effect. Note that I use the epslatex terminal. - painfulenglish
In the case of the latex terminals the font choice and size are under the control of LaTeX rather than gnuplot's internal enhanced text processing. You would have to format the label as a TeX command. - Ethan
plot file u 1:2:(sprintf('{\\tiny %4.3f}', $1)) with labels notitle - Ethan
Note that the format uses single quotes so only two backslashes are needed. If for some reason you need to place it in double quotes an extra layer of escape processing is needed, thus four backslashes - Ethan

1 Answers

3
votes

In the case of the latex terminals the font choice and size are under the control of LaTeX rather than gnuplot's internal enhanced text processing. You would have to format the label as a TeX command.

plot file u 1:2:(sprintf('{\\tiny %4.3f}', $1)) with labels notitle    

Note that the number of escaped backslashes depends on whether you place the format in single or double quotes.