My first idea is something like the next code but the problem is that 10/300 is very little
You can perhaps modify a little the values.
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[american]{babel}
\usepackage{tikz}
\tikzset{date labels/.style={
font=\small\sffamily,
anchor=north east,
rotate=45}}
\usetikzlibrary{snakes,positioning}
\begin{document}
\pgfmathsetmacro{\lentime}{0.9*\linewidth/28.45 pt}
\pgfmathsetmacro{\dateone}{0.9*\linewidth*(1.970-1.690)/(2.012-1.690)/28.45274 pt}
\pgfmathsetmacro{\datetwo}{0.9*\linewidth*(1.979-1.690)/(2.012-1.690)/28.45274 pt}
\begin{tikzpicture}
\draw [->] (0,0) -- (.2, 0) {[snake] (.2, 0) -- (\dateone,0)} (\dateone,0) -- (\lentime,0);
% draw date labels
\newcommand\ydelta{0.05}
\draw (0,0-\ydelta) node [date labels] {1690} -- (0,0+\ydelta) node (hua1690a) {};
\draw (\dateone,0-\ydelta) node [date labels] {1970} -- (\dateone,0+\ydelta) node (hua1970a) {};
\draw (\datetwo,0-\ydelta) node [date labels,anchor=south west] {1979} -- (\datetwo,0+\ydelta) node (hua1979a) {};
\end{tikzpicture}
\end{document}
More examples using pgfplots
Code
\documentclass[twocolumn]{article}
\usepackage[margin=1cm]{geometry}
\usepackage{tikz,xcolor}
\usepackage{pgfplots}
\pgfplotsset{compat=1.8}
\begin{document}
\begin{tikzpicture}
\begin{axis}[domain=-4:4,
restrict y to domain=0:4,
samples=100,
grid=major,smooth,
xlabel=$x$,
ylabel=$y(x)$,
legend pos=north west]
\addplot [color=green,thick] {exp(x)};
\addplot [color=purple,thick] {exp(-x)};
\legend{$e^x$, $e^{-x}$}
\end{axis}
\end{tikzpicture}
\begin{tikzpicture}
\begin{axis}[domain=0.001:6,
samples=50,
grid=major,smooth,
xlabel=$x$,
ylabel=$y(x)$,
legend pos=north east]
\addplot [color=red,thick] {1/(0.5*x*(2*pi)^0.5)*exp(-ln(x)*ln(x)/0.5)};
\legend{$ {\frac{1}{(0.5x(2\pi)^{0.5})}e^{-\frac{\ln(x)\ln(x)}{0.5}}}$}
\end{axis}
\end{tikzpicture}
\begin{tikzpicture}
\begin{axis}[
samples=100,
restrict y to domain=-4:4,
grid=major,smooth,
xlabel=$x$,
ylabel=$y(x)$,
legend pos=north east]
\addplot [color=red,thick,domain=-180:180] {sin(x)};
\legend{$sin(x)$,$x*sin(1/x)$}
\end{axis}
\end{tikzpicture}
\begin{tikzpicture}
\begin{axis}[
samples=200,
restrict y to domain=-1:1,
grid=major,
xlabel=$x$,
ylabel=$y(x)$,
legend pos=north east]
\addplot [color=red,thick,domain=-0.02:0.02 ] {x*sin(1/x)};
\legend{$x*sin(1/x)$}
\end{axis}
\end{tikzpicture}
\vspace{2cm}
\begin{tikzpicture}
\begin{semilogyaxis}[
log basis y=10,
grid=major,smooth,
xlabel=$x$,
ylabel=$y(x)$,
legend pos=north east]
\addplot [color=red,thick] {10^x};
\legend{$10^x$}
\end{semilogyaxis}
\end{tikzpicture}
\vspace{3cm}
\begin{tikzpicture}
\begin{loglogaxis}[
grid=major,
xlabel=$x$,
ylabel=$y(x)$,
legend pos=north west
]
\addplot[only marks, mark size=4pt,mark=triangle,fill,black] coordinates{
(1 , 10)
(10 , 100)
(100 , 1000)};
\legend{discrete type}
\end{loglogaxis}
\end{tikzpicture}
\end{document}
Best Answer
Let's start:
First, define some useful styles to be used in different diagram elements: central cell (
ct
), other function elements (ft
), filters (filter
), ...Second, place different elements where you want. With
positioning
library you place nodes relative to other ones. At the same time, you can uselabel
to label desired elements.Third, draw connection between nodes. In this case, a
foreach
loop save some typing.Some connections are drawn individually.
Fourth, a
fit
node is drawn to encompass the whole diagram.Fifth, finish drawing external arrows.
That's all. The complete code looks like:
And the result: