Elena Greg
Elena Greg

Reputation: 1165

Gnuplot - font from LaTeX

How to set the default font from LaTeX to gnuplot, please?

enter image description here

set encoding iso_8859_1
set term pngcairo size 1500,1000 enhanced font "???????,28"
set output "file.png"

Edit after advice I downloaded cmunrm.ttf and use

set encoding iso_8859_1
set term pngcairo size 1500,1000 enhanced font "cmunrm,28"

However this has happened:

enter image description here

Upvotes: 1

Views: 848

Answers (1)

theozh
theozh

Reputation: 25684

If you want to use a special font you have to install it. In my case this would be, e.g. cmr10.ttf. You can find the cm fonts in the ctan archive.

Code:

set title "ABCDEFGHIJKLMNOPQRSTUVWXYZ\nabcdefghijklmnopqrstuvwxyz" font "cmr10,20"

plot x

Result:

enter image description here

Upvotes: 2

Related Questions