Graphics, Figures & Tables ⇒ Surface plots
Surface plots
I have a surface plot similar to the one in the lower part found here: http://www.mathworks.se/help/techdoc/ref/surf.html
Is a way to take the data points and make a similar plot in either TikZ or PSTricks? If not, then what is the "standard" way to take such a plot and write the labels in TeX?
I hope my question is clear.
Best,
Niles.
Learn LaTeX easily with newest books:
The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis
The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more
LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis
- Stefan Kottwitz
- Site Admin
- Posts: 10350
- Joined: Mon Mar 10, 2008 9:44 pm
Surface plots

Stefan
Re: Surface plots
Thanks for the quick reply, I'll check it out.
Best,
Niles.
-
- Posts: 34
- Joined: Sun Oct 16, 2011 5:56 pm
Surface plots
you can also use pgfplots for surface plots. It features automatically scaled axes, automatically generated tick labels, axis descriptions, automatic color mapping, four coordinates for X,Y,Z, and cdata (as in matlab), flat shadin\thispagestyle{empty}g, interpolated shading and faceted shading (as in matlab), and a powerful and flexible coordinate input mechanism which supports both data files, plotting expressions, and mixtures of both.
Here is a brief example:
Code: Select all
\documentclass{article}
\usepackage{tikz,pgfplots}
% this here is, in general, good practice - use the most recent
% pgfplots stable here:
\pgfplotsset{compat=1.5}
\begin{document}
\begin{tikzpicture}
\begin{axis}
\addplot3[surf] {x*y};
\end{axis}
\end{tikzpicture}
\begin{tikzpicture}
\begin{axis}
\addplot3[surf,shader=interp] {x*y};
\end{axis}
\end{tikzpicture}
\end{document}