sguruapp@gmail.com
facebook vk instagram Телеграм youtube
Назад

Create a graph in Python

ibraries
import numpy as np
import matplotlib.pyplot as plt

Create a dataset
objects = ('Python', 'Java', 'Swift', 'JavaScript')
performance = [10, 8, 9, 8]
y_pos = np.arange(len(objects))
    
Create bars with different colors
plt.bar(y_pos, performance, align='center', alpha=0.7, color=['red', 'yellow', 'red', 'yellow'])

Create names on the x-axis
plt.xticks(y_pos, objects)

Read more graph
Youtube channel
GURU IS YOUR BEST SOLUTION!