If I have plane equation $x+y+z=0$, then normal vector is $\{1,1,1\}$. Why is it not normal visually? How can I draw it properly?


p1 = Plot3D[-x-y, {x,-1,1},{y,-1,1}];
p2 = Graphics3D[Line[{{0,0,0},{1,1,1}}]];


normal vector

  • 2
    $\begingroup$ Because of the aspect ratios of the axes (they are not on the same scale). Please always post correctly formatted, copy-and-pastable code rather than screen captures of your code. $\endgroup$ – march Nov 25 '15 at 23:13
  • 4
    $\begingroup$ Use BoxRatios -> Automatic. $\endgroup$ – user484 Nov 25 '15 at 23:19

I see a black line from $(0,0,0)$ to $(1,1,1)$

The reason it does not appear to be orthogonal to the brown plane is the scale of the vertical axis not matching the scales of the other two axes either in range or in size. Stretch it and it looks better

enter image description here

  • $\begingroup$ what is the right way to match axes? $\endgroup$ – stiv Nov 25 '15 at 22:45
  • 1
    $\begingroup$ @stiv - That is a programming question, but I have added a stretched image which looks more orthogonal $\endgroup$ – Henry Nov 25 '15 at 22:50
  • $\begingroup$ I guess there should be some option for mathematica? $\endgroup$ – stiv Nov 25 '15 at 22:55
  • 1
    $\begingroup$ I believe you need to use the option boxratios->{1,1,1} $\endgroup$ – Michael McCain Nov 26 '15 at 4:54
  • 3
    $\begingroup$ @michael No, BoxRatios->Automatic. {1,1,1} is only ok if the plot ranges are the same. $\endgroup$ – Sjoerd C. de Vries Nov 26 '15 at 7:44

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