Superscript / index in labels for gnuplot read from data file

1 1 A_{3} 2 2 C_{2} 3 3 ^{5}C_{1} 

I have an input file similar to this. The third column is for labels at this point (in latex format). How can I get these marks on the graph, how will they appear after latex compilation (like superscript / index / greek alphabet, etc.).

+6
source share
1 answer

The syntax in the example you are giving is acceptable for gnuplot's own extended text mode, as well as for LaTeX. Therefore enough to say

 set termopt enhanced # turn on enhanced text mode plot 'mydat' using 1:2:3 with labels 

Most gnuplot output modes ("terminals") will accept this.

But gnuplot's advanced text mode only handles a small subset of LaTeX. If you need more complex things, you will need to use one of the LaTeX terminals. In this case, do not enable the extended text mode, since you want to transfer the entire line to LaTeX without processing.

+7
source

Source: https://habr.com/ru/post/910568/


All Articles