I am trying to adjust the position of a node in a tikz figure but for some reason the dot that I create doesn't show in the appropriate coordinate (0,8/3)
that is imposed.
@codeR suggested me to put the line \node[dot, label=left:$\lambda_{E-G}$] at (0,8/3) {};
but despite his help, I still have the same problem.
Code :
\documentclass[margin=3mm,tikz]{standalone}
\usepackage{pgfplots}
\pgfplotsset{compat=newest}
\usetikzlibrary{angles, arrows.meta,
quotes}
\usepackage{siunitx}
\begin{document}
\begin{tikzpicture}[scale=1,
the_angle/.style args = {#1/#2}{draw,<->,
angle radius=#1,
angle eccentricity=#2,
%anchor=south west,
}, % angle label position
dot/.style = {circle, fill, inner sep=-1.2pt}
]
\pgfplotsset{ticks=none}
\begin{axis}[axis lines=middle,xmin=0,xmax=15,ymin=0,ymax=7, ultra thick,
xlabel=$\scriptstyle \log(t)$,
ylabel=$\scriptstyle \log(R)$,
xlabel style={at={(1,-0.01)},anchor=north},
ylabel style={at={(-0.15,1)},anchor=west},
]
%
\addplot+[no marks,blue,domain=0:8,samples=300, thick] {(1/3)*x} coordinate (A);
\coordinate (O) at (0,0); % intersection with coordinate axis
\coordinate (C) at (2,0);
\addplot+[no marks,dashed,blue,domain=8:14,samples=300, thin] {(1/3)*(x-8)+8/3};
\addplot+[no marks,green,domain=8:14,samples=300, thick] {(1/2)*(x-8)+8/3};
\addplot+[no marks,dashed,green,domain=0:8,samples=300, thin] {(1/2)*(x-8)+8/3};
\draw[gray, thick, dash pattern=on 6pt off 3pt] (0,8/3) -- (8,8/3);
\end{axis}
\pic [the_angle=9mm/1.2, "\qty{30}{\degree}"] {angle = C--O--A};
\node[dot, label=left:$\lambda_{E-G}$] at (0,8/3) {};
\end{tikzpicture}
\end{document}
Any help would be appreciated : thank you !
Sincerely,
P.S : Is there a way to make the axis lines joining exactly in the same point ? Why is there an offset between the x-axis and y-axis despite having (0,0) as origin ? Thank you
clip=true
option in the argument list of\begin{axis}
the offset issue should be resolved. For the gap at the origin, it is also present in the pgfplot manual itself. Some lousy hacks can be used as a workaround.