TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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



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


enter image description here

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

share|improve this question
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
up vote 8 down vote accepted

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. 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.

share|improve this answer

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

share|improve this answer
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

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.