fin separation front/back
This commit is contained in:
16
backend/visualization_strategy.py
Normal file
16
backend/visualization_strategy.py
Normal file
@@ -0,0 +1,16 @@
|
||||
import matplotlib.pyplot as plt
|
||||
import seaborn as sns
|
||||
|
||||
def plot_histogram(data, column):
|
||||
fig, ax = plt.subplots()
|
||||
ax.hist(data[column].dropna(), bins=20, edgecolor='k')
|
||||
ax.set_title(f"Histogram of {column}")
|
||||
ax.set_xlabel(column)
|
||||
ax.set_ylabel("Frequency")
|
||||
return fig
|
||||
|
||||
def plot_boxplot(data, column):
|
||||
fig, ax = plt.subplots()
|
||||
sns.boxplot(data=data, x=column, ax=ax)
|
||||
ax.set_title(f"Boxplot of {column}")
|
||||
return fig
|
Reference in New Issue
Block a user