# 3d surface plot with (-1, -1, 0) coordinates

Here is my code for 3d surface plot with pgfplots.

\documentclass{standalone}
\usepackage{pgfplots}
\pgfplotsset{compat=1.7}

\begin{document}

\begin{tikzpicture}
\begin{axis}[
xlabel = $x$
, ylabel = $y$
, zlabel = Test
, xmin = -1
, xmax = 1
, ymin = -1
, ymax = 1]
[
surf
,  faceted color=blue
, samples  = 15
, domain   = -1:1
, y domain = -1:1
]
{776.062 -50.812* x + 153.062 * y -76.812 *x *y};
\end{axis}
\end{tikzpicture}

\end{document}


I wonder how to get coordinates (x, y) = (-1, -1) rather than (x, y) = (1, -1). Thanks

-
Do you mean something like y dir=reverse? –  Jake Jan 11 '13 at 14:54
Thanks @jake for your helpful comment. It should be x dir = reverse. I would appreciate if you make your comment as an answer so I can accept it future reference. Thanks –  MYaseen208 Jan 11 '13 at 14:59
so did 3D surface in pgfplots with given data get resolved? –  cmhughes Jan 11 '13 at 15:30
Yes, @cmhughes. I resolved it. –  MYaseen208 Jan 11 '13 at 15:32
ok, thanks for letting us know- will flag to close it as too localized (unless you wish to self-answer it) :) –  cmhughes Jan 11 '13 at 15:33

Assuming I understand your question, you want the x-y coordinates to be -1,-1 in the front. You could achieve this with the plot option x dir = reverse.

or, if you want to keep a right handed coordinate system, you can use the plot optionview={-70}{30}

Reversing the x/y/z direction is rather self explaining.

The option view={azimuth}{elevation} rotates the plot, horizontally and vertically, in degrees. For the rotation, it is important that a negative sign for the rotation implies an inverse view direction.

-

You can reverse the direction of an axis by setting, for example, x dir=reverse:

-
Thanks @jake again for your help. Much appreciated. –  MYaseen208 Jan 11 '13 at 15:03
@MYaseen208: I think you should accept user24276's answer instead of mine. It's more complete, and therefore more likely to help other people who come across this problem –  Jake Jan 11 '13 at 19:14
Okay @jake, I accepted his answer. Anyhow thanks for your help too. –  MYaseen208 Jan 11 '13 at 19:19