日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當(dāng)前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

Latex复杂三线图的处理

發(fā)布時間:2024/8/1 编程问答 38 豆豆
生活随笔 收集整理的這篇文章主要介紹了 Latex复杂三线图的处理 小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.

注意此文是講三線圖,不是講表格繪制。一般表格繪制非常推薦去這里直接生成 Tables Generator,就不用自己去寫代碼了。 如果要學(xué)習(xí)一些三線表的寫法,請往下看。

簡單的三線圖可以比較輕松地做出來,在中間使用\toprule ,\midrule,\bottomrule就可以實現(xiàn)三線圖的基本形式。需要用到\usepackage{bookmarks}宏包

具體如下

\begin{table*} \centering \caption{****} \begin{tabular}{c|c|c|} \toprule 1 & 1 & 1 \midrule 1 & 1 & 1 \bottomrule \end{tabular} \label{tbl:table-example} \end{table*}

其中c|c|c|是指三列都按居中排列,除了c還可以寫l(靠左),r(靠右),豎線是分割這三列,元素之間用&分隔開,顯示的效果如下:

但是如果要實現(xiàn)一些復(fù)雜的三線圖就需要一些復(fù)雜代碼了。給出之前有幾個基礎(chǔ),多列合并和多行合并。

%多列合并一般這樣使用 \multicolumn{cols}{pos}{text} 第一個參數(shù)是合并幾列,第二個是合并后內(nèi)容放哪里可以使用c l r, 第三個是放的內(nèi)容 %多行合并 \multirow{nrows}[bigstructs]{width}[fixup]{text} nrows 設(shè)定所占用的行數(shù)。 bigstructs 此為可選項,主要是在你使用了 bigstruct 宏包時使用。 width 設(shè)定該欄文本的寬度。如果想讓 LaTeX 自行決定文本的寬度,則用 * 即可。 fixup 此為可選項,主要用來調(diào)整文本的垂直位置。 text 所要排版的文本。可用 \\ 來強(qiáng)迫換行。 所以一般這樣使用: \multirow{number of rows}{*}{text}

