
Math & Science ⇒ Illustration of a mathematical progression
-
- Posts: 3
- Joined: Thu Jun 30, 2011 12:01 pm
Illustration of a mathematical progression

Learn LaTeX easily with newest books:
The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis
The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more
LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis
Illustration of a mathematical progression
Code: Select all
\begin{tikzpicture}[xscale=0.5,yscale=4]
\draw[->] (0,0) -- (10,0) node[right] {$x$};
\draw[->] (0,0) -- (0,1) node[left] {$y$};
\foreach \n [evaluate=\n as \y using 1/\n^2] in {1,...,10}{
\node at (\n,\y) {\tikz{\fill[blue] (0,0) circle[radius=1pt];}};
}
\end{tikzpicture}
Code: Select all
\fill[blue] (\n,\y) circle[radius=1pt];
-
- Posts: 162
- Joined: Wed Jun 17, 2009 10:18 pm
Illustration of a mathematical progression
Code: Select all
\begin{tikzpicture}[xscale=0.5,yscale=4]
\draw[->] (0,0) -- (10,0) node[right] {$x$};
\draw[->] (0,0) -- (0,1) node[left] {$y$};
\foreach \n [evaluate=\n as \y using 1/\n^2] in {1,...,10}{
\node at (\n,\y) [fill=blue,circle,inner sep=0pt,minimum size=1pt] {};
}
\end{tikzpicture}
Code: Select all
\documentclass[a4paper]{article}
\usepackage{tikz,pgfplots}
\pgfplotsset{compat=newest}
\begin{document}
\begin{tikzpicture}
\begin{axis}[samples at={1,2,...,10},ymin=0]
\addplot+[only marks,mark size=1pt] {1/x^2};
\end{axis}
\end{tikzpicture}
\end{document}
-
- Posts: 3
- Joined: Thu Jun 30, 2011 12:01 pm