| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
- \documentclass{article}
- \usepackage[pdftex,active,tightpage]{preview}
- \setlength\PreviewBorder{2mm}
- \usepackage{pgfplots}
- \usepackage{units}
- \pgfplotsset{compat=1.3}% <-- moves axis labels near ticklabels
- % (respects tick label widths)
- \usepackage{tikz}
- \usetikzlibrary{arrows, positioning, calc, intersections, decorations.markings}
- \usepackage{xcolor}
- \definecolor{horizontalLineColor}{HTML}{008000}
- \definecolor{verticalLineColor}{HTML}{FF0000}
-
- \begin{document}
- % Define this as a command to ensure that it is same in both cases
- \newcommand*{\ShowIntersection}[2]{
- \fill
- [name intersections={of=#1 and #2, name=i, total=\t}]
- [red, opacity=1, every node/.style={above left, black, opacity=1}]
- \foreach \s in {1,...,\t}{(i-\s) circle (2pt)
- node [above left] {\s}};
- }
- \begin{preview}
- \begin{tikzpicture}
- \begin{axis}[
- grid=both,
- minor tick num=1,
- xlabel=$x$,
- ylabel=$y$,
- zlabel=$z$,
- %label distance=0mm,
- %width=8cm, height=7cm, % size of the image
- xmin=-5, % start the diagram at this x-coordinate
- xmax= 5, % end the diagram at this x-coordinate
- ymin=-5, % start the diagram at this y-coordinate
- ymax= 5, % end the diagram at this y-coordinate
- axis lines=left,
- %tick style={draw=none},
- %xticklabels={,,},
- %yticklabels={,,}
- ]
- \addplot3[surf] {3*x*x-y*y-9*x+1};
- \end{axis}
- \end{tikzpicture}
- \end{preview}
- \end{document}
|