Search code examples
latexgnuplot

Gnuplot how to represent calligraphied letters


I am using LaTeX and Gnuplot-5.2. In several graphs, I need to represent a calligraphied letter (e.g., L) which in LaTeX math equations appears as \mathcal L.

How to represent a calligraphied letter in Gnuplot?


Solution

  • Probably you can use one of the latex terminals. In gnuplot console type set terminal to see which terminals you have available.

    Another option would be if you search for cmsy10.ttf and install the font and use it in gnuplot. This is as it would work in Windows, I'm not 100% sure for Linux.

    Addition: Check help enhanced to see options about enhanced text mode. Not all terminals might support this.

    Code:

    ### set different fonts
    reset session
    
    set title "ABCDEFGHIJKLMNOPQRSTUVWXYZ" font "cmsy10,20"
    
    myLabel = '{/"cmsy10":Normal=20 L{/"Times New Roman":Normal=20 (w)}}'
    set label at graph 0.5, graph 0.8 myLabel
    
    plot x
    ### end of code
    

    Result: (wxt terminal)

    enter image description here