diff --git a/onglets/__pycache__/onglet1.cpython-312.pyc b/onglets/__pycache__/onglet1.cpython-312.pyc index e06d98b9ddaddfe716d8f0e3f5f19e551df02c85..d0686936ca8d04f1be348d38c3b2708da9b89180 100644 Binary files a/onglets/__pycache__/onglet1.cpython-312.pyc and b/onglets/__pycache__/onglet1.cpython-312.pyc differ diff --git a/onglets/__pycache__/onglet2.cpython-312.pyc b/onglets/__pycache__/onglet2.cpython-312.pyc index c09264a0509b4a4a92940790572ca16f12b2b8e9..a3eca93e776573ca9885a390724e5026883f76a8 100644 Binary files a/onglets/__pycache__/onglet2.cpython-312.pyc and b/onglets/__pycache__/onglet2.cpython-312.pyc differ diff --git a/onglets/onglet1.py b/onglets/onglet1.py index e92991aafce0c01a83a876c9dcb8affdd8371291..cbd3c4d339193abc09712869d369c99f8ba5129c 100644 --- a/onglets/onglet1.py +++ b/onglets/onglet1.py @@ -124,6 +124,8 @@ def display() : # Premier tracé pour générer list_colors model_graph.barh_subplot(colors=col_color, show=False, title= title, xlabel= xlabel, ylabel=ylabel) + legend_title = st.text_input('Saisir le nom de la légende :', key='legend_title') + colors_rgba = model_graph.list_colors custom_colors = {} @@ -149,7 +151,7 @@ def display() : barh = model_graph.barh_subplot( colors=col_color, legend_list=legend_labels, - title_legend="Légende", + title_legend= legend_title, legend_indices=legend_indices, title= title, xlabel= xlabel, diff --git a/utils/__pycache__/utils_graph.cpython-312.pyc b/utils/__pycache__/utils_graph.cpython-312.pyc index 92e5e96d7c12e3e383c07d41a10a8ccc3aa0c2d9..fbf21eff371d63849d61bc561349c27a0a78dd98 100644 Binary files a/utils/__pycache__/utils_graph.cpython-312.pyc and b/utils/__pycache__/utils_graph.cpython-312.pyc differ diff --git a/utils/utils_graph.py b/utils/utils_graph.py index 6626376303746ebba98157db03d016344456b5a7..88558236b3e12f179208b458b71c3a607220f53d 100644 --- a/utils/utils_graph.py +++ b/utils/utils_graph.py @@ -6,7 +6,7 @@ import matplotlib.patches as mpatches # partie sur les légendes à revoir -c_map = ['#000091', '#AB0345'] +c_map = ['#7DC2A5', '#C7DDC5','#F1F1D3', '#D7B4BF', '#A1B3D1','#82C9D1', '#56B8D1'] cmap = LinearSegmentedColormap.from_list("custom_cmap", c_map) class plot_graph() : @@ -77,6 +77,9 @@ class plot_graph() : self.ax.grid(axis='x', linestyle='-', alpha=0.2) + self.ax.spines['top'].set_visible(False) + self.ax.spines['right'].set_visible(False) + plt.tight_layout() if show : @@ -119,7 +122,7 @@ class plot_graph() : if selection : for bar, label in zip(self.bars,self.y): if label in selection: - bar.set_edgecolor('#FCA616') + bar.set_edgecolor('black') bar.set_linewidth(3) return self.fig \ No newline at end of file