Skip to content

Commit 3a74bbe

Browse files
committed
Update vlines example with axes wide lines.
1 parent 38be69a commit 3a74bbe

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

examples/pylab_examples/vline_hline_demo.py

+2
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"""
44

55
import matplotlib.pyplot as plt
6+
from matplotlib.transforms import blended_transform_factory as btf
67
import numpy as np
78
import numpy.random as rnd
89

@@ -22,6 +23,7 @@ def f(t):
2223

2324
vax.plot(t, s + nse, '^')
2425
vax.vlines(t, [0], s)
26+
vax.vlines([1, 2], 0, 1, transform=btf(vax.transData, vax.transAxes), colors='r')
2527
vax.set_xlabel('time (s)')
2628
vax.set_title('Vertical lines demo')
2729

0 commit comments

Comments
 (0)