1import openturns as ot
2from matplotlib import pyplot as plt
3from openturns.viewer import View
4
5# Create the Pie
6pie = ot.Pie([.4, .3, .2, .1], ['a0', 'a1', 'a2', 'a3'])
7# Create an empty graph
8graph = ot.Graph("Pie example")
9graph.add(pie)
10
11# Then, draw it
12fig = plt.figure(figsize=(4, 4))
13axis = fig.add_subplot(111)
14View(graph, figure=fig, axes=[axis], add_legend=False)
15axis.set_xlim(auto=True)
16