Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

When I execute the lines

data1 = Table[i + j, {i, 10}, {j, 1}];
data10 = Table[i + j, {i, 10}, {j, 10}];
opts = {ImageSize -> {Automatic, 300}, BaseStyle -> {FontSize -> 14}, ImagePadding -> 25};
bothPlots = Row[{ArrayPlot[data1, opts], ArrayPlot[data10, opts]}]

I get the following picture:

enter image description here

The space between plot data and frame of the 1x10 array is much smaller than the space between the plot data and frame of the 10x10 matrix. Is there a possibility to avoide that or to set that space manually?

share|improve this question
add comment

1 Answer

up vote 7 down vote accepted

This can be fixed by specifying the PlotRangePadding option:

data1 = Table[i + j, {i, 10}, {j, 1}];
data10 = Table[i + j, {i, 10}, {j, 10}];
opts = {ImageSize -> {Automatic, 300}, BaseStyle -> {FontSize -> 14}, 
   ImagePadding -> 25, PlotRangePadding -> .2};
bothPlots = Row[{ArrayPlot[data1, opts], ArrayPlot[data10, opts]}]

padding

share|improve this answer
    
Thats it! Thanks. If I could I'd give you a +1 :D –  kyra Jul 25 '13 at 18:07
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.