In mine Ipython Notebook, my script turns out a series of several digits, for example:

The problem is that these numbers take too much space, and I produce many of these combinations. It is very difficult for me to move between these numbers.
I want to make part of the plot on the same line. How can I do it?
UPDATE:
Thanks for the fjarri suggestion, I changed the code and it works for building on one line.
Now I want to plot them on different lines (default option). What should I do? I tried some, but not sure if this is the right way.
def custom_plot1(ax = None):
if ax is None:
fig, ax = plt.subplots()
x1 = np.linspace(0.0, 5.0)
y1 = np.cos(2 * np.pi * x1) * np.exp(-x1)
ax.plot(x1, y1, 'ko-')
ax.set_xlabel('time (s)')
ax.set_ylabel('Damped oscillation')
def custom_plot2(ax = None):
if ax is None:
fig, ax = plt.subplots()
x2 = np.linspace(0.0, 2.0)
y2 = np.cos(2 * np.pi * x2)
ax.plot(x2, y2, 'r.-')
ax.set_xlabel('time (s)')
ax.set_ylabel('Undamped')
fig = plt.figure(figsize = (15,8))
ax1 = fig.add_subplot(1,2,1, projection = '3d')
custom_plot1(ax1)
ax2 = fig.add_subplot(1,2,2)
custom_plot2(ax2)
custom_plot1()
custom_plot2()

source
share