user42298
user42298

Reputation: 1911

How do I include greek letter in gnuplot?

I'm using ubuntu 14.04 and gnuplot-x11, and found that for greek letter alpha,

{/symbol a} will work, but that just shows me {/symbol a}, not greek letter alpha.

I tried {\symbol a} or other options, but that does not work..

Upvotes: 17

Views: 76643

Answers (2)

Sadhana Singh
Sadhana Singh

Reputation: 49

After using enhanced mode, take care for using {/Symbol a}, you have used {/symbol a}, small letter of "s" in Symbol, so you were not getting greek letter alpha.

Upvotes: 4

Christoph
Christoph

Reputation: 48390

Using the syntax {/Symbol a} requires that you enable the enhanced mode. This can be done in several ways:

  1. When setting the terminal

    set terminal ... enhanced
    
  2. After setting the terminal with

    set termoption enhanced
    
  3. Explicitely for a single label

    set xlabel '{/Symbol a}' enhanced
    

Depending on the output terminal you are using, the best option is to use utf-8 encoding and directly input the characters:

set encoding utf8
set xlabel 'α'

Upvotes: 28

Related Questions