Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

I get an incorrect vertical offset in 3D plots when using GraphicsRow in Mathematica 9 (Linux - Ubuntu 12.04). When displayed by itself, the plot is fine. Here's an example:

f[x_, y_] := Exp[-x^2 - y^2]

Showing the plot by itself works as expected:

a = Plot3D[f[x, y], {x, -2, 2}, {y, -2, 2}]

Gaussian shown once

However an incorrect vertical offset appears when showing the plot multiple times with GraphicsRow:

GraphicsRow[{a, a}, ImageSize -> Large]

Gaussian shown twice

Does anybody also have this problem? Any idea how to fix this?

share|improve this question
    
Doesn't it work GraphicsRow[{a, a}, ImageSize -> Large] either ? –  Artes Dec 20 '12 at 14:22
    
Nasser: Your plots look OK... On my side the surfaces (not the axes) are offset by about -.5 (sorry if I can't post an image - I'm new and do not have enough points yet). –  Jerome Dec 20 '12 at 14:38
    
Artes: the problem is the same when I use GraphicsRow[{a, a}, ImageSize -> Large]. As Nasser suggests, this might be an issue with the Linux version. –  Jerome Dec 20 '12 at 14:41
    
Jerome, you should post your update as an answer instead, since it solves the problem. I know that as a new user you might not be able to post a self-answer until after about 8 hrs of asking, but please consider posting it after the time has passed :) –  rm -rf Dec 20 '12 at 15:11
2  
@Jerome Can you please post a screenshot of the problem in the question (to make it very clear what this is about) and post your finding as an answer? This might help other Linux users who run into this problem. Please also try starting Mathematica with the option mathematica -mesa and see if that fixed the problem. –  Szabolcs Dec 20 '12 at 20:31
show 2 more comments

1 Answer 1

up vote 2 down vote accepted

I found the cause of this: it was not a problem with Mathematica but with 3D acceleration within a virtual machine (my Linux setup: Ubuntu 12.04 running in VMware 8 on a Windows 7 host). After disabling hardware acceleration for the VM the plots with GraphicsRow now look OK.

 GraphicsRow[{a, a}, ImageSize -> Large]

Gaussian shown twice, without the offset

share|improve this answer
    
Thanks for posting your solution. It would be helpful to future visitors if you would also attach an image of the problem to the question. –  Mr.Wizard Dec 21 '12 at 15:07
add comment

Your Answer

 
discard

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.