Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit dd2b2b6

Browse files
author
Nathan Goldbaum
committed
Merge https://github.com/ngoldbaum/matplotlib into simplify-figsize-adjust
2 parents 3fbe0d7 + 3abe6e8 commit dd2b2b6

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

examples/pylab_examples/vline_hline_demo.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,13 @@
11
"""
2-
Small demonstration of the hlines and vlines plots.
2+
=================
3+
hlines and vlines
4+
=================
5+
6+
This example showcases the functions hlines and vlines.
37
"""
48

59
import matplotlib.pyplot as plt
10+
from matplotlib.transforms import blended_transform_factory as btf
611
import numpy as np
712
import numpy.random as rnd
813

@@ -22,6 +27,7 @@ def f(t):
2227

2328
vax.plot(t, s + nse, '^')
2429
vax.vlines(t, [0], s)
30+
vax.vlines([1, 2], 0, 1, transform=btf(vax.transData, vax.transAxes), colors='r')
2531
vax.set_xlabel('time (s)')
2632
vax.set_title('Vertical lines demo')
2733

0 commit comments

Comments
 (0)