First time here? Check out the FAQ!

Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

asked 10 years ago

Geremia gravatar image

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

click to hide/show revision 2
No.2 Revision

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

click to hide/show revision 3
No.3 Revision

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

click to hide/show revision 4
No.4 Revision

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

click to hide/show revision 5
No.5 Revision

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