Skip to content

Update vlines example with axes wide lines. #7878

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
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