diff --git a/tikz/discontinuity-jump/Readme.md b/tikz/discontinuity-jump/Readme.md new file mode 100644 index 0000000..f349657 --- /dev/null +++ b/tikz/discontinuity-jump/Readme.md @@ -0,0 +1,3 @@ +Compiled example +---------------- +![Example](discontinuity-jump.png) diff --git a/tikz/discontinuity-jump/discontinuity-jump.png b/tikz/discontinuity-jump/discontinuity-jump.png new file mode 100644 index 0000000..8b1d9d7 Binary files /dev/null and b/tikz/discontinuity-jump/discontinuity-jump.png differ diff --git a/tikz/hard-limit-function/Makefile b/tikz/hard-limit-function/Makefile new file mode 100644 index 0000000..8e14176 --- /dev/null +++ b/tikz/hard-limit-function/Makefile @@ -0,0 +1,31 @@ +SOURCE = hard-limit-function +DELAY = 80 +DENSITY = 300 +WIDTH = 500 + +make: + pdflatex $(SOURCE).tex -output-format=pdf + make clean + +clean: + rm -rf $(TARGET) *.class *.html *.log *.aux *.data *.gnuplot + +gif: + pdfcrop $(SOURCE).pdf + convert -verbose -delay $(DELAY) -loop 0 -density $(DENSITY) $(SOURCE)-crop.pdf $(SOURCE).gif + make clean + +png: + make + make svg + inkscape $(SOURCE).svg -w $(WIDTH) --export-png=$(SOURCE).png + +transparentGif: + convert $(SOURCE).pdf -transparent white result.gif + make clean + +svg: + #inkscape $(SOURCE).pdf --export-plain-svg=$(SOURCE).svg + pdf2svg $(SOURCE).pdf $(SOURCE).svg + # Necessary, as pdf2svg does not always create valid svgs: + inkscape $(SOURCE).svg --export-plain-svg=$(SOURCE).svg diff --git a/tikz/hard-limit-function/Readme.md b/tikz/hard-limit-function/Readme.md new file mode 100644 index 0000000..e91baef --- /dev/null +++ b/tikz/hard-limit-function/Readme.md @@ -0,0 +1,3 @@ +Compiled example +---------------- +![Example](hard-limit-function.png) diff --git a/tikz/hard-limit-function/hard-limit-function.png b/tikz/hard-limit-function/hard-limit-function.png new file mode 100644 index 0000000..adbd3c7 Binary files /dev/null and b/tikz/hard-limit-function/hard-limit-function.png differ diff --git a/tikz/hard-limit-function/hard-limit-function.tex b/tikz/hard-limit-function/hard-limit-function.tex new file mode 100644 index 0000000..b84e627 --- /dev/null +++ b/tikz/hard-limit-function/hard-limit-function.tex @@ -0,0 +1,29 @@ +\documentclass[varwidth=false, border=2pt]{standalone} + +\usepackage{pgfplots} +\usepackage{tikz} + +\begin{document} +\begin{tikzpicture} + \begin{axis}[ + axis x line=middle, + axis y line=middle, + grid = major, + width=16cm, + height=8cm, + grid style={dashed, gray!30}, + xmin=-1, % start the diagram at this x-coordinate + xmax= 1, % end the diagram at this x-coordinate + ymin= 0, % start the diagram at this y-coordinate + ymax= 1.2, % end the diagram at this y-coordinate + xlabel=x, + ylabel=y, + /pgfplots/xtick={-1, -0.5, ..., 1}, % make steps of length 0.5 + /pgfplots/ytick={0, 0.5, ..., 1}, % make steps of length 0.5 + tick align=outside, + enlargelimits=false] + % plot the function + \addplot[domain=-1:1, blue, ultra thick,samples=500] {x < 0 ? 0 : 1}; + \end{axis} +\end{tikzpicture} +\end{document} diff --git a/tikz/piecewise-linear-function/Makefile b/tikz/piecewise-linear-function/Makefile new file mode 100644 index 0000000..b93096f --- /dev/null +++ b/tikz/piecewise-linear-function/Makefile @@ -0,0 +1,31 @@ +SOURCE = piecewise-linear-function +DELAY = 80 +DENSITY = 300 +WIDTH = 500 + +make: + pdflatex $(SOURCE).tex -output-format=pdf + make clean + +clean: + rm -rf $(TARGET) *.class *.html *.log *.aux *.data *.gnuplot + +gif: + pdfcrop $(SOURCE).pdf + convert -verbose -delay $(DELAY) -loop 0 -density $(DENSITY) $(SOURCE)-crop.pdf $(SOURCE).gif + make clean + +png: + make + make svg + inkscape $(SOURCE).svg -w $(WIDTH) --export-png=$(SOURCE).png + +transparentGif: + convert $(SOURCE).pdf -transparent white result.gif + make clean + +svg: + #inkscape $(SOURCE).pdf --export-plain-svg=$(SOURCE).svg + pdf2svg $(SOURCE).pdf $(SOURCE).svg + # Necessary, as pdf2svg does not always create valid svgs: + inkscape $(SOURCE).svg --export-plain-svg=$(SOURCE).svg diff --git a/tikz/piecewise-linear-function/Readme.md b/tikz/piecewise-linear-function/Readme.md new file mode 100644 index 0000000..b4d9e56 --- /dev/null +++ b/tikz/piecewise-linear-function/Readme.md @@ -0,0 +1,3 @@ +Compiled example +---------------- +![Example](piecewise-linear-function.png) diff --git a/tikz/piecewise-linear-function/piecewise-linear-function.png b/tikz/piecewise-linear-function/piecewise-linear-function.png new file mode 100644 index 0000000..3e9ffb1 Binary files /dev/null and b/tikz/piecewise-linear-function/piecewise-linear-function.png differ diff --git a/tikz/piecewise-linear-function/piecewise-linear-function.tex b/tikz/piecewise-linear-function/piecewise-linear-function.tex new file mode 100644 index 0000000..e4fec78 --- /dev/null +++ b/tikz/piecewise-linear-function/piecewise-linear-function.tex @@ -0,0 +1,29 @@ +\documentclass[varwidth=false, border=2pt]{standalone} + +\usepackage{pgfplots} +\usepackage{tikz} + +\begin{document} +\begin{tikzpicture} + \begin{axis}[ + axis x line=middle, + axis y line=middle, + grid = major, + width=16cm, + height=8cm, + grid style={dashed, gray!30}, + xmin=-1, % start the diagram at this x-coordinate + xmax= 1, % end the diagram at this x-coordinate + ymin= 0, % start the diagram at this y-coordinate + ymax= 1.2, % end the diagram at this y-coordinate + xlabel=x, + ylabel=y, + /pgfplots/xtick={-1, -0.5, ..., 1}, % make steps of length 0.5 + /pgfplots/ytick={0, 0.5, ..., 1}, % make steps of length 0.5 + tick align=outside, + enlargelimits=false] + % plot the function + \addplot[domain=-1:1, blue, ultra thick,samples=500] {x < -0.5 ? 0 : (x < 0.5 ? x +0.5 : 1)}; + \end{axis} +\end{tikzpicture} +\end{document} diff --git a/tikz/sigmoid-function/sigmoid-function.tex b/tikz/sigmoid-function/sigmoid-function.tex index 58b6aab..2b798c7 100644 --- a/tikz/sigmoid-function/sigmoid-function.tex +++ b/tikz/sigmoid-function/sigmoid-function.tex @@ -2,8 +2,6 @@ \usepackage{pgfplots} \usepackage{tikz} -\usepackage{tkz-fct} -\usetikzlibrary{arrows} \begin{document} \begin{tikzpicture}