1

Hi I want to draw this:

enter image description here

(letters and exact size don't matter)

my code is this but it doesn't work I want to mix these 2 lines here.

\subfigure
{
\begin{tikzpicture}[smooth,scale=0.8]
\draw[thick,->] (-2,0) -- (2,0) node[below] {$x$};
    \draw[thick,->] (0,-1.5) -- (0,1.5) node[right] {$y$};
    \draw[blue,thick,domain=0:1.5] plot (\x,{\x}) node[above]
    \draw[blue,thick,domain=-1.5:0] plot (\x,{0}) node[above]
\end{tikzpicture}
}
\subfigure

thanks for your helps.

Bernard
  • 271,350
negar
  • 21

1 Answers1

0

Like this?

enter image description here

\documentclass[tikz, border=3mm]{standalone}
\usetikzlibrary{arrows.meta}

\begin{document} \begin{tikzpicture}[%smooth,scale=0.8 > = Straight Barb, dot/.style = {circle, draw, thick, fill=blue, inner sep=2pt, label={[fill=white, inner sep=1pt, font=\small]60:#1}, node contents={},}
] % axis
\draw[->] (-2.0,0) -- (2,0.0) node[below left] {$x$}; \draw[->] (0,-1.5) -- (0,1.5) node[below right] {$y$}; % \draw[very thick] (-1.5,0.0) node[dot=A] -- ( 0.0,0.0) node[dot=B] -- ( 1.5,1.5) node[dot=C]; \end{tikzpicture} \end{document}

Zarko
  • 296,517