**Mathematica**

I use mathematica quite a bit in my research and also with my research students so for the benefit of them (and others if they also find it useful!) here I will explain some useful things I have learnt by playing around with the software, but also by scouring the web and by liaising with people at Manchester. There may well be better ways of doing things but as ever, once you find a way, you tend to stick with it!

One of the main aspects I will discuss here is how to get figures that look good in Mathematica to also look good in a latexed document, especially for articles, dissertations, etc. This often takes quite a bit of effort but is well worth it. Of course everyone has their own preferences!

Exporting plots for use in articles

This is something that you need to do quite frequently. I always use .eps files in latex and then use psfrag to replace text or numbers of the image with latex fonts. I find this looks very good in the latex document. You can use the mathematica fonts of course but I always feel there is a mismatch there which does not look quite right. So in order to export an image that you have created in mathematica, you just have to do the following. First create an image via the following command

```
Plot[x^2/3 Sin[6 x], {x, -2 Pi, 2 Pi}, PlotStyle -> {Thickness -> 0.008}, AxesLabel -> {x, y}]
```

which produces the following image

Note that here I have made the plot line thicker. One almost always has to do this in order for the things to look"right" in the final latexed document.

Lower resolution plots for use in articles

Quite often, you will produce a nice plot, say using Plot3D and want to use this in a paper. Fine you say, just export the image as an .eps or other file and use that. This is all very well but the default resolution is too high. So this is what the command "ImageResolution" can be used for. E.g. say you had produced an image called "fig". You could export this image as an .eps file by doing the following

BUT when this is used, the problem is that any axes will appear rather "grainy" in the exported image and this generally looks poor in documents of any kind.

So, what do we do? The way to solve this problem is to separate the axes and the actual plot, export the figure using resolution

So, what do we do? The way to solve this problem is to separate the axes and the actual plot, export the figure using resolution