The most tricky part of your question is part 2 (in combination with part 3)
and the just released PGFPlots v1.16 makes it a bit simpler than before.
Question part 4 is primary opinion based, but I think that yellow isn't a good
color on a white background. Also I think it does not really make sense to find
intersections between "points" (and "lines") but only between lines. So I
personally wouldn't use only marks
. (I think you will be able on your own to
simplify the code if you follow my suggestion.)
For more details please have a look at the comments in the code.
% used PGFPlots v1.16
\documentclass[border=5pt]{standalone}
\usepackage{pgfplots}
\usetikzlibrary{
intersections,
}
\pgfplotsset{
% use this `compat' level or higher to make use of the LUA features
% (if you compile with LuaLaTeX)
compat=1.12,
% for simplicity we declare some functions to avoid repetitions
/pgf/declare function={
f(\x) = 0.5/(2-\x)^3 * 1.0 / sqrt(16 + 14/(2-\x)^4);
g(\x) = (1/36)
* ( 48 * (2-\x)^2
+ 16 * (2-\x)^6
- 8 * (2-\x)^3 * sqrt(
280 - 792*\x + 966*\x^2 - 640*\x^3 + 240*\x^4 - 48*\x^5 + 4*\x^6
)
) / (
(2-\x)^2 * (
4*(2-\x)^3
+ 2*sqrt(
280 - 792*\x + 966*\x^2 - 640*\x^3 + 240*\x^4 - 48*\x^5 + 4*\x^6
)
)
);
},
}
\begin{document}
\begin{tikzpicture}[
% (see <https://tex.stackexchange.com/a/286127/95441>
/pgf/number format/NumberStyle/.style={
fixed,
precision=3,
},
]
\begin{axis}[
% to question 1.
yticklabel style={
/pgf/number format/fixed,
},
enlargelimits=false,
% % uncomment the following option if you want to place the node labels
% % outside the `axis' environment
% clip mode=individual,
% moved common options here
domain=0:1,
% % change the number of samples to something that fits your needs
% samples=25,
smooth,
]
\addplot [
blue,
% name the curves to later be able to find the intersections between them
name path=one,
% (because this is a straight line, we only need 2 samples)
samples=2,
] {(1-x)/5};
% to question 2
% intersections can only be found with for lines,
% but in question 3 you request only marks, this here will only draw
% an invisible line/path
\addplot [draw=none,name path=two] {f(x)};
\addplot [draw=none,name path=three] {g(x)};
% here we draw the two "mark" functions again as such
\addplot [
yellow,
% to question 3.
only marks,
mark=*,
] {f(x)};
\addplot [
red,
only marks,
mark=square*,
] {g(x)};
% to question 2.
\draw [
red,
help lines,
% find the intersection between the lines
name intersections={
of=one and two,
% name the intersection
by=a,
},
] (a -| 0,0)
% -------------------------------------------------------------
% using `\pgfplotspointgetcoordinates' stores the (axis)
% coordinates of e.g. the coordinate (a) in `data point',
% which then can be called by `\pgfkeysvalueof'
node [below right] {
\pgfplotspointgetcoordinates{(a)}
$\pgfmathprintnumber[NumberStyle]{\pgfkeysvalueof{/data point/y}}$
}
% -------------------------------------------------------------
-- (a)
-- (a |- 0,0)
node [above right,yshift=\pgfkeysvalueof{/pgfplots/major tick length}] {
\pgfplotspointgetcoordinates{(a)}
$\pgfmathprintnumber[NumberStyle]{\pgfkeysvalueof{/data point/x}}$
}
;
\draw [
red,
help lines,
name intersections={
of=one and three,
by=b,
},
] (b -| 0,0)
node [above right] {
\pgfplotspointgetcoordinates{(b)}
$\pgfmathprintnumber[NumberStyle]{\pgfkeysvalueof{/data point/y}}$
}
-- (b)
-- (b |- 0,0)
node [above left,yshift=\pgfkeysvalueof{/pgfplots/major tick length}] {
\pgfplotspointgetcoordinates{(b)}
$\pgfmathprintnumber[NumberStyle]{\pgfkeysvalueof{/data point/x}}$
}
;
\end{axis}
\end{tikzpicture}
\end{document}

mark=
option for\addplot
, for example:\addplot[domain=0:1,yellow,mark=*]
, wheremark
can be found in pgfplots manual in the section 4.6.1. Combining withonly marks
would get rid of smooth line.yticklabel style={/pgf/number format/fixed}