R visualisation better

This commit is contained in:
2023-03-28 20:41:46 +02:00
parent ca748eb57e
commit 300ce67b60
2 changed files with 27 additions and 17 deletions

View File

@@ -5,19 +5,30 @@ import mining_hq
from numpy import count_nonzero
sns.set()
plt.xticks(rotation = 90)
games_pre = mining_hq.games_sales_split_pre
games_dur = mining_hq.games_sales_split_dur
games_pos = mining_hq.games_sales_split_pos
games_fig_pre = sns.barplot(data = games_pre, x = "Year", y = "NA_Sales", estimator = count_nonzero)
crime_US = mining_hq.crime_US_intersect
crime_CA = mining_hq.crime_CA_intersect
plt.xticks(rotation = 90)
games_fig_pre = sns.histplot(data = games_pre, x = "Year", palette = sns.color_palette("flare"), kde = True)
plt.show()
plt.xticks(rotation = 90)
games_fig_dur = sns.barplot(data = games_dur, x = "Year", y = "NA_Sales", estimator = count_nonzero)
games_fig2_pre = sns.histplot(data = games_pre, x = "Year", hue = "Genre", multiple = "stack", shrink = 0.65)
plt.show()
plt.xticks(rotation = 90)
games_fig_pos = sns.barplot(data = games_pos, x = "Year", y = "NA_Sales", estimator = count_nonzero)
games_fig_dur = sns.barplot(data = games_dur, x = "Year", y = "NA_Sales")
plt.show()
plt.xticks(rotation = 90)
games_fig_pos = sns.barplot(data = games_pos, x = "Year", y = "NA_Sales")
plt.show()
plt.xticks(rotation = 90)
crime_CA_fig = sns.barplot(data = crime_CA, x = "year", y = "incidents")
plt.show()