or
tikz
CarLaTeX
This code:


\documentclass[11pt]{standalone}
\usepackage{tikz}
\usepackage{pgfplots}
\usetikzlibrary{calc, intersections, fit}
\usetikzlibrary{arrows.meta}
\usetikzlibrary{positioning}
\usetikzlibrary{backgrounds}
\tikzset{
declare function={
iperbole(\x)=
(sqrt((.4)+(.04*(\x-2)^2)))
;
}
}
\pgfplotsset{
assi/.style={
axis lines=middle,
axis line style={-Stealth},
ticks=none,
samples=300,
clip=false,
width=10cm
},
}

\begin{document}
\begin{tikzpicture}
\begin{axis}[
assi,
ymin=-3,
xmin=-0.05,
enlargelimits={value=.05,upper},
xlabel = {$\sigma$},
ylabel = {$\mu$},
every axis x label/.style={at=(current axis.right of origin),		anchor=north east},
every axis y label/.style={at=(current axis.above origin),		anchor=north east},
]
thick,
domain={-3:11},
restrict y to domain={2:11},
smooth, name path=frontier
]
({iperbole(\x)},{x});
thick, dashed,
domain={-3:7},
restrict y to domain={-2:2},
smooth, name path=boundary
]
({iperbole(\x)},{x});
\pgfmathsetmacro{\MVPx}{iperbole(2)}
\pgfmathsetmacro{\Sx}{iperbole(2.5)}
\pgfmathsetmacro{\Lx}{iperbole(5)}
\pgfmathsetmacro{\MAXx}{iperbole(11)}
\pgfmathsetmacro{\INTER}{7.5*\MVPx-2}
\draw[fill=black,name intersections={of=frontier and varalto, by={i1,i2}}]
(i1) circle (1pt) node [above left] {$I$}
(i2) circle (1pt) node [above left] {$J$};
\end{axis}
\end{tikzpicture}
\end{document}


worked one month ago (and works on Overleaf, which is not up-to-date), but now it gives this error:


! Argument of \pgfmathfloatparse@@ has an extra }.
<inserted text>
\par
l.66   \end{axis}

?
! Emergency stop.
<inserted text>
\par
l.66   \end{axis}

End of file on the terminal!


Is it a bug?

samcarter
I think the problem is that tikz/pgf has changed the definition of the circle in [commit 1302de8 ](https://github.com/pgf-tikz/pgf/commit/1302de8a99834bb0e30ffc214a7350952c446ab6) to have only one argument instead of two. At the same time pgfplots still assumes two arguments.

I'd say this is a bug, but not sure if it should be reported to tikz or pgfplots.

A workaround could be to adjust the changes pgfplots makes to only have one argument:


\documentclass[11pt]{standalone}
\usepackage{tikz}
\usepackage{pgfplots}
\usetikzlibrary{calc, intersections, fit}
\usetikzlibrary{arrows.meta}
\usetikzlibrary{positioning}
\usetikzlibrary{backgrounds}
\tikzset{
declare function={
iperbole(\x)=
(sqrt((.4)+(.04*(\x-2)^2)))
;
}
}
\pgfplotsset{
assi/.style={
axis lines=middle,
axis line style={-Stealth},
ticks=none,
samples=300,
clip=false,
width=10cm
},
}

\makeatletter
\def\pgfplots@path@@tikz@do@circle#1{%
\begingroup
\ifpgfplots@usefpu
\pgfkeys{/pgf/fpu,/pgf/fpu/output format=fixed}%
\fi
\pgfmathparse{#1}%
\let\tikz@ellipse@x=\pgfmathresult%
\ifpgfmathunitsdeclared%
\pgfmathparse{#1}%
\let\tikz@ellipse@y=\pgfmathresult%
\ifpgfmathunitsdeclared%
\pgfpathellipse{\pgfpointorigin}{%
\pgfqpoint{\tikz@ellipse@x pt}{0pt}}{\pgfpoint{0pt}{\tikz@ellipse@y pt}}%
\else%
\PackageError{tikz}{You cannot mix dimensions and dimensionless values in an ellipse}{}%
\fi%
\else%
\pgfmathparse{#1}%
\let\tikz@ellipse@y=\pgfmathresult%
\ifpgfmathunitsdeclared%
\PackageError{tikz}{You cannot mix dimensions and dimensionless values in an ellipse}{}%
\else%
\pgfpathellipse{\pgfpointorigin}
{\pgfplotspointaxisdirectionxy{\tikz@ellipse@x}{0}}
{\pgfplotspointaxisdirectionxy{0}{\tikz@ellipse@y}}%
\fi%
\fi%
\endgroup
}
\makeatother

\begin{document}
\begin{tikzpicture}
\begin{axis}[
assi,
ymin=-3,
xmin=-0.05,
enlargelimits={value=.05,upper},
xlabel = {$\sigma$},
ylabel = {$\mu$},
every axis x label/.style={at=(current axis.right of origin),		anchor=north east},
every axis y label/.style={at=(current axis.above origin),		anchor=north east},
]
thick,
domain={-3:11},
restrict y to domain={2:11},
smooth, name path=frontier
]
({iperbole(\x)},{x});
thick, dashed,
domain={-3:7},
restrict y to domain={-2:2},
smooth, name path=boundary
]
({iperbole(\x)},{x});
\pgfmathsetmacro{\MVPx}{iperbole(2)}
\pgfmathsetmacro{\Sx}{iperbole(2.5)}
\pgfmathsetmacro{\Lx}{iperbole(5)}
\pgfmathsetmacro{\MAXx}{iperbole(11)}
\pgfmathsetmacro{\INTER}{7.5*\MVPx-2}
\draw[fill=black,name intersections={of=frontier and varalto, by={i1,i2}}]
(i1) circle (1pt) node [above left] {$I$}
(i2) circle (1pt) node [above left] {$J$};
\end{axis}
\end{tikzpicture}
\end{document}


---

### Update:

This problem has now been fixed by pgfplots, see https://github.com/pgf-tikz/pgfplots/commit/34c3f2ef3606d09bdeee306a02884126f8bdc975
marmot
@samcarter told you what the culprit is. It is, however, also true that the (preferred) syntax for circles has been changed. For some time it is





\draw circle(<length>);


So the following also works:


\documentclass[11pt]{standalone}
\usepackage{pgfplots}
\usepgfplotslibrary{fillbetween}
\usetikzlibrary{arrows.meta}
\pgfplotsset{
assi/.style={
axis lines=middle,
axis line style={-Stealth},
ticks=none,
samples=300,
clip=false,
width=10cm
},
}

\begin{document}
\begin{tikzpicture}[declare function={
iperbole(\x)=
(sqrt((.4)+(.04*(\x-2)^2)))
;}]
\begin{axis}[
assi,
ymin=-3,
xmin=-0.05,
enlargelimits={value=.05,upper},
xlabel = {$\sigma$},
ylabel = {$\mu$},
every axis x label/.style={at=(current axis.right of origin),		anchor=north east},
every axis y label/.style={at=(current axis.above origin),		anchor=north east},
]
thick,
domain={-3:11},
restrict y to domain={2:11},
smooth, name path=frontier
]
({iperbole(\x)},{x});
thick, dashed,
domain={-3:7},
restrict y to domain={-2:2},
smooth, name path=boundary
]
({iperbole(\x)},{x});
\pgfmathsetmacro{\MVPx}{iperbole(2)}
\pgfmathsetmacro{\Sx}{iperbole(2.5)}
\pgfmathsetmacro{\Lx}{iperbole(5)}
\pgfmathsetmacro{\MAXx}{iperbole(11)}
\pgfmathsetmacro{\INTER}{7.5*\MVPx-2}
\draw[fill=black,name intersections={of=frontier and varalto, by={i1,i2}}]
(i1) circle[radius=1pt] node [above left] {$I$}
(i2) circle[radius=1pt] node [above left] {$J$};
\end{axis}
\end{tikzpicture}
\end{document}


