Skip to content

Commit 375eb02

Browse files
author
Armand Foucault
committed
Remove right axis meaningless values; move label to left axis
1 parent 6da24dd commit 375eb02

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

mprof.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -533,8 +533,10 @@ def level_to_saturation(level):
533533
bottom += 0.001
534534
top -= 0.001
535535

536-
pl.gca().grid(True)
537-
timestamp_ax = pl.twinx()
536+
ax = pl.gca()
537+
ax.grid(True)
538+
timestamp_ax = ax.twinx()
539+
timestamp_ax.set_yticks([])
538540
timestamp_ax.set_ylim((0, stack_size + 1))
539541
timestamp_ax.grid(False)
540542

@@ -639,6 +641,9 @@ def mouse_click_handler(event):
639641
colors="r", linestyles="--")
640642
pl.vlines(t[max_mem_ind], bottom, top,
641643
colors="r", linestyles="--")
644+
645+
pl.sca(ax)
646+
642647
return mprofile
643648

644649

0 commit comments

Comments
 (0)