2016-04-08 5 views
0

Ich versuche, mehrere Bilder in der Ipython-Zelle zum Vergleich zu plotten. Hier ist, was ich von dem unten Knoten bekam enter image description hereWie wird der Bildanzeigeort in der ipython/jupyter Notebookzelle eingestellt?

import numpy as np 
from matplotlib import pylab 
x = np.linspace(1.0,13.0,10) 
y = np.sin(x) 
pylab.plot(x,y) 
show() 
x = np.linspace(1.0,13.0,20) 
y = np.sin(x) 
pylab.plot(x,y) 
show() 
x = np.linspace(1.0,13.0,30) 
y = np.sin(x) 
pylab.plot(x,y) 
show() 

Wie kann ich diese Bilder wie die folgenden Richtung zeichnen?

Antwort

1

Die kurze Antwort ist, dass Sie in diesem Moment nicht können ... es sei denn, Sie machen eine Zahl von 3 Teilplots.

Gefällt Ihnen dieses vielleicht:

import numpy as np 
import matplotlib.pyplot as plt 
%matplotlib inline 

f, (ax1, ax2, ax3) = plt.subplots(1,3, figsize=(20,5)) 

x = np.linspace(1.0,13.0,10) 
y = np.sin(x) 
ax1.plot(x,y) 

x = np.linspace(1.0,13.0,20) 
y = np.sin(x) 
ax2.plot(x,y) 

x = np.linspace(1.0,13.0,30) 
y = np.sin(x) 
ax3.plot(x,y) 

plt.show() 

enter image description here