Home > Software design >  How do I change the direction of a vertical Waffle?
How do I change the direction of a vertical Waffle?

Time:05-01

I have this script that generates a Waffle of example date:

import matplotlib.pyplot as plt
from pywaffle import Waffle
values = [3, 8, 9, 13, 9, 4, 5, 9, 10, 7, 4, 1]
colors = ["#1D428A", "#5566A6", "#838DC2", "#B1B6DF", "#DEE1FC", "#FFFFFF"]
colors = colors   colors[::-1]
fig = plt.figure(
    FigureClass = Waffle,
    columns = 4,
    values = values[::-1],
    colors = colors,
    block_arranging_style = "snake",
    vertical = True)
plt.savefig("test1.png")

The result looks like this: enter image description here

  • Related