How to draw a table with using gnuplot

谁都会走 提交于 2019-12-25 01:56:18

问题


I would like to superimpose table on a plot with using gnuplot. Basically, I have table values and want to create a table and add it on the signal plot.


回答1:


This can be done using the epslatex terminal and using set label, defining the table using latex syntax. A minimal example:

Within gnuplot do:

set term epslatex
set output "plot.eps"
set label at screen 0.5,0.5 '\begin{tabular}{c c}1 & 2 \\ 3 & 4\end{tabular}'
plot sin(x)

Then create a latex file document.tex with the following code:

\documentclass{article}
\usepackage[papersize={100cm,100cm}]{geometry}
\usepackage{graphicx}

\begin{document}

\thispagestyle{empty}

\include{plot}

\end{document}

Then run

latex document.tex
dvipdf document.dvi
pdfcrop document.pdf

The final output is document-crop.pdf, which will now look like this:

You can use latex syntax to further format the table, and obviously all the different gnuplot options compatible with the epslatex terminal.



来源:https://stackoverflow.com/questions/22427878/how-to-draw-a-table-with-using-gnuplot

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!