Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Displaying a numpy plot

`import matplotlib`<br>
`import numpy as np`
<br>
`import matplotlib.pyplot as plt
`<br>    
`plt.figure(figsize=(6, 3))`<br>

`    plt.plot(x, y)`
<br>
`plt.show()`<br>


Why doesn't plt.show() display my plot? plt.savefig('myplot.png') works, however.

thanks

Displaying a numpy plot

`import matplotlib`<br>
`import import matplotlib<br>
import numpy as np`
<br>
`import np
<br>
import matplotlib.pyplot as plt
`<br> plt
<br>  `plt.figure(figsize=(6, 3))`<br>

` plt.figure(figsize=(6, 3))<br>

    plt.plot(x, y)`
<br>
`plt.show()`<br>
y)<br>
plt.show()<br>


Why doesn't plt.show() display my plot? plt.savefig('myplot.png') works, however.

thanks

Displaying a numpy plot

import matplotlib<br>
import numpy as np
<br>
import matplotlib.pyplot as plt
<br>    
plt.figure(figsize=(6, 3))<br>

    plt.plot(x, y)<br>
plt.show()<br>


Why doesn't plt.show() display my plot? plt.savefig('myplot.png') works, however.

thanks

Displaying a numpy plot

import matplotlib<br>
matplotlib
import numpy as np
<br>
np

import matplotlib.pyplot as plt
<br>    plt
 
plt.figure(figsize=(6, 3))<br>
3))

    plt.plot(x, y)<br>
plt.show()<br>
y)
plt.show()

Why doesn't plt.show() display my plot? plt.savefig('myplot.png') works, however.

thanks

Displaying a numpy plot

import matplotlib
import numpy as np

import matplotlib.pyplot as plt
 plt


 
plt.figure(figsize=(6, 3))

    plt.plot(x, 
plt.plot(x, y)
plt.show()

Why doesn't plt.show() display my plot? plt.savefig('myplot.png') works, however.

thanks