2
$\begingroup$

As a result of this question an issue of Export emerged. I.e., when I set my .eps figures with

plot=Column[Row[#, Spacer[5]] & /@ {{a, b, c, d}, {e, f, g}}, Alignment -> Center]

it does not look that correct in MMA window (as expected, because the figures are too big for a whole row to fit the screen), but when changed to 50% looks exactly how I want it. So, the placing seem right, so I Export["plot.eps",plot], and them it looks like in the picture below. I guess this has something to do with the fact that plot is not a single graphic.

I tried to simply switch Column/Row to GraphicsColumn/GraphicsRow, but then the alignment is messed (see the question from the link above).

How can I get the correct export?

Thanks in advance!enter image description here

$\endgroup$

1 Answer 1

2
$\begingroup$

What you observe is line-wrapping which is turned on in Column with the default setting ItemSize -> Automatic:

ItemSize->Automatic line-wraps textual elements at the page width

On the same Documentation page we read that ItemSize -> Full

allows every item its full width and height

So all what you need is to add ItemSize -> Full option into Column (stealing kguler's code from the linked thread):

{a, b, c, d, e, f, g, h, i} = 
  Table[With[{data = MapIndexed[Flatten[{##}] &, RandomReal[1, {100, 2}]], 
     color = RandomChoice[ColorData["Gradients"]], 
     intord = RandomInteger[{0, 4}]}, 
    ListDensityPlot[data, InterpolationOrder -> intord, ColorFunction -> color,
     Mesh -> All, ImageSize -> 200, ImagePadding -> {{20, 5}, {20, 5}}, 
     PlotLegends -> BarLegend[Automatic, LegendMarkerSize -> 200]]], {9}];

plots = Column[Row[#] & /@ {{a, b, c, d}, {e, f, g}, {h, i}}, 
  Alignment -> Center, ItemSize -> Full];    

Export["plots.pdf", plots]

Here is how it looks in Adobe Acrobat:

screenshot

The same effect can be achieved by replacing Row with Grid which does not allow line-wrapping:

plots = Column[Grid[{#}] & /@ {{a, b, c, d}, {e, f, g}, {h, i}}, Alignment -> Center]
$\endgroup$
0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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