12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- \documentclass{article}
- \usepackage[pdftex,active,tightpage]{preview}
- \setlength\PreviewBorder{0mm}
- \usepackage{tkz-fct}
- \usetikzlibrary{arrows, decorations.pathreplacing}
- \usetikzlibrary{shapes.misc}
- \tikzset{
- line/.style={
- very thick,
- black,
- to path={% works only with "to" and not "--"
- -- (\tikztotarget) node[at start,point] {} node [at end,point] {} \tikztonodes
- }
- },
- point/.style={
- ultra thick,
- draw=gray,
- cross out,
- inner sep=0pt,
- minimum width=4pt,
- minimum height=4pt,
- },
- }
- \begin{document}
- \begin{preview}
- \begin{tikzpicture}
- \draw[white,fill=white] (-0.5,-0.5) rectangle (7.2,5.2); % background
- \draw[blue!15,fill=blue!15,ultra thick] (1,4) rectangle (6,1); % bounding box
- \draw[red!15,fill=red!15] (1,1) rectangle (4,4); % bounding box
- \tkzInit [xmin=0,xmax=6.5,ymin=0,ymax=4.5]
- \begin{scriptsize}
- \tkzGrid[color = gray!30!white]
- \tkzAxeXY
- \end{scriptsize}
- \draw[line,red] (1,1) to (4,4);
- \draw[line,blue] (1,4) to (6,1);
- \end{tikzpicture}
- \end{preview}
- \end{document}
|