I can't force pyplot to draw in the middle a function. For example, this
function does not plot the sine before the user prompt, only after the
entire function executes:
import matplotlib.pyplot as plt
import numpy as np
def plot_now():
plt.ion()
plt.figure()
x = 2*np.pi*np.linspace(0.0, 1.0, 100)
plt.plot( x, np.sin(x) )
plt.draw()
plt.draw()
q = raw_input( 'anything: ')
I'm using the enthought python distribution for mac in ipython.
···
--
View this message in context: http://old.nabble.com/Can't-force-draw-tp30107286p30107286.html
Sent from the matplotlib - users mailing list archive at Nabble.com.
Fixed by switching the backend from WXAgg to MacOSX.
starz1010101 wrote:
···
I can't force pyplot to draw in the middle a function. For example, this
function does not plot the sine before the user prompt, only after the
entire function executes:
import matplotlib.pyplot as plt
import numpy as np
def plot_now():
plt.ion()
plt.figure()
x = 2*np.pi*np.linspace(0.0, 1.0, 100)
plt.plot( x, np.sin(x) )
plt.draw()
plt.draw()
q = raw_input( 'anything: ')
I'm using the enthought python distribution for mac in ipython.
--
View this message in context: http://old.nabble.com/Can't-force-draw-tp30107286p30144358.html
Sent from the matplotlib - users mailing list archive at Nabble.com.