Sfoglia il codice sorgente

画图亏损涂绿盈利涂红

xjc 7 mesi fa
parent
commit
da31180597
1 ha cambiato i file con 6 aggiunte e 0 eliminazioni
  1. 6 0
      src/utils/plottool.py

+ 6 - 0
src/utils/plottool.py

@@ -87,6 +87,12 @@ def plot_records_as_table_and_convert_to_png(
                 table[i + offset, j].get_text().set_color('red')
         if table_data[i][4].startswith('-'):
             table[i + offset, 4].get_text().set_color('green')
+        else:
+            table[i + offset, 4].get_text().set_color('red')
+        if table_data[i][5].startswith('-'):
+            table[i + offset, 5].get_text().set_color('green')
+        else:
+            table[i + offset, 5].get_text().set_color('red')
 
     ax.add_table(table)
     if localfile: