slupkowy2

Data utworzenia: 2025-01-07 20:18:55
import matplotlib.pyplot as plt import numpy as np x= np.array(["A","B","C", "D"]) y= np.array([3,8,1,10]) kolor=(["red", "orange", "black", "aqua"]) kolor1=(["red", "orange", "black", "aqua"]) plt.figure(figsize=(6,9)) plt.xlabel("Dane osi x") plt.ylabel("$Dane osi y$") plt.title("Dane wykresu",style="italic") plt.barh(x,y, height=0.3, alpha=0.2, label=kolor, color=kolor1) plt.legend([1,2,3,4]) plt.text(9,3,"tekst") plt.show()
Powrót