I have read this article carefully: however, I still have problems with the placement of figures and tables inside a document. Here is an example
\documentclass{article}
\usepackage{amsmath,amssymb,amsfonts}
\usepackage{mathptmx}
\usepackage{makecell}
\setcellgapes{5pt}
\usepackage{pgfplots}
\usepackage{siunitx}
\usepackage{lipsum}
\pgfplotsset{compat=1.16}
\newcommand\ProvideMathOperator[2]{\ifdefined#1\else\DeclareMathOperator{#1}{#2}\fi}
\ProvideMathOperator{\w}{w}
\ProvideMathOperator{\x}{x}
\begin{document}
\textcolor{red}{\lipsum[1][1]}
\begin{figure}[htbp!]
\centering
\begin{tikzpicture}
\begin{axis}[
grid, grid style=dashed,
ymin=0,ymax=80,
ytick={0,10,20,30,40,50,60,70},
xtick={0,0.05,0.10,0.15,0.20,0.25,0.30},
extra y ticks={0}, % <---
xmax=0.35,xmin=0,
extra x ticks={0}, % <---
minor tick num=1,
axis lines = middle,
set layers, % <---
axis on top, % <---
xlabel=$\x_1$,ylabel=$\theta\lbrack\si{\celsius}\rbrack$,
x label style={at={(1,0)},right},
y label style={at={(0,1)},above},
x tick label style={/pgf/number format/.cd,
fixed relative,
},
]
\addplot+[color=red,mark=*,mark options={draw=red,fill=green},smooth]
coordinates {
(0.05,32.05)(0.10,30.00)(0.15,32.4)(0.20,35.65)(0.25,42.50)(0.31,63.45)
};
\end{axis}
\end{tikzpicture}
\end{figure}
\textcolor{yellow}{\lipsum[1][1]}
\begin{figure}[htbp!]
\centering
\begin{tikzpicture}
\begin{axis}[
grid, grid style=dashed,
ymin=0,ymax=80,
ytick={0,10,20,30,40,50,60,70},
xtick={0,10,20,30,40,50,60,70},
extra y ticks={0}, % <---
xmax=80,xmin=0,
extra x ticks={0}, % <---
minor tick num=1,
axis lines = middle,
set layers, % <---
axis on top, % <---
xlabel=$\w_1$,ylabel=$\theta\lbrack\si{\celsius}\rbrack$,
x label style={at={(1,0)},right},
y label style={at={(0,1)},above},
x tick label style={/pgf/number format/.cd,
fixed relative,
},
]
\addplot+[color=blue,mark=*,mark options={draw=blue,fill=orange},smooth]
coordinates {
(25.97,32.05)(42.55,30.00)(53.99,32.4)(62.50,35.65)(68.96,42.50)(74.85,63.45)
};
\end{axis}
\end{tikzpicture}
\end{figure}
\textcolor{blue}{\lipsum[1][1]}
\end{document}
Red text should be above the first graph whole
Yellow text should be between the graphs whole
Blue text should be below the second graph whole
Can you help me?
Thank you in advance
\documentclass{...}
and ending with\end{document}
, which reproduce your problem. given link can be after while death and no one will be able to see what is your problem. for text use some dummy text (fromlipsum
orblindtext
...). explain your problem relation totikz
. your question is not clear.\end{figure}
.