How to generate bar chart in python

import matplotlib.pyplot as plt
import numpy as np

x = np.array(["A","B","C","D"])
y = np.array([4,5,3,7])

#change colour
#horizontal bars
plt.barh(x,y,color = "g")
plt.show()

Comments

Popular posts from this blog

ESP32 Error: A fatal error occurred: Timed out waiting for packet content.

Sending and Receiving IR sensor data through NRF24L01

Detecting Obstacles and Warnings with ultrasonic sensor