diff --git a/tikz/2d-parted-function/Makefile b/tikz/2d-parted-function/Makefile index f4f67bc..51cbf2c 100644 --- a/tikz/2d-parted-function/Makefile +++ b/tikz/2d-parted-function/Makefile @@ -29,5 +29,5 @@ svg: pdf2svg $(SOURCE).pdf $(SOURCE).svg # Necessary, as pdf2svg does not always create valid svgs: inkscape $(SOURCE)1.svg --export-width=$(WIDTH) --export-plain-svg=$(SOURCE)1.svg - inkscape $(SOURCE).svg --export-plain-svg=$(SOURCE).svg + rsvg-convert -a -w 720 -f svg $(SOURCE)1.svg -o $(SOURCE).svg rm $(SOURCE)1.svg \ No newline at end of file diff --git a/tikz/lda-gauss-1/Makefile b/tikz/lda-gauss-1/Makefile index 1538f1e..9893234 100644 --- a/tikz/lda-gauss-1/Makefile +++ b/tikz/lda-gauss-1/Makefile @@ -30,3 +30,4 @@ svg: # Necessary, as pdf2svg does not always create valid svgs: inkscape $(SOURCE)1.svg --export-width=$(WIDTH) --export-plain-svg=$(SOURCE)1.svg rsvg-convert -a -w 720 -f svg $(SOURCE)1.svg -o $(SOURCE).svg + rm $(SOURCE)1.svg \ No newline at end of file diff --git a/tikz/quadratic-function/Makefile b/tikz/quadratic-function/Makefile new file mode 100644 index 0000000..1db9aa6 --- /dev/null +++ b/tikz/quadratic-function/Makefile @@ -0,0 +1,33 @@ +SOURCE = quadratic-function +DELAY = 80 +DENSITY = 300 +WIDTH = 512 + +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-width=$(WIDTH) --export-plain-svg=$(SOURCE)1.svg + rsvg-convert -a -w 720 -f svg $(SOURCE)1.svg -o $(SOURCE).svg + rm $(SOURCE)1.svg \ No newline at end of file diff --git a/tikz/quadratic-function/README.md b/tikz/quadratic-function/README.md new file mode 100644 index 0000000..3e1f1b0 --- /dev/null +++ b/tikz/quadratic-function/README.md @@ -0,0 +1,3 @@ +Compiled example +---------------- +![Example](quadratic-function.png) diff --git a/tikz/quadratic-function/quadratic-function.png b/tikz/quadratic-function/quadratic-function.png new file mode 100644 index 0000000..a04ab00 Binary files /dev/null and b/tikz/quadratic-function/quadratic-function.png differ diff --git a/tikz/quadratic-function/quadratic-function.tex b/tikz/quadratic-function/quadratic-function.tex new file mode 100644 index 0000000..48bd915 --- /dev/null +++ b/tikz/quadratic-function/quadratic-function.tex @@ -0,0 +1,36 @@ +\documentclass[varwidth=true, border=2pt]{standalone} + +\usepackage{pgfplots} +\usepackage{tikz} +\usepackage{helvet} +\usepackage[eulergreek]{sansmath} + +\pgfplotsset{ +tick label style = {font=\sansmath\sffamily}, +every axis label/.append style={font=\sffamily\footnotesize}, +} + +\begin{document} +\begin{tikzpicture} + \begin{axis}[ + % legend pos=south west, + axis x line=middle, + axis y line=middle, + % grid = major, + width=10cm, + height=6.4cm, + % grid style={dashed, gray!30}, + xmin=-6, % start the diagram at this x-coordinate + xmax= 6, % end the diagram at this x-coordinate + ymin=-0.25, % start the diagram at this y-coordinate + ymax= 36, % end the diagram at this y-coordinate + % axis background/.style={fill=white}, + xtick = {-6, -4,..., 6}, + ytick = {0, 5,..., 35}, + tick align=outside, + enlargelimits=true, + tension=0.08] + \addplot[domain=-6:6, red, thick,samples=200] {x*x}; + \end{axis} +\end{tikzpicture} +\end{document}