How to set key
(legend) font size in gnuplot?
I read the gnuplot introduction file and find no related configuration about this property. I can set font type and size for labels, tics, but only key can not be set the font?
The set key enables a key (or legend) describing plots on a plot. The contents of the key, i.e., the names given to each plotted data set and function and samples of the lines and/or symbols used to represent them, are determined by the title and with options of the {s}plot command.
Gnuplot will still use its own default font table to select font indices. Thus, 'Helvetica' will give you an index of 1, which should get you the first entry in your application's default font table. 'Helvetica Bold' will give you its second entry, etc.
The font for the key can be set in gnuplot 4.4. For example:
set key font ",20"
would set the size of the font to 20.
For older gnuplot versions like 4.2, you can do:
set terminal enhanced font "Helvetica,18"
It will apply to any textual labels in the terminal.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With