diff options
author | Navan Chauhan <navanchauhan@gmail.com> | 2024-03-27 14:12:09 -0600 |
---|---|---|
committer | Navan Chauhan <navanchauhan@gmail.com> | 2024-03-27 14:12:09 -0600 |
commit | ba389648d2afaf4dc3aa827a9237fa1f5071c1c2 (patch) | |
tree | 9550916c1af3cc4d0cab2fa5d09be2fe26cd5472 /api.py | |
parent | 3e3a90971047c5d1436db585592323e1e18653bb (diff) |
axist labels
Diffstat (limited to 'api.py')
-rw-r--r-- | api.py | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -148,8 +148,13 @@ def plot_data(x_data, y_data, std_dev_data, color_picker, labels, df, ax.tick_params(axis='y', length=0) arial_font = FontProperties(fname='./arial.ttf') mpl.font_manager.fontManager.addfont('./arial.ttf') - with mpl.rc_context({"font.family": arial_font.get_name(), "font.size": 10}): + with mpl.rc_context({"font.family": arial_font.get_name(), "font.size": 9}): ax.legend(handles, labels, loc='best') + + # set axis labels to Arial: + ax.set_xlabel(x_label, fontproperties=arial_font) + ax.set_ylabel(y_label, fontproperties=arial_font) + return fig return fig |