From 6c7b5494c0d1ffc33ade38e38774ede3ab3e909d Mon Sep 17 00:00:00 2001 From: Abodi Massarwa Date: Fri, 16 Aug 2024 20:27:11 +0300 Subject: [PATCH] minor changes --- .../heterogeneous_matroid_constraints_algorithms.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/fairpyx/algorithms/heterogeneous_matroid_constraints_algorithms.py b/fairpyx/algorithms/heterogeneous_matroid_constraints_algorithms.py index bdc0fc5..cbac2bd 100644 --- a/fairpyx/algorithms/heterogeneous_matroid_constraints_algorithms.py +++ b/fairpyx/algorithms/heterogeneous_matroid_constraints_algorithms.py @@ -1250,9 +1250,9 @@ def helper_generate_directed_graph_base64(graph, seed=42,category:str='',iterati #logger.info(f'**********\nRunning helper_generate_directed_graph_base64\n**********') plt.figure() - plt.title('Envy Graph') - additional_text=f'{category} iteration {iteration}' - plt.figtext(0.5, 0.95, additional_text, wrap=True, horizontalalignment='center', fontsize=10) + plt.title('Envy Graph',fontsize=16) + additional_text=f'category -> {category} iteration -> {iteration}' + plt.figtext(0.5, 0.90, additional_text, wrap=True, horizontalalignment='center', fontsize=10) pos = nx.spring_layout(graph, seed=seed) # Use a seed for reproducibility nx.draw(graph, pos, with_labels=True, node_color='lightblue', edge_color='gray', node_size=500, font_size=10, arrows=True) @@ -1270,8 +1270,8 @@ def helper_generate_bipartite_graph_base64(graph,iteration:int,category:str): #logger.info(f'**********\nRunning helper_generate_bipartite_graph_base64\n**********') plt.figure() plt.title('Agent-Item Bipartite Graph', fontsize=16) - additional_text=f'{category} iteration {iteration}' - plt.figtext(0.5, 0.95, additional_text, wrap=True, horizontalalignment='center', fontsize=10) + additional_text=f'category -> {category} iteration -> {iteration}' + plt.figtext(0.5, 0.90, additional_text, wrap=True, horizontalalignment='center', fontsize=10) try: top_nodes = {n for n, d in graph.nodes(data=True) if d['bipartite'] == 0} bottom_nodes = set(graph) - top_nodes