开发者

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 ma开发者_高级运维y mess with my graph (first row may well be white, for example).


Try PlotRangePadding->0

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


If you set the option Background->None the edges should be transparent. This would work if you were embedding it in another graphic.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