tmp: Use constrained plot layout

This commit is contained in:
Nimrod Gilboa Markevich 2022-05-25 00:30:25 +03:00
parent 26272c582b
commit 256ebfdbda

View File

@ -1,5 +1,6 @@
import matplotlib.pyplot as plt import matplotlib.pyplot as plt
import numpy as np import numpy as np
import os
import pandas as pd import pandas as pd
import pathlib import pathlib
import re import re
@ -142,6 +143,7 @@ if __name__ == '__main__':
goroutines_samples_df = pd.concat(goroutines_samples_all_files, axis=1) goroutines_samples_df = pd.concat(goroutines_samples_all_files, axis=1)
group_pattern = r'(\d+)[\w-]*\.\w+$' group_pattern = r'(\d+)[\w-]*\.\w+$'
plt.subplots(constrained_layout=True)
cpu_plot = plt.subplot(8, 2, 1) cpu_plot = plt.subplot(8, 2, 1)
plot(cpu_plot, cpu_samples_df, 'cpu', '', 'cpu (%)', group_pattern) plot(cpu_plot, cpu_samples_df, 'cpu', '', 'cpu (%)', group_pattern)