Skip to content

Commit

Permalink
Adjust table formatting and title
Browse files Browse the repository at this point in the history
  • Loading branch information
dotasek committed Apr 23, 2024
1 parent bebc2a6 commit aa8979c
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions .azure/i18n-coverage-table/generate-i18n-coverage-table.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,8 @@
import pandas as pd
import matplotlib.pyplot as plt

#make this example reproducible
np.random.seed(0)

#define figure and axes
fig, ax = plt.subplots()
fig, ax = plt.subplots(1,1)

#hide the axes
fig.patch.set_visible(False)
Expand All @@ -18,14 +15,18 @@
#create table
table = ax.table(cellText=df.values, colLabels=df.columns, loc='center')

#display table
table.scale(1, 4)
table.auto_set_font_size(False)
table.set_fontsize(14)

fig.tight_layout()
#plt.show()
fig.set_figheight(2)
fig.set_figwidth(4)

ax.set_title('Loss by Disaster')

fig = plt.gcf()
ax.set_title('Internationalization Phrase Coverage by Locale')

fig = plt.gcf()

plt.savefig('i18n-coverage-table.png',
bbox_inches='tight',
Expand Down

0 comments on commit aa8979c

Please sign in to comment.