0
import matplotlib.pyplot as plt
from math import floor
def tamanho(lista):
return floor(len(lista)/2)
rangex = [[(0,1.5)], [(1.5,3)], [(3,3)]]
rangey = [(n, -.5) for n in range(tamanho(rangex),-tamanho(rangex) - 1,-1)]
color = ['red', 'blue', 'yellow']
for charts in range(len(rangex)):
plt.broken_barh(rangex[charts], rangey[charts], facecolor=color[charts])
From this code, which has an output like:
I wish I could enter dates, someone has an idea how to do that, using the broken_barh
?
I ended up not talking, but I plan that the dates are in format %d/%m/%Y
I ended up not talking, but I plan that the dates are in format %d/%m/%Y
– Jp3108
Have you seen this post?
– Paulo Marques
I just saw @Paulomarques, thank you!
– Jp3108