Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to remove white margin around some Mathematica graphs

I'm trying to create a matrix plot with mathematica. Using ArrayPlot[] I get a very nice figure, apart from the fact that it's surrounded by a white margin. I've got to the root of the problem, in the sense of the following example.

http://img689.imageshack.us/img689/8427/badmargin.png

If I try to export the resulting graphic, it exports the margin also. I want my array content to fill a rectangle of a certain size so that it can be superimposed on another image, but the ArrayPlot function produces margins that interfere.

What do?

QuickEdit: ImageCrop will not work in my case, because a) I want my resulting image to be of a certain size, and b) without specifying how wide margins I want to remove the automatic version may mess with my graph (first row may well be white, for example).

like image 452
Gleno Avatar asked Jan 19 '11 21:01

Gleno


1 Answers

Try PlotRangePadding->0

Apparently my reply was too short, so I'm typing more.

like image 165
ragfield Avatar answered Nov 12 '22 15:11

ragfield