I am wondering how to do such function-like plot. The function is not a concrete math function, but should somehow look like a curve.
Graphics, Figures & Tables ⇒ How to do such function-like-plot?
NEW: TikZ book now 40% off at Amazon.com for a short time.

- Stefan Kottwitz
- Site Admin
- Posts: 10345
- Joined: Mon Mar 10, 2008 9:44 pm
How to do such function-like-plot?
I would use the
Stefan
pgfplots
package, and plot using a few coordinates and the smooth
option. The fillbetween
library can do the filling. Perhaps I can post an example tomorrow.Stefan
LaTeX.org admin
-
- Posts: 6
- Joined: Thu Jan 31, 2019 10:09 pm
How to do such function-like-plot?
Stefan Kottwitz wrote:I would use thepgfplots
package, and plot using a few coordinates and thesmooth
option. Thefillbetween
library can do the filling. Perhaps I can post an example tomorrow.
Stefan
Thanks!
-
- Posts: 6
- Joined: Thu Jan 31, 2019 10:09 pm
How to do such function-like-plot?
Stefan Kottwitz wrote:I would use thepgfplots
package, and plot using a few coordinates and thesmooth
option. Thefillbetween
library can do the filling. Perhaps I can post an example tomorrow.
Stefan
Thanks!
-
- Posts: 6
- Joined: Thu Jan 31, 2019 10:09 pm
How to do such function-like-plot?
Stefan Kottwitz wrote:I would use thepgfplots
package, and plot using a few coordinates and thesmooth
option. Thefillbetween
library can do the filling. Perhaps I can post an example tomorrow.
Stefan
Thanks!
-
- Posts: 6
- Joined: Thu Jan 31, 2019 10:09 pm
How to do such function-like-plot?
Stefan Kottwitz wrote:I would use thepgfplots
package, and plot using a few coordinates and thesmooth
option. Thefillbetween
library can do the filling. Perhaps I can post an example tomorrow.
Stefan
\begin{center}
\pgfplotsset{ticks=none, width=10cm}
\begin{tikzpicture}[scale=1.2]
\begin{axis}[
% legend style={
% at={(10,)},
% anchor=north east,at={(axis description cs:0,-0.1)}}]
xlabel=$buffer\;\;size$,ylabel=$page\;\;falut\;\;rate$]
\addplot[blue, mark=none,smooth,ultra thick, domain=1:10] {1/(x * x))};
\addplot[red, mark=none, smooth,ultra thick, domain=1:10]{1/(x * x * x))};
\addplot[black, mark=none, smooth,ultra thick, domain=1:10]{1/(x * x * x * x))};
\legend{$Random$,$Replacement\;Strategies$,$Opt$}
\end{axis}
\end{tikzpicture}
\end{center}
My current solution is that, but as said I have no idea how to simulate such non-exact function. My solution looks like, but the distance of plots is not so large as the given graph.