diff --git a/2-produce-graph/pie--datacite-client.png b/2-produce-graph/pie--datacite-client.png index fa677690edd8e99c16dc1b5465b9112d73ab01f8..8917d87e92a0ef3d9bbb70092e37a796c4953309 100644 Binary files a/2-produce-graph/pie--datacite-client.png and b/2-produce-graph/pie--datacite-client.png differ diff --git a/2-produce-graph/pie--datacite-type.png b/2-produce-graph/pie--datacite-type.png index 5563bf96844f6d95de63c5ca00ce4f4214e367b5..21521681e18539d91de2a455cfb74a39947c9fc5 100644 Binary files a/2-produce-graph/pie--datacite-type.png and b/2-produce-graph/pie--datacite-type.png differ diff --git a/2-produce-graph/pie-data-type.py b/2-produce-graph/pie-data-type.py index d271b36c729e3ed25ee13e1836f1e7705832d625..91500472a06b833e3e3985f49d78994404fedcdb 100644 --- a/2-produce-graph/pie-data-type.py +++ b/2-produce-graph/pie-data-type.py @@ -21,16 +21,18 @@ df_type = df["resourceTypeGeneral"].value_counts() colors = [plt.cm.Pastel1(i) for i in range(len(df_type))] random.shuffle(colors) ## so that blue is not more the first item - +plt.subplots(figsize=(10, 7)) +# plt.subplots_adjust(0.5, 1 , 0, 1) # pour modifier la taille du pie plt.pie(df_type, colors = colors, autopct=lambda p: '{:.0f}%'.format(round(p)) if p > 1 else '', startangle = 160) ## auto pct only if value > 1 -plt.legend(df_type.index, loc = (0.7, -0.1) ) +plt.legend(df_type.index, loc = (0.85, 0.2) ) plt.title(f"Type of datasets", fontsize = 20, x = 0.5, y = 1.03, alpha = 0.6) plt.suptitle(f"n = {len(df)}", fontsize = 11, x = 0.5, y = 0.9, alpha = 0.6) plt.savefig("pie--datacite-type.png") print(f"\ngraph produced pie--datacite-type.png") +plt.show() # print(len(df)) \ No newline at end of file diff --git a/2-produce-graph/pie-datacite-client.py b/2-produce-graph/pie-datacite-client.py index f353ed004c7b10894ea03c95f422b3b302d2a822..0b4f7a3d5096578e07e2cec54409a8d8a9ba54b9 100644 --- a/2-produce-graph/pie-datacite-client.py +++ b/2-produce-graph/pie-datacite-client.py @@ -31,6 +31,7 @@ colors = [plt.cm.Set3(i) for i in range(len(df_client))] #colors = sns.color_palette('pastel')[0:len(df_client)] +plt.subplots(figsize=(10, 7)) plt.pie(df_client, labels = df_client.index, colors = colors, autopct='%.0f%%') plt.title(f"Distribution of datasets by DataCite client", fontsize = 20, x = 0.5, y = 1.03, alpha = 0.6) plt.suptitle(f"n = {len(df)}", fontsize = 11, x = 0.5, y = 0.90, alpha = 0.6)