Skip to content
Snippets Groups Projects
Commit 4c50b5af authored by Maxence Larrieu's avatar Maxence Larrieu
Browse files

legend and colors update

parent a40c1431
No related branches found
No related tags found
No related merge requests found
...@@ -94,8 +94,7 @@ for i, date in enumerate(df_evol.index) : ...@@ -94,8 +94,7 @@ for i, date in enumerate(df_evol.index) :
ax.set_xticks(x_idx_toshow) ax.set_xticks(x_idx_toshow)
ax.set_xticklabels(x_label_toshow, rotation=70, fontsize=10) ax.set_xticklabels(x_label_toshow, rotation=70, fontsize=10)
plt.title(f"Cumulative view of the quantity of UGA datasets\n and distribution by repository", \
plt.title(f"Evolution of the quantity of UGA open datasets\n and distribution per repository", \
fontsize = 18, x = 0.5, y = 1.03, alpha = 0.8) fontsize = 18, x = 0.5, y = 1.03, alpha = 0.8)
plt.suptitle(f"n = {len(df)}", fontsize = 12, x = 0.5, y = 0.87, alpha = 0.6) plt.suptitle(f"n = {len(df)}", fontsize = 12, x = 0.5, y = 0.87, alpha = 0.6)
......
2-produce-graph/hist-quantity-year-type.png

54.2 KiB | W: | H:

2-produce-graph/hist-quantity-year-type.png

54.1 KiB | W: | H:

2-produce-graph/hist-quantity-year-type.png
2-produce-graph/hist-quantity-year-type.png
2-produce-graph/hist-quantity-year-type.png
2-produce-graph/hist-quantity-year-type.png
  • 2-up
  • Swipe
  • Onion skin
...@@ -17,7 +17,7 @@ df_year_type.index.rename("year", inplace = True) ...@@ -17,7 +17,7 @@ df_year_type.index.rename("year", inplace = True)
## a set of color via plt ## a set of color via plt
### see color palett https://matplotlib.org/stable/users/explain/colors/colormaps.html ### see color palett https://matplotlib.org/stable/users/explain/colors/colormaps.html
colors = [plt.cm.tab20(i) for i in range(len(df_year_type.columns))] colors = [plt.cm.Set3(i) for i in range(len(df_year_type.columns))]
ax = df_year_type.plot( ax = df_year_type.plot(
kind = "bar", kind = "bar",
......
2-produce-graph/pie--datacite-type.png

56.4 KiB | W: | H:

2-produce-graph/pie--datacite-type.png

54.6 KiB | W: | H:

2-produce-graph/pie--datacite-type.png
2-produce-graph/pie--datacite-type.png
2-produce-graph/pie--datacite-type.png
2-produce-graph/pie--datacite-type.png
  • 2-up
  • Swipe
  • Onion skin
...@@ -17,7 +17,7 @@ df_type = df["resourceTypeGeneral"].value_counts() ...@@ -17,7 +17,7 @@ df_type = df["resourceTypeGeneral"].value_counts()
#define a color palette to use #define a color palette to use
### see color palett https://matplotlib.org/stable/users/explain/colors/colormaps.html ### see color palett https://matplotlib.org/stable/users/explain/colors/colormaps.html
colors = [plt.cm.tab20(i) for i in range(len(df_type))] colors = [plt.cm.Set3(i) for i in range(len(df_type))]
random.shuffle(colors) ## so that blue is not more the first item random.shuffle(colors) ## so that blue is not more the first item
plt.subplots(figsize=(10, 7)) plt.subplots(figsize=(10, 7))
...@@ -34,5 +34,3 @@ plt.savefig("pie--datacite-type.png") ...@@ -34,5 +34,3 @@ plt.savefig("pie--datacite-type.png")
print(f"\ngraph produced pie--datacite-type.png") print(f"\ngraph produced pie--datacite-type.png")
# plt.show() # plt.show()
# print(len(df))
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment