note this was a while ago, but i'm pretty sure i had the same problem...
through some trial and error, here is a call i would make after exporting the plot (through a function similar to what i posted)
system(sprintf("sed 's/^%%%%BoundingBox.*/%%%%BoundingBox: -500 -500 2000 2000/g' /tmp/%s.eps > /tmp/%s_box.eps ; ps2pdf14 -dFIXEDMEDIA -dDEVICEWIDTHPOINTS=2400 -dDEVICEHEIGHTPOINTS=2400 -dOptimize=true -dEPSCrop -sOutputFile=/tmp/%s_box.pdf /tmp/%s_box.eps; pdfcrop --margins '5 20 5 20' -clip /tmp/%s_box.pdf %s/%s.pdf; sleep 2; convert %s/%s.pdf %s/%s.png" , v_fileName, v_fileName, v_fileName, v_fileName, v_fileName, v_fileDir, v_fileName, v_fileDir, v_fileName, v_fileDir, v_fileName));
this fixed the issue for me. It might (or might not!) be helpful to you... it should be easy to divide up the commands to see all the things i'm calling in a row. it's *really painful* as you see, but it should't take long to adapt this to your code... of course the last call to convert could be to jpeg or bmp instead of png if that's what you need.