# Include file containing procedure to display piechart.
#
include piechart.mapyrus

newpage "eps", "tutorialpiechart1.eps", 90, 40

# Set fixed colors and labels for all pies.
#
let colors = ["green", "orange", "yellow", "#606c30"]

let labels = ["Apples", "Oranges", "Bananas", "Olives"]

# Set production levels for first site.  Then draw piechart.
#
let production = [7000, 2000, 1500, 500]
clearpath
move 22, 15
piechart 4, production, labels, colors

# Set production levels for second site.  Then draw piechart.
# Pass dummy variable for labels array to demonstrate omitting labels.
#
let production = [5000, 3000, 2500, 500]
clearpath
move 42, 28
piechart 4, production, dummy, colors

# Set production levels for third site.  Then draw piechart.
#
let production = [8000, 2000, 4500, 3500]
clearpath
move 70, 14
piechart 4, production, labels, colors

# Include file containing procedure to diplay histogram.
#
include histogram.mapyrus

newpage "eps", "tutorialhistogram1.eps", 80, 20

# Draw small histogram with four values without any labels.
#
move 20, 7
let maxProduction = 10000
histogram colors, dummy, production, maxProduction, 6

# Set different production levels and draw another small histogram.
#
let production = [6000, 4000, 3500, 4500]
clearpath
move 40, 14
histogram colors, dummy, production, maxProduction, 6

# Draw a larger histogram with a label for each bar.
#
clearpath
move 60, 5
histogram colors, labels, production, maxProduction, 12
