如何将pdf图像添加到gnuplot绘图?
我有一个PDF格式的图像,我想添加到现有的gnuplot绘图中 我当前的代码如下:如何将pdf图像添加到gnuplot绘图?,gnuplot,Gnuplot,我有一个PDF格式的图像,我想添加到现有的gnuplot绘图中 我当前的代码如下: set terminal postscript eps enhanced color solid font "Nimbus Roman No9 L" 35 set output '|epstopdf --filter > Patterns.pdf' set size 1.8,1.8 set style data histogram set style histogram cluster gap 1 plot
set terminal postscript eps enhanced color solid font "Nimbus Roman No9 L" 35
set output '|epstopdf --filter > Patterns.pdf'
set size 1.8,1.8
set style data histogram
set style histogram cluster gap 1
plot 'Patterns.dat' using ($2/2.90):xtic(1) title col fs pattern 3
pdf文件存储在image.pdf中。至少可以通过
epsletase
终端完成。首先,在我的示例中,我将生成一个pdf文件,它是gnuplot生成的图形:
set term epslatex standalone
set output "plot1.tex"
plot sin(x)
现在,在gnuplot之外,我生成了pdf文件(名为plot1.pdf
):
看起来是这样的:
为了将其嵌入到gnuplot图形中,我再次使用epsletase
终端并嵌入plot1.pdf
,就像我使用带有gnuplot标签的\includegraphics[]{}
环境嵌入latex文档中的任何pdf文件一样:
set term epslatex standalone
set output "plot2.tex"
set label at graph 0.75,0.25 '\includegraphics[width=2cm]{plot1.pdf}'
plot x
然后,再次运行pdflatex
:
pdflatex plot2.tex
生成的plot2.pdf
,如下所示:
通过更改标签的位置
可以更改嵌入pdf的位置;通过更改宽度
可以更改嵌入pdf的宽度,猜猜看是什么
pdflatex plot2.tex