Notice that I also removed libraries that were not used and loaded the pgfplots library fillbetween to do the intersections.
Bug in new PGF-TikZ version?
Here I am
Anonymous
@CarLaTeX How can I contact with You?
samcarter
related bug report: https://sourceforge.net/p/pgfplots/bugs/232/
Ok, I will create an issue for pgfplots
I absolutely think so. Many will stumble over this, especially when they just run an old code. Please note also that the pgfmanual is still full of the old syntax. (It is all a bit ironic, Henri can use very strong words if someone does not use what he thinks is best, but then you find *many* examples of the syntax he does not like in the manual or tikz.code.tex.)
It is enough in most cases. However, in practice, it turns out that the intersections computed with fill between in pgfplots are slightly more accurate. (To be honest, I have not checked if this is still true, but it was true before the latest updates.)
:)
You don't have to explain, it's a natural law: if a questions is labelled tikz, marmots answer is to be preferred :)
samcarter
@marmot You are of course right with the syntax! Notwithstanding that the syntax is old, do you think it would be worth reporting the problem to pgfplots?
CarLaTeX
@all I'd like to add also errors tag but I don't find it. How can we create a new tag?
CarLaTeX
@samcarter Thanks for your answer, I prefer @marmot's one, because I think that's the way to go, but yours could be useful is someone has a lot of circles and modify then all could be problematic.
CarLaTeX
@marmot Perfect, thanks! I have intersections among my TikZ libraries (there are some not used because the MWE is not the actual picture). Is it not enough?
In Overleaf it works with \pgfplotsset{compat=1.15}
samcarter
on the pgfplots site, the problem starts with \pgfplotsset{compat=1.4}
samcarter
interestingly     \draw[fill=black,name intersections={of=frontier and varalto, by={i1,i2}}]
(i1) circle (1pt and 1pt) node [above left] {$I$}
(i2) circle (1pt and 1pt) node [above left] {$J$}; seems to work 
samcarter

\documentclass{standalone}
\usepackage{tikz}
\usepackage{pgfplots}

\begin{document}
\begin{tikzpicture}
\begin{axis}

MNWE:
https://github.com/pgf-tikz/pgf/commit/1302de8a99834bb0e30ffc214a7350952c446ab6
The problem seems to start with commit 1302de8