Mathematica 9 is now available
Student Support Forum
Student Support Forum: 'Merging cells and exporting graphics' topicStudent Support Forum > General > "Merging cells and exporting graphics"

Next Comment >Help | Reply To Topic
Author Comment/Response
10/31/06 10:06am


I'm trying to generate some Set cards, every card consists of 1 to 3 same symbols. I wanted to make the card making process a bit more automatic then just typing commands, but instead choose a number of symbols needed and then outputing the graphics using a For loop.

For instance, I used this code to draw 3 rectangles

elnum = 3;
y = 0;
For[i = 1, i ≤ elnum,
Rectangle[{0, y}, {4, y + 1.5}],
RGBColor[1, 1, 1], Rectangle[{0.2, y +
0.2}, {3.8, y + 1.3}]}], AspectRatio ->
Automatic, ImageSize -> {100, Automatic}];
   i++, y = y + 2.5];

What I end up with is 3 rectangles as 3 separate graphic objects. Obviously, this happens becouse I use the Show command three times.

What I want to know is either how i can merge these 3 objects into one (and export it as a single object in a bitamp so it can be later used as a card), or how to still use the For loop but use the Show command just once to generate all three Rectangles into a single graphics object?

I hope you understand my question and will be able to help. Thanks.

URL: ,

Subject (listing for 'Merging cells and exporting graphics')
Author Date Posted
Merging cells and exporting graphics Lucija 10/31/06 10:06am
Re: Merging cells and exporting graphics yehuda ben-s... 10/31/06 11:46pm
Next Comment >Help | Reply To Topic