8000 MNT: use default colors · matplotlib/matplotlib@5c515e6 · GitHub
[go: up one dir, main page]

Skip to content

Commit 5c515e6

Browse files
committed
MNT: use default colors
1 parent 5f2bcbb commit 5c515e6

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

tools/memleak.py

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -63,16 +63,18 @@ def run_memleak_test(bench, iterations, report):
6363
ax.axvline(starti, linestyle='--', color='k')
6464
ax1b = ax1.twinx()
6565
ax1b.yaxis.set_major_formatter(formatter0)
66-
ax1.plot(malloc_arr, 'r')
67-
ax1b.plot(rss_arr, 'b')
68-
ax1.set_ylabel('pymalloc', color='r')
69-
ax1b.set_ylabel('rss', color='b')
66+
ax1.plot(malloc_arr, 'C0')
67+
ax1b.plot(rss_arr, 'C1', label='rss')
68+
ax1b.plot(rss_peaks, 'C1', linestyle='--', label='rss max')
69+
ax1.set_ylabel('pymalloc', color='C0')
70+
ax1b.set_ylabel('rss', color='C1')
71+
ax1b.legend()
7072

7173
ax2b = ax2.twinx()
72-
ax2.plot(nobjs_arr, 'r')
73-
ax2b.plot(garbage_arr, 'b')
74-
ax2.set_ylabel('total objects', color='r')
75-
ax2b.set_ylabel('garbage objects', color='b')
74+
ax2.plot(nobjs_arr, 'C0')
75+
ax2b.plot(garbage_arr, 'C1')
76+
ax2.set_ylabel('total objects', color='C0')
77+
ax2b.set_ylabel('garbage objects', color='C1')
7678

7779
ax3.plot(open_files_arr)
7880
ax3.set_ylabel('open file handles')

0 commit comments

Comments
 (0)
0