Reputation: 3
I am using GNUPlot 4.7 on Windows with the epslatex terminal. Using latex commands in labels in single quotes works fine. Now I'd like to plot a datafile with a text column including latex commands using the labels plotting style in gnuplot:
data.txt
"\textalpha\n Ge" 0.6 1.05
"\textalpha\n Si" 1.09 0.7
"\ce{GaAs}" 1.43 1.05
Plotting command:
plot 'data.txt' u (column(2)):(column(3)):(column(1)) axes x2y1 w labels center offset 0,1 notitle
However, in the resulting tex file the backslashes and immediately following charakters are missing because they were parsed by GNUPlot. How can I make GNUPlot use the unchanged text within the quotes for its labels? I have tried with no success:
$\
or $\\
Upvotes: 0
Views: 604
Reputation: 7627
You need four backslashes to escape one: use "$\\\\alpha$"
in your data file to get $\alpha$
in the tex file. Don't ask me why. Out of curiosity, you're plotting what against band gap?
Upvotes: 0