From ba389648d2afaf4dc3aa827a9237fa1f5071c1c2 Mon Sep 17 00:00:00 2001 From: Navan Chauhan Date: Wed, 27 Mar 2024 14:12:09 -0600 Subject: axist labels --- api.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'api.py') diff --git a/api.py b/api.py index d042795..e87f412 100644 --- a/api.py +++ b/api.py @@ -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 -- cgit v1.2.3