import matplotlib.pyplot as plt fig = plt.figure() ax = plt.subplot() ax.set_ylim((-1, 25)) ax.axis("off") plt.bar([0], [20], color="w", edgecolor="k", hatch="x") plt.savefig("badhatch.svg", dpi=50)