Eixos do Gráfico no Python (Matplotlib) - AULA 4

Published: 30 August 2022
on channel: Fala tu, Nerd!
71
9

Aprenda ciência de dados e programar em Python, de maneira simples!

Código fonte:
import matplotlib.pyplot as plt

fig, ax = plt.subplots()

labels = [1, 2, 3, 4]
tempo = [1, 2, 3, 4]
resistencia = [2, 3, 5, 11]

ax.plot(tempo, resistencia, 'b-s', label = 'Teste')
for i in range(len(tempo)):
ax.text(tempo[i]-0.1, resistencia[i]+0.25, '{}' .format(resistencia[i]))

ax.set_title('Aula 3')
ax.set_xlabel('Tempo')
ax.set_ylabel('Resistência')
ax.legend()
ax.grid()

x = ['a', 'b', 'c', 'd']
plt.xticks([1, 2, 3, 4], x)

y = ['a', 'b', 'c', 'd', 'e', 'f']
plt.yticks([1, 3, 5, 7, 9, 11], y)

plt.show()


On this page of the site you can watch the video online Eixos do Gráfico no Python (Matplotlib) - AULA 4 with a duration of hours minute second in good quality, which was uploaded by the user Fala tu, Nerd! 30 August 2022, share the link with friends and acquaintances, this video has already been watched 71 times on youtube and it was liked by 9 viewers. Enjoy your viewing!