我是 Latex 绘图新手。有人能教我如何绘制此图表吗

我是 Latex 绘图新手。有人能教我如何绘制此图表吗

需要用 Latex 绘制的图表

请注意,D 和 F 附近有意外的墨迹污迹。非常感谢您的帮助。

答案1

一个解决方案是,不使用 tikz-cd,直接使用 tikz 节点

\documentclass{standalone}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{tikz}

\begin{document}
\pagestyle{empty}
\begin{tikzpicture}[auto]
    \node(L) at (0,0) {L};
    \node[below of=L, node distance=2cm](F){F};
    \node[below of=F, node distance=2cm](O){O};
    \node[above right of=F](D){D};
    \node[below right of=F](M){M};
    \node[below right of=D](K){K};
    \node[above right of=K](E){E};
    \node[right of=E](C){C};
    \node[below right of=C](J){J};
    \node[above right of=J](A){A};
    \node[below right of=A](G){G};
    \node(N)at(L-|G){N};
    %Insert missing Nodes
    \path[draw] (L) -- (N);
    \path[draw] (L) -- (F);
    \path[draw] (L) -- (C);
    %Insert missing lines
\end{tikzpicture}
\end{document}

生成以下图像 在此处输入图片描述

我很确定您可以自己插入缺失的节点和线条。

干杯

答案2

这里

% arara: pdflatex

\documentclass{article}
\usepackage{tikz-cd}

\begin{document}
\begin{tikzcd}[every arrow/.append style={dash,shorten >= -.1cm,shorten <= -.1cm},column sep={1cm,between origins}]
    L \arrow{rrrrrrr}\arrow{dd}\arrow{drrrr} &[-.5cm] &[-.5cm] & & & &[-.5cm] &[-.5cm] N \arrow{dd} \\
    & D \arrow{dr} & & E \arrow{r}\arrow{urrrr} & C \arrow{dr} & & A \arrow{dr} & \\[-.5cm]
    F \arrow{dd}\arrow{ur}\arrow{dr} & & K \arrow{ur}\arrow{dr} & & & J \arrow{ur}\arrow{dr} & & G \arrow{dd} \\[-.5cm]
    & M \arrow{ur} & & B \arrow{r}\arrow{drrrr} & H \arrow{ur} & & P \arrow{ur} & \\
    O \arrow{rrrrrrr}\arrow{urrrr} & & & & & & & I 
\end{tikzcd}
\end{document}

在此处输入图片描述

答案3

另一种方法是使用元帖子创建外部图形并将其包含在内includegraphics。这是使用 AMS Euler 字体来保留手绘字体的版本。

在此处输入图片描述

prologues := 3;
outputtemplate := "%j%c.eps";

beginfig(1);

u = 5mm;

z.A = -z.M = (4u,u);
z.C = -z.B = (u,u);
z.D = -z.P = (-4u,u);
z.E = -z.H = (-u,u);
z.F = -z.G = (-5u,0);
z.I = -z.L = (5u,-4u);
z.J = -z.K = (3u,0);
z.N = -z.O = (5u,4u);

draw z.A -- z.G -- z.P -- z.J 
  -- z.C -- z.E
  -- z.K -- z.M -- z.F -- z.D
  -- z.K -- z.B -- z.H -- z.J -- cycle;

draw z.G -- z.N -- z.L -- z.F -- z.O -- z.I -- cycle;

draw z.C -- z.L;
draw z.E -- z.N;
draw z.B -- z.I;
draw z.H -- z.O;

forsuffixes $=A,B,C,D, E,F,G,H, I,J,K,L, M,N,O,P: 
  unfill fullcircle scaled .9u shifted z$; 
  label(str $ infont "eurm10", z$);
endfor

endfig;
end.

答案4

这是针对您的问题的另一个优雅的解决方案。

\documentclass[border=10pt]{standalone}
\usepackage{tikz}
\usetikzlibrary{positioning,calc}


\begin{document}
\begin{tikzpicture}
    [%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
        node distance =6cm,
        place/.style={circle,draw=blue!50,fill=blue!20,thick,
                      inner sep=0pt,minimum size=6mm}
    ]%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    \draw[step=1cm,cyan,very thin] (-5, 5) grid (4,-4);
    \node[place] (L) at (-4,4) {L};
    \node[place] (N) [right=of L]  {N};
    \node[place] (O) [below=of L]  {O};
    \node[place] (I) [below=of N]  {I};
    \node[place] (F)  at (barycentric cs:L=0.1,O=0.1)  {F};
    \node[place] (G)  at (barycentric cs:N=0.1,I=0.1)  {G};

    \node[place] (K) [right=of F,xshift=-5.5cm] {K};
    \node[place] (D) [above=of F,yshift=-5.5cm] at (barycentric cs:F=0.1,K=0.1)  {D};
    \node[place] (M) [below=of F,yshift= 5.5cm] at (barycentric cs:F=0.1,K=0.1)  {M};

    \node[place] (J) [left=of G,xshift=5.5cm] {J};
    \node[place] (A) [above=of G,yshift=-5.5cm] at (barycentric cs:G=0.1,J=0.1)  {A};
    \node[place] (P) [below=of G,yshift= 5.5cm] at (barycentric cs:G=0.1,J=0.1)  {P};

    \node[place] (E) [right=of D,xshift=-4.8cm] {E};
    \node[place] (C) [left=of  A,xshift= 4.8cm] {C};
    \node[place] (B) [right=of M,xshift=-4.8cm] {B};
    \node[place] (H) [left=of  P,xshift= 4.8cm] {H};

    \draw[thick] (L) -- (N);
    \draw[thick] (L) -- (F);
    \draw[thick] (L) -- (C);
    \draw[thick] (N) -- (G);
    \draw[thick] (N) -- (E);
    \draw[thick] (O) -- (F);
    \draw[thick] (O) -- (H);
    \draw[thick] (O) -- (I);
    \draw[thick] (I) -- (G);
    \draw[thick] (I) -- (B);

    \draw[thick] (F) -- (D);
    \draw[thick] (F) -- (M);
    \draw[thick] (K) -- (D);
    \draw[thick] (K) -- (M);

    \draw[thick] (G) -- (A);
    \draw[thick] (G) -- (P);
    \draw[thick] (J) -- (A);
    \draw[thick] (J) -- (P);

    \draw[thick] (K) -- (E);
    \draw[thick] (K) -- (B);
    \draw[thick] (J) -- (C);
    \draw[thick] (J) -- (H);
    \draw[thick] (E) -- (C);
    \draw[thick] (B) -- (H);

\end{tikzpicture}
\end{document}

在此处输入图片描述

相关内容