tikzi 状态图的统一尺寸

tikzi 状态图的统一尺寸

我使用以下代码编译了一个状态图,但圆圈的大小不一致。谁能告诉我如何使它统一。大小应该适合双栏文章,因此它应该适合一半的页面。

    \begin{tikzpicture}[shorten >=1pt,on grid,auto, state/.style={circle, draw, minimum size=0.65cm}]
        \tikzstyle{every state}=[fill={rgb:black,1;white,7}]
        \node[state] (t1) {$1$};
        \node[state, right=1.0cm of t1] (t2) {$2$};
        \node[state, right=1.0cm of t2] (t3) {$3$};
        \node        (q_dots) [right=1.0cm of t3] {$\cdots$}; 
        
        
        \node[state, right=2.5cm of t3] (tmin) {$t_{min}$};
        \node[state, right=1.3cm of tmin] (tmax2) {$t_{max-1}$};
        \node[state, right=1.3cm of tmax2] (tmax) {$t_{max}$};
        
        \path[->]
        (q_dots) edge       node {1} (t3)
        (tmin) edge         node {1} (q_dots)
        
        (t3)    edge        node {1} (t2)
        (t2)    edge        node {1} (t1)
        (tmax)  edge    node{1} (tmax2)
        (tmax2) edge    node{1} (tmin)
        (t1)   edge [bend left]     [pos=0.8, sloped, above]node{1/$D$}(tmax)
        (t1)   edge [bend left]     [pos=0.8, sloped, above]node{1/$D$} (tmax2)
        (t1)   edge [bend left]     [pos=0.8, sloped, above]node{1/$D$} (tmin);
    \end{tikzpicture}
    
    \caption{State Diagram for Timeout process}
    \label{stateMachineTO}
\end{figure}  

我的乳胶代码的输出是这样的

在此处输入图片描述

我想要这样的输出

在此处输入图片描述

tmin 和 tmax-1 之间有一些我也无法绘制的 cdot

答案1

在此处输入图片描述

\documentclass[border=1cm]{standalone}
\usepackage{tikz}
\usetikzlibrary{chains, positioning}
%\usepackage{relsize}

\begin{document}
\begin{tikzpicture}[shorten >=1pt,on grid,auto, state/.style={circle, draw, minimum size=3em, scale=0.5}, inner sep=1pt]
    \tikzset{
        font={\fontsize{0.5pt}{2}\selectfont}}
    \tikzstyle{every state}=[fill={rgb:black,1;white,7}]
    \node[state, ] (t1) {$1$};
    \node[state, right=1.0cm of t1,] (t2) {$2$};
    \node[state, right=1.0cm of t2,] (t3) {$3$};
    \node        (q_dots) [right=1.0cm of t3] {$\cdots$}; 
    
    
    \node[state, right=2.5cm of t3,] (tmin) {$t_{min}$};
    \node[state, right=1.3cm of tmin,] (tmax2) {$t_{max-1}$};
    \node[state, right=1.3cm of tmax2,] (tmax) {$t_{max}$};
    
    \path[->]
    (q_dots) edge       node {1} (t3)
    (tmin) edge         node {1} (q_dots)
    
    (t3)    edge        node {1} (t2)
    (t2)    edge        node {1} (t1)
    (tmax)  edge    node{1} (tmax2)
    (tmax2) edge    node{1} (tmin)
    (t1)   edge [bend left]     [pos=0.9, below]node{\tiny $\frac{1}{D}$}(tmax)
    (t1)   edge [bend left]     [pos=0.9,  below]node{\tiny $\frac{1}{D}$} (tmax2)
    (t1)   edge [bend left]     [pos=0.9, below, ]node{\tiny $\frac{1}{D}$} (tmin);
\end{tikzpicture}
\end{document}

相关内容