From d353c71864257d0fcf2c21501f1e47ace8bcfb9a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Dahlgren?= Date: Thu, 19 Jan 2017 19:25:42 +0100 Subject: [PATCH 1/2] Update vlines example with axes wide lines. --- examples/pylab_examples/vline_hline_demo.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/examples/pylab_examples/vline_hline_demo.py b/examples/pylab_examples/vline_hline_demo.py index 63f71dff4173..22e40a353385 100644 --- a/examples/pylab_examples/vline_hline_demo.py +++ b/examples/pylab_examples/vline_hline_demo.py @@ -3,6 +3,7 @@ """ import matplotlib.pyplot as plt +from matplotlib.transforms import blended_transform_factory as btf import numpy as np import numpy.random as rnd @@ -22,6 +23,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') From bc7d3a95b29edc1b17fdc4adab7d6e9df5d192d6 Mon Sep 17 00:00:00 2001 From: Nelle Varoquaux Date: Tue, 7 Mar 2017 22:30:15 -0800 Subject: [PATCH 2/2] DOC added docstring to vline-hline example. --- examples/pylab_examples/vline_hline_demo.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/examples/pylab_examples/vline_hline_demo.py b/examples/pylab_examples/vline_hline_demo.py index 22e40a353385..1959b4af8e5e 100644 --- a/examples/pylab_examples/vline_hline_demo.py +++ b/examples/pylab_examples/vline_hline_demo.py @@ -1,5 +1,9 @@ """ -Small demonstration of the hlines and vlines plots. +================= +hlines and vlines +================= + +This example showcases the functions hlines and vlines. """ import matplotlib.pyplot as plt