This started as a quest to produce a vector SVG export of an ArrayPlot of a cellular automaton. However, it quickly became apparent that this would be more complicated than Export["vectorca.svg",ArrayPlot[CellularAutomaton[30,{{1},0},20]]]
, because ArrayPlots are actually raster objects, and I wanted little rectangles for each cell. I ended up with this code, which works for any two-dimensional binary array:
Export["~/Documents/jesse.ws/blog/rule30.svg",
MapIndexed[If[#1 == 1, Rectangle[#2 + .25], Nothing] &,
Reverse[Transpose@CellularAutomaton[30, {{1}, 0}, 30], 2], {2}]//Graphics]
Hopefully it might help somebody else in the future!