<｜begin▁of▁sentence｜>### Instruction:
Given a simple directed graph with vertices [0, 1, 2] and edges [(0, 1), (1, 2)], can you use MatplotlibEdgeDrawer in igraph and matplotlib to draw the edges of the graph?
### Response:
import igraph as ig
import matplotlib.pyplot as plt

# Create a simple directed graph
g = ig.Graph(directed=True)
g.add_vertices(3)
g.add_edges([(0, 1), (1, 2)])

# Plot the graph
fig, ax = plt.subplots()
drawer = ig.MatplotlibEdgeDrawer(context=ax)

# Draw each edge using MatplotlibEdgeDrawer
for edge in g.es:
    src_vertex = g.vs[edge.source]
    dest_vertex = g.vs[edge.target]
    if g.is_directed():
        drawer.draw_directed_edge(edge, src_vertex, dest_vertex)
    else:
        drawer.draw_undirected_edge(edge, src_vertex, dest_vertex)

# Display the plot
plt.show()
<|EOT|>
