TEX で放物線のさまざまな内容にラベルを付ける方法

TEX で放物線のさまざまな内容にラベルを付ける方法

誰か、すべてのグリッド ライン、対称軸、ルート、矢印、破線、適切な座標を使用して頂点を示す放物線「3x^2-x-4」を描くための基本的かつ最も簡単なコードについて助けていただけませんか。グリッド ラインまでしか描けませんが、インラインで使用できるものはすべて複雑すぎます。助けてください。

答え1

楽しみのために、次の短いコードを示しますpstricks:

\documentclass[x11names, svgnames, border=6pt]{standalone}
\usepackage{fourier}
\usepackage{pst-plot}
\usepackage{auto-pst-pdf}

\begin{document}

\psset{algebraic, xunit=2, yunit=1.5, arrowinset=0.12, arrowsize=4pt, linejoin=1, plotstyle=curve, plotpoints=200}%
\newpsstyle{gridstyleA}{gridlabels=0pt, gridcolor=LightSteelBlue, subgridcolor =LightSteelBlue!60, gridwidth=0.4pt, subgridwidth=0.4pt, subgriddiv=5, subgriddots=10}

\begin{pspicture*}[showgrid](-2.99, -4.8)(3, 4.8)
\psaxes[linecolor=SteelBlue, arrows=->, showorigin=false, tickcolor=black, xlabelPos=dr](0,0)(-2.8, -4.8)(2.8, 4.8)[$x$,-135] [$y$,-135]
\uput[dl](0,0){$O$}
\psset{linewidth=1.2pt, linecolor=IndianRed3}
\psplot{-5}{5}{3*x^2-x-4}
\psset{linecolor=black, linewidth=0.6pt}
\psCoordinates[linestyle=dashed](*0.167 {3*x^2-x-4})
\psline{<->}(-0.833, -4.083)(1.167, -4.083)
\end{pspicture*}

\end{document} 

ここに画像の説明を入力してください

答え2

このような:

ここに画像の説明を入力してください

ほぼ最小限のTikzコードで:

\documentclass{article}
\usepackage{tikz}

\begin{document}
    \begin{tikzpicture}[scale=1.5]
        \draw[gray!20] (-4,-5) grid (4,4);
        \draw[-latex] (-4,0)--(4,0) node[right] () {$x$};
        \draw[-latex] (0,-5)--(0,4) node[above] () {$y$}; 
        \foreach \x in {-4,-3,-2,-1,1,2,3,4} \draw (\x,.1)--(\x,-.1) node[below] () {\small \bfseries \x};
        \foreach \y in {-5,-4,-3,-2,-1,1,2,3,4} \draw (.1,\y)--(-.1,\y) node[left] () {\small \bfseries \y};
        \node () at (-.2,-.2) {$O$};
        \clip (-4,-5) rectangle (4,4);
        \draw[line width=3pt,cyan] plot[domain=-4:4,smooth]     (\x,{3*\x*\x-\x-4});
        \draw[dashed,line width=1pt] (1/6,-5)--(1/6,6);
        \draw[<->,line width=1pt] (1/6-1,-49/12)--(1/6+1,-49/12);
    \end{tikzpicture}
\end{document}

関連情報