The script this attached. I was running the code in FrontEndExecute [%], but When I used the code that you recommended me the only thing I could see were the axis without the plot.
It's hard to tell what the issue might be without seeing the script. If you are generating graphics, this requires the front end and cannot be run in the Mathematica kernel by itself.
Usually when working with graphics and images in the kernel, you have to run the code in UsingFrontEnd (http://reference.wolfram.com/mathematica/ref/UsingFrontEnd.html)
Thank you for your help. I understand how it works, but now when I try to generate the graphs the following error message appears: Could not process unknown packet "Graphics3D".
Notebook files aren't normally executable. Have you ever made a Mathematica script before? If not, please take a look at the documentation below and try making some of the example scripts mentioned in the tutorial. Do they example/tutorial mathematica scripts work for you?
http://reference.wolfram.com/mathematica/tutorial/MathematicaScripts.html