A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://matplotlib.org/api/../mpl_examples/pylab_examples/vline_hline_demo.py below:

""" Small demonstration of the hlines and vlines plots. """ import matplotlib.pyplot as plt import numpy as np import numpy.random as rnd def f(t): s1 = np.sin(2 * np.pi * t) e1 = np.exp(-t) return np.absolute((s1 * e1)) + .05 t = np.arange(0.0, 5.0, 0.1) s = f(t) nse = rnd.normal(0.0, 0.3, t.shape) * s fig = plt.figure(figsize=(12, 6)) vax = fig.add_subplot(121) hax = fig.add_subplot(122) vax.plot(t, s + nse, '^') vax.vlines(t, [0], s) vax.set_xlabel('time (s)') vax.set_title('Vertical lines demo') hax.plot(s + nse, t, '^') hax.hlines(t, [0], s, lw=2) hax.set_xlabel('time (s)') hax.set_title('Horizontal lines demo') plt.show()

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4