Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion examples/pylab_examples/vline_hline_demo.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
"""
Small demonstration of the hlines and vlines plots.
=================
hlines and vlines
=================

This example showcases the functions hlines and vlines.
"""

import matplotlib.pyplot as plt
from matplotlib.transforms import blended_transform_factory as btf
import numpy as np
import numpy.random as rnd

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

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

Expand Down