如何在我的乳膠文件中添加下面這個數字?

如何在我的乳膠文件中添加下面這個數字?

我想將這個圖像添加到我的乳膠檔案中: 在此輸入影像描述

這是我的 MWE:

\usepackage{graphicx}

\usepackage{amssymb,amsthm}

\usepackage{natbib}

\bibpunct{(}{)}{;}{;}{,}{,}

\usepackage{xr-hyper}

\usepackage[
  colorlinks=true,
  citecolor=blue,
  urlcolor=blue,
  linkcolor=blue
]{hyperref}

\usepackage{bm}

\usepackage{fullpage}

\usepackage{ amssymb }

    \pagestyle{plain}

\setlength{\parskip}{\baselineskip}
\setlength{\parindent}{0pt}

\setcounter{secnumdepth}{2}

\allowdisplaybreaks[4]

% Commenting/debugging
\let\IG\iffalse
\let\ENDIG\fi

%% Shortcuts
\newcommand{\td}[2]{\dfrac{d #1}{d #2}}
\newcommand{\std}[2]{\dfrac{d^2 #1}{d {#2}^2}}
\newcommand{\ctd}[3]{\dfrac{d^2 #1}{d #2 d #3}}

\newcommand{\pd}[2]{\dfrac{\partial #1}{\partial #2}}
\newcommand{\spd}[2]{\dfrac{\partial^2 #1}{\partial {#2}^2}}
\newcommand{\cpd}[3]{\dfrac{\partial^2 #1}{\partial #2 \partial #3}}

\newcommand{\pdi}[2]{\partial #1/\partial #2}

\newcommand{\LR}{\Leftrightarrow}
\newcommand{\Lg}{\mathcal{L}}
\newcommand{\half}{\tfrac{1}{2}}
\newcommand{\eqp}{\phantom{=}}
\newcommand{\eqs}{\buildrel s \over =}

\begin{document}
\end{document}

我也想給這個圖貼上標籤。

答案1

添加\usepackage{tikz}到您的序言中。

然後在您想要圖形的位置插入以下程式碼。

\begin{figure}
\begin{tikzpicture}
%axis
\draw (12,0) -- (0,0)--(0,10);
% Blue lines
\draw[blue] (0,9)node[left]{\color{black}20} -- (11,0)node[below]{\color{   black}12}node[near end,right]{\color{black}$MC_2$};
\draw[blue] (0,9) -- (9,0)node[below]{\color{black}10}node[near end,left]{  \color{black}$MC_1$};
% Red lines
\draw[red] (0,1) -- (5,10)node[near end,right]{\color{black}$MB_1$};
\draw[red] (0,0.5) -- (8,10)node[near end,right]{\color{black}$MB_2$};
% Dotted lines
\draw[dotted,thick] (2.85,0)node[below]{$I^*$} -- (2.85,6.1)--(0,6.1)node[  left]{$U(I^*)$};
\draw[dotted,thick] (4.25,0)node[below]{$I$} -- (4.25,5.53)--(0,5.53)node[  left]{$U(I)$};
\draw (0,0)node[below]{0}node[left]{0};
\end{tikzpicture}
%Figure caption
\caption{Demo of TikZ Figure}
\end{figure}

生成下面的格拉夫

格拉夫

相關內容