Re: [Matplotlib-users] installating matplotlib in mac 10.7.4 for python 2.6
On 2012/10/13 6:41 PM, lulu wrote: > oh brother -- so now I've got to deal w/ Apple... I don't see what Apple has to do with it. > okay thanks. > > here's where I am. > > I've downloaded matplotlib, numpy, python 2.7.3, xcode and macports to > simply plot this oh-so-simple code! > Which is: > > Curve fitting with python and pylab > #import the lib > from pylab import * > # assuming this data set > t = (0,5,10,15,20,25,30,35,40,50) > V = (1,7,14,15,16,22,25,27,28,30) > #show the data > plot(t, v, linewidth=2.0) > #assume an order > N = ? > #find the coefficient of the polynomial > coeffs = polyfit(t,v,N) > #get the polynomial output for the input > best = polyval(coeffs, t) > #print the coefficients > print(coeffs) > > I have written it like this in python 2.6: > > import os,sys > import numpy > #import pylab > > t = (0,5,10,15,20,25,30,35,40,50) > V = (1,7,14,15,16,22,25,27,28,30) > #scipy.plot(t,v,linewidth=2.0) > > n = 4 > coeffs = numpy.polyfit(t,V,n) > > best = numpy.polyval(coeffs,t) > > print coeffs > print best > > and when I run the program, I get this: > [ -1.68165168e-05 1.71262071e-03 -6.39152514e-02 1.59163337e+00 > 1.04578755e+00] > [ 1.04578755 7.60964036 12.11505162 15.46811522 18.32267732 >21.08033633 23.89044289 26.6500999 29.0041625 29.81368631] > > when I run in 2.7.3 it looks like this: > import os,sys > import numpy as np > import pylab > > t = (0,5,10,15,20,25,30,35,40,50) > V = (1,7,14,15,16,22,25,27,28,30) > #scipy.plot(t,v,linewidth=2.0) > > n = 4 > coeffs = numpy.polyfit(t,V,n) > > best = numpy.polyval(coeffs,t) > > print coeffs > print best > > > And my error msg is this: > ImportError: No module named numpy > > any ideas? The problem in python 2.7 starts with the fact that numpy is evidently not installed for 2.7. Each version of python has its own set of libraries, so installing numpy for 2.6 does nothing for 2.7, and vice-versa. > What I'm looking for is a visual. With python 2.6, you may be almost there. Try running this in python 2.6: import numpy as np import matplotlib.pyplot as plt t = (0,5,10,15,20,25,30,35,40,50) V = (1,7,14,15,16,22,25,27,28,30) plt.plot(t, V, linewidth=2.0) n = 4 coeffs = np.polyfit(t,V,n) best = np.polyval(coeffs,t) print coeffs print best plt.show() Eric -- Don't let slow site performance ruin your business. Deploy New Relic APM Deploy New Relic app performance management and know exactly what is happening inside your Ruby, Python, PHP, Java, and .NET app Try New Relic at no cost today and get our sweet Data Nerd shirt too! http://p.sf.net/sfu/newrelic-dev2dev ___ Matplotlib-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] installating matplotlib in mac 10.7.4 for python 2.6
Thanks Eric- I ran this in python 2.6, and got this error: Traceback (most recent call last): File "/Users/laura/Desktop/Bohlen10_12_12.py", line 3, in import matplotlib.pyplot as plt ImportError: No module named matplotlib.pyplot >>> So, I am installing matplotlib again. -- View this message in context: http://matplotlib.1069221.n5.nabble.com/installating-matplotlib-in-mac-10-7-4-for-python-2-6-tp39436p39451.html Sent from the matplotlib - users mailing list archive at Nabble.com. -- Don't let slow site performance ruin your business. Deploy New Relic APM Deploy New Relic app performance management and know exactly what is happening inside your Ruby, Python, PHP, Java, and .NET app Try New Relic at no cost today and get our sweet Data Nerd shirt too! http://p.sf.net/sfu/newrelic-dev2dev ___ Matplotlib-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] [ANN] CFP: SciPy India 2012 -- Dec 27-29 -- IIT Bombay
Hello, The CFP for SciPy India 2012, to be held in IIT Bombay from December 27-29 is open. Please spread the word! Scipy.in is a conference providing opportunities to spread the use of the Python programming language in the Scientific Computing community in India. It provides a unique opportunity to interact with the "Who's who" of the Python for Scientific Computing fraternity and learn, understand, participate, and contribute to Scientific Computing using Python. Attendees of the conference and participants of the sprints planned will be able to access and review the tools available. They will also be able to learn domain-specific applications and how the tools apply to a plethora of application problems. One of the goals of the conference is to combine education, engineering, and science with computing through the medium of Python. This conference also aims to spread the use of Python for Scientific Computing in various fields and among different communities. Call for Papers We look forward to your submissions on the use of Python for Scientific Computing and Education. This includes pedagogy, exploration, modeling and analysis from both applied and developmental perspectives. We welcome contributions from academia as well as industry. Submission of Papers = If you wish to present your paper using this platform, please submit an abstract of 300 to 700 words describing the topic, including its relevance to scientific computing. Based on the number and quality of the submissions, the conference organizers will allot 10 - 30 minutes for each accepted talk. In addition to these talks, there will be an open session of lightning talks, during which any attendee who wishes to talk on a pertinent topic is invited to do a presentation not exceeding five minutes in duration. If you wish to present a talk at the conference, please follow the guidelines below. Submission Guidelines == - Submit your proposals at [email protected] - Submissions whose main purpose is to promote a commercial product or service will be refused. - All accepted proposals must be presented at the SciPy conference by at least one author. Important Dates - Call for proposals start: 27th September 2012, Thursday - Call for proposals end: 1st November 2012, Thursday - List of accepted proposals will be published: 19th November 2012, Monday - Submission of first presentation: 10th December 2012, Monday - Submission of final presentation(with final changes): 20th December 2012, Thursday -- Don't let slow site performance ruin your business. Deploy New Relic APM Deploy New Relic app performance management and know exactly what is happening inside your Ruby, Python, PHP, Java, and .NET app Try New Relic at no cost today and get our sweet Data Nerd shirt too! http://p.sf.net/sfu/newrelic-dev2dev ___ Matplotlib-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/matplotlib-users
