I've got a graph plotted using the matplotlib library, and would like to know if there is a way to view from a custom range. I have several vertical lines, starting 0. The beginning of the plot also starts at zero and makes seeing that first line difficult. Is there a way that I can have a view window starting a little more to the left (even though there is no value associated to it)? I know that it was possible in Mathematica with PlotRange, but I don't see an equivalent for `matplotlib'.
I've tried playing with the example found on:
http://matplotlib.org/examples/pylab_examples/vline_hline_demo.html
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)
vax.vlines(t, [0], s)
plt.show()
but can't the plot to display empty space to the left (or right)