Matplotlib
Plotly
[/U]
import matplotlib.pyplot as plt
# Veri oluşturma
x = [1, 2, 3, 4, 5]
y = [2, 4, 6, 8, 10]
# Çizgi grafiği oluşturma
plt.plot(x, y)
# Eksen etiketleri ve başlık ekleme
plt.xlabel("X ekseni")
plt.ylabel("Y ekseni")
plt.title("Örnek Çizgi Grafiği")
# Grafiği gösterme
plt.show()
[U]Plotly
[/U]
import plotly.express as px
# Veri oluşturma
data = px.data.gapminder().query("year == 2007")
# Scatterplot oluşturma
fig = px.scatter(data, x="gdpPercap", y="lifeExp", color="continent", size="pop", hover_name="country", log_x=True, size_max=60)
# Grafiği gösterme
fig.show()
[U]

