I am trying to plot some extremely small values with matplotlib in jupiter notebook (on a macbook pro). However, regardless if I set the y-axis limits, all I get is a flat line. What I am after is something like the example (png) below with regard to y-axis notation. Here's my code:
%matplotlib inline
import matplotlib.pyplot as plt
fig = plt.figure(figsize=(13,6))
ax = fig.add_subplot(111)
plt.hold(True)
ax.plot([0.2, 0.5, 0.8], [4E-300, 5E-300, 4E-300], marker='.')
And here's an example of what I am after with regard to y-axis values and notation:
Even with the following code:
%matplotlib inline
import matplotlib.pyplot as plt
import numpy as np
fig = plt.figure(figsize=(13,6))
ax = fig.add_subplot(111)
plt.hold(True)
xs = np.linspace(0, 1, 101)
ys = 1e-300 * np.exp(-(xs-0.5)**2/0.01)
ax.plot(xs, ys, marker='.')
I get the following plot: