Continued from here.
Bars can be added to a diagram using the DiagramBar instruction. DiagramBar differs from the Bar instruction in that it use a virtual coordinate system (from a previous Diagram instruction) with its zero position in the left bottom corner, as opposed to the image itself that has its zero position in the top left corner. Like the Bar instruction, the DiagramBar instruction takes a color, position and size. Adding these lines (bold) will create five bars on the diagram.
//Set image size and background color.
Clear 400x300 #e0e0e0
//Create a white diagram.
Diagram #ffffff X:25 Y:40 W:350 H:230
//Create 5 bars.
DiagramBar #ff0000 X:25 Y:0 W:20 H:200
DiagramBar #00ff00 X:95 Y:0 W:20 H:50
DiagramBar #0000ff X:165 Y:0 W:20 H:150
DiagramBar #ff00ff X:235 Y:0 W:20 H:180
DiagramBar #f2f200 X:305 Y:0 W:20 H:100
Your picture should now look like this.

Unlike the Bar instruction, the DiagramBar instruction does not understand the HFill or the VFill argument.
As a footnote, if and when you are doing this in notepad, you might want to make use of automatic X positioning. By changing the X position to X:Auto/5, Monkeybone calculates the X position for you, assuming that 5 bars will be added. I don’t recommend that you use this feature when you are automating the diagram creation, but it is a time saver when you are working with notepad. Just enter X:Auto/n where n is the total number of bars. Example:
DiagramBar #334455 X:Auto/2 Y:0 W:30 H:120 DiagramBar #556677 X:Auto/2 Y:0 W:30 H:130
Continued here.

3 Responses to “Monkeybone: Creating a bar diagram using Notepad part 2/4”
on November 1st, 2009 at 23:46 #
[...] Part 2. [...]
on November 3rd, 2009 at 23:40 #
[...] Continued from here. [...]
on December 23rd, 2009 at 16:39 #
[...] text. These files can be created by hand using any text editor, such as Notepad (shown here, here, here and [...]