I have a problem when I use tikzpicture
and wrapfigure
. The main issue is that when using the third parameter, the "distance" becomes arbitary. For example, I am using 9cm
but what is the correct way to do it? Because, currently, the text looks out of place and not aligned.
\documentclass{article}
\usepackage{pgfplots}
\usepackage{graphicx}
\usepackage{wrapfig}
\begin{document}
Whenever we deal with integration, we come across the constant of integration $C$. Suppose we have the following graph of $ f(x) = \sin x$.
\begin{wrapfigure}{l}{9cm}
\begin{tikzpicture}
\begin{axis}[
xlabel = $x$,
ylabel = $f(x)$
]
\addplot{sin(deg(x))};
\end{axis}
\end{tikzpicture}
\end{wrapfigure}
The primary reason for doing integration is to be able to solve differential equations.
\begin{quote}
some random text goes here and other cool stuff.
\end{quote}
\end{document}
9cm
, use0pt
, then the natural width of thewrapfigure
will be used to align the surrounding text. It may also look weird to have an indent in the first line, so adding\noindent The primary...
makes it look a little less weird.width=6cm
argument to the axis environment.