Wrapfloat 和 tikzpicture 问题

Wrapfloat 和 tikzpicture 问题

我在“wrapfloat”环境中使用 tikzpicture 时遇到了问题。该代码对于第一张 tikz 图片运行良好,但对于第二张和下面的图片,文本不会包裹图片。这是我的代码

\documentclass[10pt,a4paper,openright,oneside]{article}
\usepackage[italian]{babel}
\usepackage[latin1]{inputenc}
\usepackage{graphicx}
\usepackage{newlfont}
\usepackage{amssymb, graphicx, pgfplots, wrapfig}
\pgfplotsset{/pgf/number format/use comma,compat=newest,standard/.style={
    axis x line=middle,
    axis y line=middle,
    enlarge x limits=0.1,
    enlarge y limits=0.15,
    every axis x label/.style={at={(current axis.right of       origin)},anchor=north west},
    every axis y label/.style={at={(current axis.above origin)},anchor=north east}
}}
\usepackage{amsmath}
\usepackage{latexsym, tikz}
\usetikzlibrary{decorations.pathmorphing,patterns, shapes, arrows.meta}
\usepackage{amsthm}


\begin{document}
\section{Risalire all'equazione di una curva partendo dal grafico}
\begin{wrapfloat}{figure}{i}{0.4\textwidth}
\begin{tikzpicture}
\begin{axis}[standard,
ytick={1,2}, yticklabels={$1$,$2$}, xtick={-1}, xticklabels={$-1$},
xlabel=$x$,ylabel=$y$,width=6cm, height=6cm,
xmin=-3, 
xmax= 3, 
ymin=-1, 
ymax=3]
\addplot [domain=-4:4,samples=700,smooth] {(x+1)^2+1};
\draw [dashed] (-1,0)--(-1,1);
\draw [dashed] (0,1)--(-1,1);
\end{axis}
\end{tikzpicture}
\end{wrapfloat}
\textbf{text} text

text text text \\
\begin{wrapfloat}{figure}{i}{0.8\textwidth}
\begin{tikzpicture}
\begin{axis}[standard,
ytick={0,0}, yticklabels={$O$}, xtick={0,0}, xticklabels={$O$},
xlabel=$x$,ylabel=$y$,width=9cm, height=9cm,
xmin=-7, 
xmax= 7, 
ymin=-3, 
ymax=7]
\addplot [domain=-5:5,samples=700,smooth] {0.3*(x)^2};
\addplot [domain=-5:5,samples=700,smooth, green] {0.3*(x)^2+3};
\addplot [domain=-5:5,samples=700,smooth, red] {0.3*(x)^2-3};
\draw [->] (0.5,1)--(0.5,2.5);
\draw [->] (0.5,-0.8)--(0.5,-2.3);
\node [] at (1.2,1.7) {$\tiny{+m}$};
\node [] at (1.2,-1.7) {$\tiny{-m}$};
\end{axis}
\end{tikzpicture}
\end{wrapfloat}
\noindent text text\\
\begin{wrapfloat}{figure}{i}{0.8\textwidth}
\begin{tikzpicture}
\begin{axis}[standard,
ytick={0,0}, yticklabels={$O$}, xtick={0,0}, xticklabels={$O$},
xlabel=$x$,ylabel=$y$,width=9cm, height=9cm,
xmin=-12, 
xmax= 12, 
ymin=-3, 
ymax=7]
\addplot [domain=-12:12,samples=700,smooth] {0.3*(x)^2};
\addplot [domain=-12:12,samples=700,smooth, green] {0.3*(x+6)^2};
\addplot [domain=-12:12,samples=700,smooth, red] {0.3*(x-6)^2};
\draw [->] (0.5,1)--(0.5,2.5);
\draw [->] (0.5,-0.8)--(0.5,-2.3);
\node [] at (1.2,1.7) {$\tiny{+m}$};
\node [] at (1.2,-1.7) {$\tiny{-m}$};
\end{axis}
\end{tikzpicture}
\end{wrapfloat}


\end{document}

提前致谢!

相关内容