tower429 / pythonxy

Automatically exported from code.google.com/p/pythonxy
0 stars 0 forks source link

matplotlib.pyplot is not ploting my data #521

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
If relevant, please answer to the following questions:
1. 2.7.2
2. Python(x,y)
    a. "Recommended" 
3. Have you selected the option "Customize installation directories"?
b. No
5. Where did you install Python(x,y) itself?
a. default path
6. Have you installed Python(x,y):
    b. For "All users"
7. What is your operating system?
c. Windows 7
8. Is the operating system 64 bit?
    a. Yes ( i tested this problem on both 32 and 64 bit)
9. When you installed Python(x,y), were you logged in as :
b. an administrator of the machine
10. If you are using Windows Vista/7, have you installed Python(x,y):
a. simply by double-clicking on the installer
11. Regarding installed softwares on your machine, how did you clean your
machine before installing Python(x,y) (multiple answers are possible):
    a. you didn't do anything, you installed Python(x,y) directly on your (First time installation)

Please provide any additional information below.

#python and iptyhon is not plotting my data.
# I used the commands as follows

import numpy as np
import matplotlib.pyplot as plt

x = np.arange(1,5,0.1)
y = np.sin(x)
plt.plot(x,y)           
# no result found 

# I also tested this technique

import numpy as np
import matplotlib.pylab as plt
x = np.arange as np
y = np.sin(x)
plt.plot(x,y)
# but got no results

I tested on 32bit and 64bit machines

In spyder it worked in command line but not in script
in command line i wrote:
#But in command line i simply wrote
x = arange(1,5,.1)
y = sin(x)
plot(x,y)
#it worked fine

# waiting for your kind reply

Original issue reported on code.google.com by geosa...@gmail.com on 8 Oct 2012 at 2:51

GoogleCodeExporter commented 9 years ago
In the future please direct such questions to the (appropriate) mailing list.
you should add to you scripts:
plt.ion()

which will interactive mode on - which is what Spyder does.

plt.show() seems to be a better method to use in scripts though.

Original comment by grizzly.nyo on 8 Oct 2012 at 6:32