下面給出幾個一個復(fù)雜的繪圖,很多情況都遇到了,可以在里面仿著去寫

  • 表格中寫列合并和行合并
  • %\cline{2-6} % 這樣使用cline能畫一條橫線在2-6 排之間 \begin{table*}\centering \begin{tabular}{ccccccc} % 控制表格的格式,7列\(zhòng)toprule \multirow{2}{*}{\textbf{Model}} &\multirow{2}{*}{\textbf{Skipped}} & \multirow{2}{*}{\textbf{Dilated}} & \multirow{2}{*}{\textbf{Attention}}&\multirow{2}{*}{\textbf{Fine-Tune}} & \multicolumn{2}{c}{\textbf{Accuracy}}\\&&&&&5-way 1-shot & 5-way 5-shot \\\midrule\textbf{Relation Net }& \checkmark & & & & 0.8449 &0.8325 \\\textbf{Relation Net} & \checkmark & & & \checkmark & 0.8950&0.8488 \\\textbf{Relation Net} & \checkmark & \checkmark & & &0.8624&0.8450 \\\textbf{Relation Net} & \checkmark & \checkmark & & \checkmark & 0.8866&0.8647 \\\textbf{Relation Net} & \checkmark & & \checkmark & & 0.8532&0.8599 \\ \textbf{Relation Net} & \checkmark & & \checkmark & \checkmark & 0.9268&0.8925 \\ \cline{1-7} %畫一條橫線\textbf{Our model} & \checkmark & \checkmark & \checkmark & & 0.8990&0.8537 \\ \textbf{Our model} & \checkmark & \checkmark & \checkmark & \checkmark& \textbf{0.9486}&\textbf{0.9039} \\ \bottomrule\end{tabular}\label{tbl:table1}\caption{Comparison of different obfuscations in terms of their transformation capabilities} \end{table*}

    能實現(xiàn)的效果如下:

    可以多思考一下表格合并是怎么寫的,仿著就能寫出來。\begin{table*} \end{table*}如果帶*在兩欄環(huán)境里面就可以跨欄顯示,如果不帶*就是單欄顯示,如下:

  • 合并及單欄顯示
  • \begin{table}\centering\begin{tabular}{cccc}\topruleModel&Fine-Tune&\multicolumn{2}{c}{Accuracy}\\\midruleCNN&\checkmark&\multicolumn{2}{c}{0.709}\\Siamese Net& &\multicolumn{2}{c}{0.5711}\\\cline{1-4}& & \small{5-way 1-shot} &\small{5-way 5-shot}\\\cline{3-4}Our model& & 0.8990&0.8537\\Our model&\checkmark&0.9486&0.9039\\\bottomrule\end{tabular}\label{tbl:CLASSIFICATION RESULTS}\caption{CLASSIFICATION RESULTS (ACCURACY) ON SCREEN DEFECT DATASET} \end{table}

    顯示圖如下:

    3. 三線圖中插入圖片

    使用minipage就可以實現(xiàn)

    \begin{table*}\centering\begin{tabular}{cccccccc}\topruleclass& Black& Blackpoint& Blackscratch& Mura& Scratch& White& Block\\\midruleimage & \begin{minipage}[c]{0.1\textwidth} \includegraphics[width=16mm, height=16mm]{figure/black} \end{minipage} & \begin{minipage}[c]{0.1\textwidth} \includegraphics[width=16mm, height=16mm]{figure/blackpoint} \end{minipage} &\begin{minipage}[c]{0.1\textwidth} \includegraphics[width=16mm, height=16mm]{figure/blackscratch} \end{minipage}&\begin{minipage}[c]{0.1\textwidth} \includegraphics[width=16mm, height=16mm]{figure/block} \end{minipage}&\begin{minipage}[c]{0.1\textwidth} \includegraphics[width=16mm, height=16mm]{figure/mura} \end{minipage}&\begin{minipage}[c]{0.1\textwidth} \includegraphics[width=16mm, height=16mm]{figure/scratch} \end{minipage}&\begin{minipage}[c]{0.1\textwidth} \includegraphics[width=16mm, height=16mm]{figure/white} \end{minipage}\\\bottomrule\end{tabular}\label{tbl:DEFECT DATASET}\caption{ MOBILE PHONE SCREEN DEFECT DATASET} \end{table*}

    顯示如下:

    4. 三線圖中加入公式

    \begin{table}\centering\caption*{\Large{總~結(jié)}} %加*取消顯示caption前的table x\begin{tabular}{c|c}\toprule$F$ 表象(基矢 $\psi_{k}$ )&$F^{\prime}$ 表象(基矢 $\left.\psi_{a}^{\prime}\right)$\\\midrule\multicolumn{2}{c}{態(tài) $\psi$}\\$a=\left(\begin{array}{c}a_{1} \\ a_{2} \\ \vdots\end{array}\right), a_{k}=\left(\psi_{k}, \psi\right)$ &$a^{\prime}=\left(\begin{array}{c}a_{1}^{\prime} \\ a_{2}^{\prime} \\ \vdots\end{array}\right), a_{a}^{\prime}=\left(\psi_{a}^{\prime}, \psi\right)$\\\cline{1-2}\multicolumn{2}{c}{力學(xué)量 $\hat{L}$}\\$\begin{array}{c}L=\left(L_{k}\right)=\left(\begin{array}{ccc}L_{11} & L_{12} & \cdots \\ L_{21} & L_{22} & \cdots \\ \cdots & \cdots & \cdots\end{array}\right) \\ L_{k j}=\left(\psi_{k}, \hat{L}, \psi_{j}\right) \end{array}$ & $\begin{array}{c}L^{\prime}=\left(L_{\alpha \beta}^{\prime}\right)=\left(\begin{array}{ccc}L_{11}^{\prime} & L_{12}^{\prime} & \cdots \\ L_{21}^{\prime} & L_{22}^{\prime} & \cdots \\ \cdots & \cdots & \cdots\end{array}\right) \\L_{a \beta}^{\prime}=\left(\psi_{a}^{\prime}, \hat{L} \psi_{\beta}^{\prime}\right)\end{array}$\\\bottomrule\end{tabular}\label{tbl:zongjie} \end{table}

    顯示效果如下:

    總結(jié)

    以上是生活随笔為你收集整理的Latex复杂三线图的处理的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。

    如果覺得生活随笔網(wǎng)站內(nèi)容還不錯,歡迎將生活随笔推薦給好友。