Reputation: 145
I want to have a gnuplot with a box on the right top corner like the one below. My difficulties are both:
Upvotes: 0
Views: 299
Reputation: 15093
set term cairolatex eps standalone size 3in,3in
set output 'Q.tex'
set key box opaque samplen 0.5
plot for [i=1:4] sinc(x)**i title sprintf('\tiny${\hat{Q}=%d}$',i) lw 2
The standalone
keyword wraps the output in minimal LaTeX commands so that you can run latex Q
directly. Omit this if you want to produce a LaTeX fragment for including in a larger document.
I show how to construct a formatted title that includes a LaTeX font size. Note that the format uses single quotes rather than double quotes.
This example uses cairolatex eps
because you specifically asked about an eps file. Normallay I would use cairolatex png
or cairolatex pdf
and process afterwards with pdflatex
rather than plain latex
.
Upvotes: 1
Reputation: 743
If you want to include your figure into LaTeX, you should use the terminal cairolatex
, then you can include LaTeX code in your plots:
plot "your.data" title '$\hat{Q}=10$'
Concerning your second question, have a look at the manual concerning set key
.
Upvotes: 1