如何用 tikzpicture 绘制直接图?

如何用 tikzpicture 绘制直接图?

函数 C 看起来像多行,我希望它有一行。我怎样才能让它看起来像一行?这是我的代码:

\begin{tikzpicture}
            \draw[step=0.5cm,cyan,very thin] (-1,-1) grid (5,6);
            \draw[black, ->] (-1,0) -- (5,0); 
            \draw[black, ->] (0,-1) -- (0,6);
            \draw[thick, black, ->] (0,0) -- (0.5,0); 
            \draw[thick, black, ->] (0,0) -- (0,0.5);
            \draw [scale=0.5, domain=(1/3.65):10,samples=25, teal] plot (\x,{(9+(\x)^2+3*\x)/(3*\x)}) ;
            \draw [scale=0.5, domain=-2:10, smooth, variable=\x, blue] plot ({\x}, {-2/3*\x+5}); 
            \filldraw[blue] (3,0.5) node[anchor=south] {$d$};
            \filldraw[teal] (4,2) node[anchor=south] {$\mathcal{C}$};
            \filldraw[black] (3,1.75) node[anchor=south west] {A};
            \filldraw[black] (3,1.75) node[] {$\times$};
            \filldraw[black] (0,0.25) node[anchor=east] {$\overrightarrow{i}$};
            \filldraw[black] (0.25,0) node[ anchor=north] {$\overrightarrow{j}$};
            \filldraw[black] (5,0) node[ anchor=south east] {$x$};
            \filldraw[black] (0,6) node[ anchor=north west] {$y$};
            \foreach \x in {-1,2,3,4,5,6,7,8,9}
            \draw ({\x cm/2},2pt) -- ({\x cm/2},-2pt) node[anchor=north] {$\x$};
            \foreach \y in {2,3,4,5,6,7,8,9,10,11}
            \draw (2pt, {\y cm/2}) -- (-2pt, {\y cm/2}) node[anchor=east]{$\y$};
        \end{tikzpicture}

我正在尝试画这个: 在此处输入图片描述

但我明白这一点: 在此处输入图片描述

答案1

我发现样本数量是25个而不是200个。

解决方案 :

\draw [scale=0.5, domain=(1/3.65):10,samples=200, teal] plot (\x,{(9+(\x)^2+3*\x)/(3*\x)}) ;
        

相关内容