2
0
Fork 0
mirror of https://github.com/MartinThoma/LaTeX-examples.git synced 2025-04-25 06:18:05 +02:00

fixed legend

This commit is contained in:
Martin Thoma 2012-08-09 17:55:14 +02:00
parent b7cec5fb0b
commit f829badf9a
3 changed files with 82 additions and 0 deletions

View file

@ -1,6 +1,7 @@
SOURCE = evaluation-tree
DELAY = 80
DENSITY = 300
WIDTH = 500
make:
pdflatex $(SOURCE).tex -output-format=pdf
@ -14,6 +15,11 @@ gif:
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

31
tikz/faktorraum/Makefile Normal file
View file

@ -0,0 +1,31 @@
SOURCE = faktorraum
DELAY = 80
DENSITY = 300
WIDTH = 500
make:
pdflatex $(SOURCE).tex -output-format=pdf
make clean
clean:
rm -rf $(TARGET) *.class *.html *.log *.aux
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

View file

@ -0,0 +1,45 @@
\documentclass{article}
\usepackage[pdftex,active,tightpage]{preview}
\setlength\PreviewBorder{2mm}
\usepackage{amsmath}
\usepackage{pgfplots}
\usepackage{tikz}
\usetikzlibrary{arrows, positioning, calc,matrix}
\begin{document}
\begin{preview}
\begin{tikzpicture}
\begin{axis}[
width=10cm, height=10cm, % size of the image
axis lines=middle,
grid = major,
grid style={dashed, gray!30},
%xmode=log,log basis x=10,
%ymode=log,log basis y=10,
xmin=-100, % start the diagram at this x-coordinate
xmax= 100, % end the diagram at this x-coordinate
ymin=-100, % start the diagram at this y-coordinate
ymax= 100, % end the diagram at this y-coordinate
/pgfplots/xtick={-100,-80,...,100},
/pgfplots/ytick={-100,-80,...,100},
tick align=outside,
legend pos= north west,
legend cell align=left,
legend style={legend pos=north west,font=\tiny}]
\addplot[domain=-100:100, red, thick] {x};
\addlegendentry{$\begin{pmatrix}0\\0\end{pmatrix} + U$};
\addplot[domain=-100:100, blue, thick] {x + 12};
\addlegendentry{$\begin{pmatrix}0\\12\end{pmatrix} + U$};
\addplot[domain=-100:100, purple, thick] {x - 42};
\addlegendentry{$\begin{pmatrix}0\\-42\end{pmatrix} + U$};
\addplot[domain=-100:100, lime, thick] {x + 50};
\addlegendentry{$\begin{pmatrix}0\\50\end{pmatrix} + U$};
\end{axis}
\end{tikzpicture}
\end{preview}
\end{document}