Programme für Diagrammtypen: Säule, gestapelte Säulen

Linien, gestapelte Balken, Torte
This commit is contained in:
Olli Graf
2024-01-17 14:19:16 +01:00
parent 2a998611bf
commit 1dce636192
8 changed files with 251 additions and 0 deletions

20
teil23/iospeed_balken.py Executable file
View File

@@ -0,0 +1,20 @@
#! ./bin/python
#encoding: utf-8
import matplotlib.pyplot as plt
import numpy as np
labels = [ 'Pineberry Pi pcie1_gen=2','Pineberry Pi pcie1_gen=3', 'MicroSD Raspi 5', 'MicroSD Raspi 4']
io_read= np.array([148.50,171.99,30.85,10.15])
io_write = np.array([99.15,114.97,20.45,6.63])
legend = ['Schreiben','Lesen']
#Höhe der Balken
__hoehe__ =0.6
fig,ax = plt.subplots()
plt.barh(labels,io_write,__hoehe__)
plt.barh(labels,io_read,__hoehe__,left=io_write)
plt.legend(legend)
plt.show()