I want to plot f(n)=n+sin(n)function restricting the domain in the set of natural numbers. I need the code for beamer presentation. Is there any software that would generate the graph as well as export the code. Please help me how can i do this ( Explaination in non technical language is welcome)
Asked
Active
Viewed 1,008 times
1
1 Answers
1
With pgfplots you can decide which x-values you want the function calculated for with the samples at key, and you plot only markers with the only marks key.
\documentclass{beamer}
\usepackage{pgfplots}
\pgfplotsset{compat=1.14}
\begin{document}
\begin{frame}
\centering
\begin{tikzpicture}
\begin{axis}[xlabel=Radians,ylabel=$n+\sin(n)$]
\addplot [samples at={0,...,20},only marks] {x +sin(deg(x))};
\end{axis}
\end{tikzpicture}
\end{frame}
\end{document}
Torbjørn T.
- 206,688

tikz,pgfplots,pstricks, ...). Then you should define domain of your function and look for examples of graphs drawn with selected package. Drawing with any of mentioned package is independent from document class. – Zarko Apr 11 '17 at 14:01