TeX - LaTeX Asked by Upwork yasir on May 22, 2021
here is the image which i want to put in LaTeX.
I want to be able to draw the portion in yellow with tikz.
Please help.
Here’s the MWE, which is not at all okay:
usepackage{pgfplots}
begin{document}
begin{tikzpicture}
begin{axis}[
axis x line=middle,
axis y line=none,
height=50pt,
width=axisdefaultwidth,
xmin=-10,
xmax=10,
]
addplot coordinates {(0,0) (5,0)};
end{axis}
end{tikzpicture}
end{document}
tikz
and pgfplots
. Try to read their documentation (ad list inztroductionary chapters and sections), also see TeXample and pgfplots examples.tikz
package:documentclass[tikz, margin=3.14159]{standalone}
usetikzlibrary{arrows.meta,
quotes}
begin{document}
begin{tikzpicture}
draw[Straight Barb-Straight Barb]
(0,0) to ["$x=-1$"] ++ (3,0) coordinate (a)
to ["$x=1$"] ++ (2,0) coordinate (b)
to ["$x=6$"] ++ (3,0);
foreach x in {a,b}
draw (a) ++ (0,1mm) -- ++ (0,-2mm) node[below] {0}
(b) ++ (0,1mm) -- ++ (0,-2mm) node[below] {5};
end{tikzpicture}
end{document}
BTW, meaning/intention of this image is quite unclear ...
Correct answer by Zarko on May 22, 2021
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP