There is an example in the Alignment
documentation (it also appears in the Grid
documentation):
Grid[{{Graphics[Rectangle[], ImageSize -> 20],
Graphics[Rectangle[], ImageSize -> 30]}, {Graphics[Rectangle[],
ImageSize -> 40], Graphics[Rectangle[], ImageSize -> 50]}},
Alignment -> {{Right, Left}, {Bottom, Top}}]
The Alignment
documentation indicates that numbers can be used for the alignment. Therefore the example above should be able to be re-written as
Grid[{{Graphics[Rectangle[], ImageSize -> 20],
Graphics[Rectangle[], ImageSize -> 30]}, {Graphics[Rectangle[],
ImageSize -> 40], Graphics[Rectangle[], ImageSize -> 50]}},
Alignment -> {{1, -1}, {-1, 1}}]
However this has no effect:
So what is the correct way to use numbers for Alignment
?
Answer
Can't currently be done -- it is supposed to be possible but doesn't work due to a bug.
To achieve this you need work around such as @Vitaliy's suggestion. Numbered alignment is quite useful so I hope this bug is fixed in the next version.
Comments
Post a Comment