basic ploting for skills
This commit is contained in:
@@ -2,10 +2,17 @@
|
||||
# encoding: utf-8
|
||||
|
||||
from .plottings import radar_graph
|
||||
from .skills_tools import count_levels, count_skill_evaluation
|
||||
import matplotlib.pyplot as plt
|
||||
import pandas as pd
|
||||
import numpy as np
|
||||
|
||||
__all__ = ["radar_on", "marks_hist", "parallele_on"]
|
||||
__all__ = ["radar_on",
|
||||
"pie_skill_evaluation",
|
||||
"pies_skills_level",
|
||||
"marks_hist",
|
||||
"parallele_on",
|
||||
]
|
||||
|
||||
def radar_on(df, index, optimum = None):
|
||||
""" Plot the radar graph concerning index column of the df
|
||||
@@ -26,6 +33,19 @@ def radar_on(df, index, optimum = None):
|
||||
fig, ax = radar_graph(labels, values, optimum)
|
||||
return fig, ax
|
||||
|
||||
def pie_skill_evaluation(df, skill):
|
||||
""" Plot a pie plot with the repartition of skill evaluations
|
||||
"""
|
||||
ax = count_skill_evaluation(df, skill).plot.pie(autopct='%.0f')
|
||||
return ax
|
||||
|
||||
def pies_skills_level(df, skill):
|
||||
""" Plot series of pies (one by different skill) with level repartition """
|
||||
levels_counts = count_levels(df, skill)
|
||||
fig, ax = plt.subplots(nrows=1, ncols=len(levels_counts), figsize=(16,3))
|
||||
plots = levels_counts.T.plot(ax=ax ,kind="pie", subplots=True, legend=False)
|
||||
return fig, ax
|
||||
|
||||
def marks_hist(df):
|
||||
""" Return axe for the histogramme of the dataframe
|
||||
|
||||
|
Reference in New Issue
Block a user