Python 09 pyplot

 0    23 tarjetas    swiatangielskiego
descargar mp3 imprimir jugar test de práctica
 
término definición
import wykresów
empezar lección
import matplotlib. pyplot as plt
wykres dwie osie blue circle lub red plus
empezar lección
plt. plot(x, y, 'bo') plt. plot(x, y, 'r+') plt. plot(x, y, 'bo', x, y, 'r+')
wykres słupkowy pionowy
empezar lección
plt. bar(x, y, yerr=variance, color='blue')
wykres słupkowy poziomy
empezar lección
plt. barh(x, y, xerr=variance, color='blue')
wykres słupkowy podwójny
empezar lección
plt. bar(x, y, 0.3, color='red', label='Label1') plt. bar(x + 0.3, y, 0.3, color='blue', label='Label2')
wykres kołowy
empezar lección
plt. pie(lista, explode=explode, labels=firms, shadow=True, startangle=45)
wykres histogram
empezar lección
plt. hist(x, 10)
wykres rozproszony
empezar lección
plt. scatter(x, y)
tytuł wykresu
empezar lección
plt. title='asd1'
legenda wykresu i po prawej stronie
empezar lección
plt. legend() plt. legend(title='Firms') plt. axis('equal')
tytuł osi x y
empezar lección
plt. xlabel('X') plt. ylabel('Y')
automatycznie dostosój parametry wykresu
empezar lección
plt. tight_layout()
wykresy wyświetlane jednocześnie
empezar lección
plt. figure(1, figsize=(10, 10)) plt. plot(x, y, 'bo')
kilka wykresów na jednej figurze
empezar lección
plt. figure(1, figsize=(10, 10)) plt. subplot(2, 2, 1) plt. plot(x, y, 'bo')
tytuł kilku wykresów
empezar lección
plt. suptitle('Sub title')
wyświetl wykres
empezar lección
plt. show()
wykres rozproszony na bazie df
empezar lección
df. plot(kind='scatter', x='kolumna', y='kolumna', title=")
histogram na bazie df
empezar lección
df['kolumna']. plot(kind='hist', title='Score')
wykres słupkowy na bazie df
empezar lección
df['kolumna']. plot(kind='bar') barh
wykres kołowy na bazie df
empezar lección
df['kolumna']. plot(kind='pie')
pudelkowy na bazie df
empezar lección
df['kolumna']. plot(kind='box')
wykres subplot
empezar lección
fig, axes = plt. subplots(nrows=2, ncols=2) df. plot(ax=axes[0, 0], kind='hist')
kolorowanie wykresu rozproszonego
empezar lección
plt. scatter(df. col1, df. col2, c=colors) colors = np. array(["#f442bf", "#6e41f4", "#f4dc41"])[df[1]. cat. codes]

Debes iniciar sesión para poder comentar.