Solve bug with multiple ax on same fig
This commit is contained in:
@@ -45,15 +45,16 @@ def pie_pivot_table(df, pies_per_lines = 3, **kwargs):
|
||||
pv = pd.pivot_table(df, **kwargs)
|
||||
return pivot_table_to_pie(pv, pies_per_lines)
|
||||
|
||||
def marks_hist(df):
|
||||
def marks_hist(df, **kwargs):
|
||||
""" Return axe for the histogramme of the dataframe
|
||||
|
||||
:param df: Dataframe with "Mark" and "Bareme" columns. If it has "Nom" column, it is use in title.
|
||||
:param kwargs: argument to pass to hist
|
||||
"""
|
||||
bareme = df["Bareme"].max()
|
||||
bins = int(bareme*2)
|
||||
|
||||
ax = df["Mark"].hist(bins = bins, range=(0,bareme))
|
||||
ax = df["Mark"].hist(bins = bins, range=(0,bareme), **kwargs)
|
||||
|
||||
try:
|
||||
nom = df["Nom"].unique()
|
||||
|
||||
Reference in New Issue
Block a user