Ver Fonte

add rotation

phillip.rothenbeck há 1 ano atrás
pai
commit
98e4fca97d
1 ficheiros alterados com 5 adições e 2 exclusões
  1. 5 2
      src/plotter.py

+ 5 - 2
src/plotter.py

@@ -66,7 +66,8 @@ class Plotter:
              legend_loc='best', 
              legend_loc='best', 
              ylim=(None, None),
              ylim=(None, None),
              xlabel='',
              xlabel='',
-             ylabel=''):
+             ylabel='', 
+             xlabel_rotation=0):
         """Plotting method.
         """Plotting method.
 
 
         Args:
         Args:
@@ -126,10 +127,12 @@ class Plotter:
             plt.yscale('log')
             plt.yscale('log')
 
 
         if xlabel != '':
         if xlabel != '':
-            plt.xlabel(xlabel)
+            plt.xlabel(xlabel, )
 
 
         if ylabel != '':
         if ylabel != '':
             plt.ylabel(ylabel)
             plt.ylabel(ylabel)
+
+        plt.xticks(rotation=xlabel_rotation)
  
  
         if not os.path.exists(FRAME_DIR):
         if not os.path.exists(FRAME_DIR):
             os.makedirs(FRAME_DIR)
             os.makedirs(FRAME_DIR)