From: <dav...@gm...> - 2010-03-24 16:57:06
|
Hello. I would like to know, please, how you can add graphics on a same plot. eg : superpose sine and cosine graphs on the same plot. Thank you very much. |
From: Ryan M. <rm...@gm...> - 2010-03-24 20:29:13
|
On Wed, Mar 24, 2010 at 10:55 AM, <dav...@gm...> wrote: > Hello. > > I would like to know, please, how you can add graphics on a same plot. > > eg : > > superpose sine and cosine graphs on the same plot. If you're just starting out with matplotlib, spending some time in our gallery is a great place to learn: http://matplotlib.sourceforge.net/gallery.html For your particular need, I'd look at: http://matplotlib.sourceforge.net/examples/pylab_examples/legend_demo2.html Ryan -- Ryan May Graduate Research Assistant School of Meteorology University of Oklahoma |
From: prem k. <pre...@gm...> - 2010-12-04 13:41:57
|
hi I have got a parametric equation in string form .Now , i want to plot the function for the above equation and find slope for some points on the function.Is there a way to find it using the matplotlib library ?.if there isn't, is there another library which i could use for the above said task. THANK YOU -- PREM KIRAN 2nd YEAR DEPARTMENT OF MECHANICAL ENGINEERING IIT MADRAS CHENNAI |
From: Benjamin R. <ben...@ou...> - 2010-12-04 16:31:39
|
On Sat, Dec 4, 2010 at 7:41 AM, prem kiran <pre...@gm...> wrote: > hi > > I have got a parametric equation in string form .Now , i want to > plot the function for the above equation and find slope for some points on > the function.Is there a way to find it using the matplotlib library ?.if > there isn't, is there another library which i could use for the above said > task. > THANK YOU > > > Prem, Matplotlib is used for plotting given data. NumPy is used to perform calculations to produce the data (which, in turn, matplotlib can plot it). However, you said that you have the equation in a string form. Are you looking to be able to evaluate any arbitrary parametric equation (given possibly by user input, perhaps?). If so, then maybe you need to look at Numexpr which can evaluate a string expression for you and return numpy arrays of the result. http://www.scipy.org/SciPyPackages/NumExpr Let us know if you have any questions. Ben Root |
From: Benjamin R. <ben...@ou...> - 2010-12-05 18:07:04
|
On Sun, Dec 5, 2010 at 5:29 AM, prem kiran <pre...@gm...> wrote: > THANK YOU > thank you for the response .I have problem using sympy > libraray in python.I am unable to use plot module .I am unable to import it > .what i require is given a function ,i should be able to plot it with all > the axes with and origin marked.also i should be able to zoom out the graph > and zoom in.Is there any such module?.This sympy is coming clsoe to my > requirements an dihave started using it but ended up here.kindly reply if > you know the solution. > THANKS ONCE AGAIN > > Prem, I am getting a little bit confused. Have you been using SymPy and you are having difficulty getting the results to plot? If so, is that the reason why you are looking for another way to get your expressions plotted? If this is the case, then you need to take a completely different approach. Obviously, if the Plot module in SymPy is not working, then your installation is somehow messed up and needs to be fixed. SymPy will do everything you need it to do. I suggest contacting the people on the SymPy mailing list: http://groups.google.com/group/sympy?pli=1 and see if they can help you with the plotting issue. Be sure to tell them that you are having difficulty with importing the Plot module. Copy and paste the error message that you get so that they can help you resolve that issue. Ben Root |
From: Alex L. <ale...@gm...> - 2011-01-18 23:33:08
|
Hi, While moving from Matlab to Numpy/Scipy/Matplotlib I need sometimes to work with Matlab figures. It would be nice if we could load Matlab figures in Python, extract the data and some basic parameters of how it was looking in Matlab and create its "clone" in matplotlib. At present the Matlab figures are MAT files and in the near future it will be HDF5, both formats are loadable. However, I have not found any reference for such attempts to load and parse the FIG files. As a beginner I find it difficult to write a large piece of code. However, if there are other interested users that can cooperate on such, I'd gladly contribute some hours for this task. Meanwhile, to show the proof-of-concept attempt is attached below. All your useful comments and suggestions are very welcome. Thank you, Alex #------------ loadfig.py ---------------------- # """ Loadfig loads simple Matlab figures as MAT files and plots the lines using matplotlib """ import numpy as np from scipy.io import loadmat import matplotlib.pyplot as plt def lowest_order(d): """ lowestsc_order(hgstruct) finds the handle of axes (i.e. children of figure handles, etc.) """ while not 'graph2d.lineseries' in d['type']: d = d['children'][0][0] return d def get_data(d): """ get_data(hgstruct) extracts XData, YData, Color and Marker of each line in the given axis Parameters ---------- hgstruct : structure obtained from lowest_order(loadmat('matlab.fig')) """ xd,yd,dispname,marker,colors = [],[],[],[],[] for i in d: if i['type'] == 'graph2d.lineseries': xd.append(i['properties'][0][0]['XData'][0][0]) yd.append(i['properties'][0][0]['YData'][0][0]) dispname.append(i['properties'][0][0]['DisplayName'][0][0]) marker.append(i['properties'][0][0]['Marker'][0][0]) colors.append(i['properties'][0][0]['Color'][0][0]) return np.asarray(xd),np.asarray(yd),dispname,np.asarray(marker).astype('S1'),colors def plot_data(xd,yd,dispname=None,marker=None,colors=None): """ plot_data(xd,yd,dispname=None,marker=None,colors=None) plots the data sets extracted by get_data(lowest_order(loadmat('matlab.fig'))) Parameters ---------- xd,yd : array_like data arrays dispname : array of strings to be used in legend, optional marker : array of characters markers, e.g. ['o','x'], optional colors : array of color sets in RGB, e.g. [[0,0,1],[1,0,0]], optional """ for i,n in enumerate(xd): plt.plot(xd[i].T,yd[i].T,color=tuple(colors[i]),marker=marker[i],linewidth=0) plt.legend(dispname) plt.show() def main(filename): """ main(filename) loads the filename (with the extension .fig) which is Matlab figure. At the moment only simple 2D lines are supported. Examples ------- >>> loadfig('matlab.fig') # is equivalent to: >>> d = loadmat(filename) >>> d = d['hgS_070000'] >>> xd,yd,dispname,marker,colors = get_data(lowest_order(d)) >>> plot_data(xd,yd,dispname,marker,colors) """ d = loadmat(filename) # ver 7.2 or lower: d = d['hgS_070000'] xd,yd,dispname,marker,colors = get_data(lowest_order(d)) plot_data(xd,yd,dispname,marker,colors) if __name__ == "__main__": import sys import os try: filename = sys.argv[1] main(filename) except: print("Wrong file") # ----------------------------- EOF loadfig.py --------------------------- # Alex Liberzon Turbulence Structure Laboratory [http://www.eng.tau.ac.il/efdl] School of Mechanical Engineering Tel Aviv University Ramat Aviv 69978 Israel Tel: +972-3-640-8928 Lab: +972-3-640-6860 (telefax) E-mail: al...@en... |
From: Benjamin R. <ben...@ou...> - 2011-01-19 15:16:53
|
On Tue, Jan 18, 2011 at 5:32 PM, Alex Liberzon <ale...@gm...>wrote: > Hi, > > While moving from Matlab to Numpy/Scipy/Matplotlib I need sometimes to work > with Matlab figures. It would be nice if we could load Matlab figures in > Python, extract the data and some basic parameters of how it was looking in > Matlab and create its "clone" in matplotlib. At present the Matlab figures > are MAT files and in the near future it will be HDF5, both formats are > loadable. However, I have not found any reference for such attempts to load > and parse the FIG files. As a beginner I find it difficult to write a large > piece of code. However, if there are other interested users that can > cooperate on such, I'd gladly contribute some hours for this task. > Meanwhile, to show the proof-of-concept attempt is attached below. All your > useful comments and suggestions are very welcome. > > Thank you, > Alex > > Alex, That is very interesting. I was not aware that matlab's figure files were simply .mat files in disguise. I would presume that it would be feasible to produce some sort of importer in such a case (provided the documentation for Matlab's figure format is complete enough). I am wary of making such a function a core feature of Matplotlib, however, because it would require creating a dependency to the scipy.io package. However, I could see it being a toolkit package like Basemap. Would you mind creating a feature request ticket at: http://sourceforge.net/tracker/?group_id=80706 If you include this example code, and maybe some links to some documentation on matlab's figure files, maybe something can grow from that. Thanks! Ben Root |
From: todd r. <tod...@gm...> - 2011-01-19 22:45:31
|
On Wed, Jan 19, 2011 at 10:16 AM, Benjamin Root <ben...@ou...> wrote: > > > On Tue, Jan 18, 2011 at 5:32 PM, Alex Liberzon <ale...@gm...> > wrote: >> >> Hi, >> >> While moving from Matlab to Numpy/Scipy/Matplotlib I need sometimes to >> work with Matlab figures. It would be nice if we could load Matlab figures >> in Python, extract the data and some basic parameters of how it was looking >> in Matlab and create its "clone" in matplotlib. At present the Matlab >> figures are MAT files and in the near future it will be HDF5, both formats >> are loadable. However, I have not found any reference for such attempts to >> load and parse the FIG files. As a beginner I find it difficult to write a >> large piece of code. However, if there are other interested users that can >> cooperate on such, I'd gladly contribute some hours for this task. >> Meanwhile, to show the proof-of-concept attempt is attached below. All your >> useful comments and suggestions are very welcome. >> >> Thank you, >> Alex >> > > Alex, > > That is very interesting. I was not aware that matlab's figure files were > simply .mat files in disguise. I would presume that it would be feasible to > produce some sort of importer in such a case (provided the documentation for > Matlab's figure format is complete enough). > > I am wary of making such a function a core feature of Matplotlib, however, > because it would require creating a dependency to the scipy.io package. > However, I could see it being a toolkit package like Basemap. > > Would you mind creating a feature request ticket at: > > http://sourceforge.net/tracker/?group_id=80706 > > If you include this example code, and maybe some links to some documentation > on matlab's figure files, maybe something can grow from that. > > Thanks! > Ben Root I agree, but for a slightly different reason. I think it would be great if it would be possible to incorporate viewing matlab figures into the rest of my system, so making it more isolated would help in this regard. -Todd |
From: Peter S. <pet...@gm...> - 2011-01-25 10:09:25
|
Hi, I am using Matplotlib with python 2.6 on a MacBook Pro (Mac OS X 10.6): Darwin Peters-MacBook-Pro.local 10.6.0 Darwin Kernel Version 10.6.0: Wed Nov 10 18:13:17 PST 2010; root:xnu-1504.9.26~3/RELEASE_I386 i386 I had a hard job getting matplotlib going, but eventually managed it using an easy_install script that installed scipy and numpy as well. Matplotlib would not work with the EPD distribution on my machine. I also tried installing python 2.7 on my mac and working with that but it didn't work either. So I deleted all (I hope) the python stuff I had tried to get going, including environment variables, keeping just the default python 2.6 that comes with Mac OS X 10.6. Now matplotlib works just fine. But now when I run port selfupdate and then port -v upgrade outdated i get the following error: ... ---> Activating python26 @2.6.6_1 Error: Target org.macports.activate returned: Image error: /opt/local/bin/python2.6 already exists and does not belong to a registered port. Unable to activate port python26. Use 'port -f activate python26' to force the activation. Error: Failed to install python26 Log for python26 is at: /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_python26/main.log Error: The following dependencies were not installed: python26 Error: Unable to upgrade port: 1 To report a bug, see <http://guide.macports.org/#project.tickets> I wonder if this is due to an old failed install that I tried with macports. My question is: can I force this activation and know that my matplotlib etc will still work? If this is nothing to do with updating the shipped python, how can I stop macports trying to upgrade python 2.6? I really don't want to do anything that will break my lovely matplotlib again. This might be more of a macports question, but I'm interested to hear of others' experiences with matplotlib on mac OS X 10.6 anyway. Cheers, Peter |
From: Uri L. <las...@mi...> - 2011-01-25 15:43:59
|
I recently bought a new Macbook Air, with OS X 10.6. I started using a new package manager called homebrew (http://mxcl.github.com/homebrew/) which is simple, clean, and git-based. I find it incredibly easy to use, and my numpy/scipy/mpl stack (using repo MPL) installed very smoothly. The package will build everything from scratch, and it builds python2.7 for you. Here is what I did on my new computer. (NOTE: I had some trouble replicating this on an older computer, but eventually got it working. If this doesn't work for you, let me know, and I'll give you info on the other install I did with homebrew.) brew install python brew install pip # install gfortran from here: # http://r.research.att.com/tools/ brew install fftw brew install suite-sparse # based on: http://mail.scipy.org/pipermail/numpy-discussion/2010-August/052227.html # download numpy 1.5.1 # download scipy 0.8.0 # tarballs # set the following environment vars: export MACOSX_DEPLOYMENT_TARGET=10.6 export CFLAGS="-arch i386 -arch x86_64" export FFLAGS="-m32 -m64" export LDFLAGS="-Wall -undefined dynamic_lookup -bundle -arch i386 -arch x86_64 -framework Accelerate" # in numpy directory: python setup.py build --fcompiler=gnu95 python setup.py install # in scipy directory: python setup.py build --fcompiler=gnu95 sudo python setup.py install # fresh shell pip install ipython Uri ................................................................................... Uri Laserson Graduate Student, Biomedical Engineering Harvard-MIT Division of Health Sciences and Technology M +1 917 742 8019 las...@mi... On Tue, Jan 25, 2011 at 05:09, Peter Smale <pet...@gm...> wrote: > Hi, > I am using Matplotlib with python 2.6 on a MacBook Pro (Mac OS X 10.6): > > Darwin Peters-MacBook-Pro.local 10.6.0 Darwin Kernel Version 10.6.0: Wed > Nov 10 18:13:17 PST 2010; root:xnu-1504.9.26~3/RELEASE_I386 i386 > > I had a hard job getting matplotlib going, but eventually managed it using > an easy_install script that installed scipy and numpy as well. Matplotlib > would not work with the EPD distribution on my machine. I also tried > installing python 2.7 on my mac and working with that but it didn't work > either. So I deleted all (I hope) the python stuff I had tried to get going, > including environment variables, keeping just the default python 2.6 that > comes with Mac OS X 10.6. Now matplotlib works just fine. > > But now when I run port selfupdate and then port -v upgrade outdated i get > the following error: > > ... > ---> Activating python26 @2.6.6_1 > Error: Target org.macports.activate returned: Image error: > /opt/local/bin/python2.6 already exists and does not belong to a registered > port. Unable to activate port python26. Use 'port -f activate python26' to > force the activation. > Error: Failed to install python26 > Log for python26 is at: > /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_python26/main.log > Error: The following dependencies were not installed: python26 > Error: Unable to upgrade port: 1 > To report a bug, see <http://guide.macports.org/#project.tickets> > > I wonder if this is due to an old failed install that I tried with > macports. > My question is: can I force this activation and know that my matplotlib etc > will still work? > If this is nothing to do with updating the shipped python, how can I stop > macports trying to upgrade python 2.6? > > I really don't want to do anything that will break my lovely matplotlib > again. > > This might be more of a macports question, but I'm interested to hear of > others' experiences with matplotlib on mac OS X 10.6 anyway. > > Cheers, > Peter > > ------------------------------------------------------------------------------ > Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)! > Finally, a world-class log management solution at an even better > price-free! > Download using promo code Free_Logger_4_Dev2Dev. Offer expires > February 28th, so secure your free ArcSight Logger TODAY! > http://p.sf.net/sfu/arcsight-sfd2d > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > |
From: nahren m. <mee...@ya...> - 2012-01-27 16:13:06
|
Dear Users, I want to plot a XY, the X-value is constant, but let assume Y varees from 1-10, so I want o have different colors accordingly for the range 0-2,2-4,4-6,6-8,8-10. thanks a lot najren |
From: Paul H. <pmh...@gm...> - 2012-01-29 07:22:02
|
There is undoubtedly a more efficient way to do this, but give this a shot: import numpy as np import matplotlib.pyplot as plt x = np.arange(0, 10.5, 0.5) y = -3.0*x + 0.5*x**2 color_list = ['FireBrick', 'Orange', 'DarkGreen', 'DarkBlue', 'Indigo'] limits = np.arange(0, 11, 2) fig, ax1 = plt.subplots() for n, color in enumerate(color_list): lower = np.where(x >= limits[n])[0] upper = np.where(x <= limits[n+1])[0] index = np.intersect1d(lower, upper) ax1.plot(x[index], y[index], linestyle='-', color=color, linewidth=2) plt.show() HTH, -paul On Fri, Jan 27, 2012 at 8:12 AM, nahren manuel <mee...@ya...> wrote: > Dear Users, > I want to plot a XY, the X-value is constant, but let assume Y varees from > 1-10, so I want o have different colors accordingly for the range > 0-2,2-4,4-6,6-8,8-10. > > thanks a lot > najren > > ------------------------------------------------------------------------------ > Try before you buy = See our experts in action! > The most comprehensive online learning library for Microsoft developers > is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, > Metro Style Apps, more. Free future releases when you subscribe now! > http://p.sf.net/sfu/learndevnow-dev2 > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > |
From: Paul I. <piv...@gm...> - 2012-01-29 07:42:51
|
Paul Hobson, on 2012-01-28 23:21, wrote: > There is undoubtedly a more efficient way to do this, but give this a shot: > > import numpy as np > import matplotlib.pyplot as plt > > x = np.arange(0, 10.5, 0.5) > y = -3.0*x + 0.5*x**2 > > color_list = ['FireBrick', 'Orange', 'DarkGreen', 'DarkBlue', 'Indigo'] > limits = np.arange(0, 11, 2) > fig, ax1 = plt.subplots() > for n, color in enumerate(color_list): > lower = np.where(x >= limits[n])[0] > upper = np.where(x <= limits[n+1])[0] > index = np.intersect1d(lower, upper) > ax1.plot(x[index], y[index], linestyle='-', color=color, linewidth=2) Another way (if you're ok with only coloring the markers) would be to use ax1.scatter(x,y,c=colorlist) where the length of all three arguments is the same. Scatter can do that with the size of the markers by passing the s= argument. best, -- Paul Ivanov 314 address only used for lists, off-list direct email at: http://pirsquared.org | GPG/PGP key id: 0x0F3E28F7 |
From: Tony Yu <ts...@gm...> - 2012-01-29 16:20:23
|
On Sun, Jan 29, 2012 at 2:21 AM, Paul Hobson <pmh...@gm...> wrote: > There is undoubtedly a more efficient way to do this, but give this a shot: > > import numpy as np > import matplotlib.pyplot as plt > > x = np.arange(0, 10.5, 0.5) > y = -3.0*x + 0.5*x**2 > > color_list = ['FireBrick', 'Orange', 'DarkGreen', 'DarkBlue', 'Indigo'] > limits = np.arange(0, 11, 2) > fig, ax1 = plt.subplots() > for n, color in enumerate(color_list): > lower = np.where(x >= limits[n])[0] > upper = np.where(x <= limits[n+1])[0] > index = np.intersect1d(lower, upper) > ax1.plot(x[index], y[index], linestyle='-', color=color, linewidth=2) > > plt.show() > > HTH, > -paul > Alternatively, you could replace the loop above with:: indexes = np.searchsorted(x, limits) # add 1 to end index so that segments overlap for i0, i1, color in zip(indexes[:-1], indexes[1:]+1, color_list): ax1.plot(x[i0:i1], y[i0:i1], linestyle='-', color=color, linewidth=2) This is not much different than Paul's example---just whatever you find more readable. -Tony > > On Fri, Jan 27, 2012 at 8:12 AM, nahren manuel <mee...@ya...> > wrote: > > Dear Users, > > I want to plot a XY, the X-value is constant, but let assume Y varees > from > > 1-10, so I want o have different colors accordingly for the range > > 0-2,2-4,4-6,6-8,8-10. > > > > thanks a lot > > najren > > > > > ------------------------------------------------------------------------------ > > Try before you buy = See our experts in action! > > The most comprehensive online learning library for Microsoft developers > > is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, > > Metro Style Apps, more. Free future releases when you subscribe now! > > http://p.sf.net/sfu/learndevnow-dev2 > > _______________________________________________ > > Matplotlib-users mailing list > > Mat...@li... > > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > > > > ------------------------------------------------------------------------------ > Try before you buy = See our experts in action! > The most comprehensive online learning library for Microsoft developers > is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, > Metro Style Apps, more. Free future releases when you subscribe now! > http://p.sf.net/sfu/learndevnow-dev2 > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > |
From: Debashish S. <sil...@gm...> - 2012-02-06 19:07:59
|
what is the basic difference between the commands import pylab as * import matplotlib.pyplot as plt |
From: Benjamin R. <ben...@ou...> - 2012-02-06 19:12:12
|
On Mon, Feb 6, 2012 at 1:07 PM, Debashish Saha <sil...@gm...> wrote: > what is the basic difference between the commands > import pylab as * > import matplotlib.pyplot as plt > > This page should help you out. Let us know if you have any further questions. http://matplotlib.sourceforge.net/faq/usage_faq.html#matplotlib-pylab-and-pyplot-how-are-they-related Ben Root |
From: <fra...@hu...> - 2012-02-18 23:44:55
|
Hello all. I have a rather long code and get always a strange error: can't invoke "event" command: application has been destroyed while executing "event generate $w " (procedure "ttk::ThemeChanged" line 6) invoked from within "ttk::ThemeChanged" The code is too long but I found some other code that produces exactly same type of error (see below). Does anybody have an idea what can be done in this case? Thx for some help. Frank. I use: Ubuntu 10.10, 64 bit, Tkinter, Python 2.6, etc ... *************************************************************** import matplotlib.pyplot as plt fig1 = plt.figure() plt.plot(range(10), 'ro-') plt.title('This figure will be saved but not shown') fig1.savefig('fig1.png') plt.close(fig1) fig2 = plt.figure() plt.plot(range(10), 'bo') plt.title('This figure will be shown') plt.show() |
From: Eric F. <ef...@ha...> - 2012-02-19 00:07:41
|
On 02/18/2012 01:44 PM, fra...@hu... wrote: > Hello all. > > I have a rather long code and get always a strange error: > > can't invoke "event" command: application has been destroyed > while executing > "event generate $w <<ThemeChanged>>" > (procedure "ttk::ThemeChanged" line 6) > invoked from within > "ttk::ThemeChanged" > > > The code is too long but I found some other code that produces exactly > same type of error (see below). > > Does anybody have an idea what can be done in this case? Thx for > some help. > > Frank. > > I use: Ubuntu 10.10, 64 bit, Tkinter, Python 2.6, etc ... Confirmed with mpl master, ubuntu 11.04. It seems to be a harmless glitch in Tk. It is triggered by making a figure and then closing it; it does not matter whether anything is drawn in the figure. So the example can be condensed even more to: import matplotlib.pyplot as plt fig1 = plt.figure() plt.close(fig1) fig2 = plt.figure() plt.plot(range(10), 'bo') plt.title('This figure will be shown') plt.show() Eric > > *************************************************************** > > import matplotlib.pyplot as plt > > fig1 = plt.figure() > plt.plot(range(10), 'ro-') > plt.title('This figure will be saved but not shown') > fig1.savefig('fig1.png') > plt.close(fig1) > > fig2 = plt.figure() > plt.plot(range(10), 'bo') > plt.title('This figure will be shown') > > plt.show() > > > > ------------------------------------------------------------------------------ > Virtualization& Cloud Management Using Capacity Planning > Cloud computing makes use of virtualization - but cloud computing > also focuses on allowing computing to be delivered as a service. > http://www.accelacomm.com/jaw/sfnl/114/51521223/ > > > > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users |
From: Dorm E. <dor...@ya...> - 2012-03-27 03:08:26
|
hi, everybody! when I run my script, why there is no figure show up? I downloaded the demos from matplotlib gallery and it didn't work either. >>> >>> x=np.arange(100) >>> y=x**2+3*x-1 >>> pl.plot(x,y) [<matplotlib.lines.Line2D object at 0x2581050>] >>> pl.show() >>> there is no error, no figure pop-up! Thank you for any answer! |
From: Francesco M. <fra...@go...> - 2012-03-27 07:38:43
|
Il 27 marzo 2012 05:08, Dorm Eight <dor...@ya...> ha scritto: > hi, everybody! > > when I run my script, why there is no figure show up? I downloaded the demos > from matplotlib gallery and it didn't work either. >>>> >>>> x=np.arange(100) >>>> y=x**2+3*x-1 >>>> pl.plot(x,y) > [<matplotlib.lines.Line2D object at 0x2581050>] >>>> pl.show() >>>> > there is no error, no figure pop-up! > > Thank you for any answer! > Hi Dorm If you can send more info about the operating system and matplotlib version, it's easier to help you (for the latter do import matplotlib print matplotlib.__version__ ) Cheers, Francesco > ------------------------------------------------------------------------------ > This SF email is sponsosred by: > Try Windows Azure free for 90 days Click Here > http://p.sf.net/sfu/sfd2d-msazure > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > |
From: Francesco M. <fra...@go...> - 2012-03-30 12:02:23
|
> ________________________________ > From: Francesco Montesano <fra...@go...> > To: Dorm Eight <dor...@ya...> > Cc: "mat...@li..." > <mat...@li...> > Sent: Tuesday, March 27, 2012 3:38 PM > Subject: Re: [Matplotlib-users] (no subject) > > Il 27 marzo 2012 05:08, Dorm Eight <dor...@ya...> ha scritto: >> hi, everybody! >> >> when I run my script, why there is no figure show up? I downloaded the >> demos >> from matplotlib gallery and it didn't work either. >>>>> >>>>> x=np.arange(100) >>>>> y=x**2+3*x-1 >>>>> pl.plot(x,y) >> [<matplotlib.lines.Line2D object at 0x2581050>] >>>>> pl.show() >>>>> >> there is no error, no figure pop-up! >> >> Thank you for any answer! >> > > Hi Dorm > If you can send more info about the operating system and matplotlib > version, it's easier to help you > (for the latter do > import matplotlib > print matplotlib.__version__ > ) > > Cheers, > Francesco > >> >> ------------------------------------------------------------------------------ >> This SF email is sponsosred by: >> Try Windows Azure free for 90 days Click Here >> http://p.sf.net/sfu/sfd2d-msazure >> _______________________________________________ >> Matplotlib-users mailing list >> Mat...@li... >> https://lists.sourceforge.net/lists/listinfo/matplotlib-users >> > >Il 30 marzo 2012 13:23, Dorm Eight <dor...@ya...> ha scritto: Dear Dorm, please reply to all the list. > My system is Fedora 3.3.0-4.fc16.x86_64, after I recently updated the > system with 'yum update', the problem appeared. > the Matplotlib version is 1.10. I have no idea at all now. I've tested your small example on python 2.6, matplotlib 1.0.0 with MacOSX backend and on Kubuntu 11.04, python 2.7, matplotlib 1.1, with TkAgg and Qt4Agg backends and the small code works for me. In all cases I have set "plt.ion()" If you save the figure instead of showing, does it work? Which backend are you using: the name is stored in "matplotlib.backends.backend" Cheers Francesco |
From: Dorm E. <dor...@ya...> - 2012-03-30 12:17:13
|
DearFrancesco, Yes, I just tried it, it can be save perfectly. ________________________________ From: Francesco Montesano <fra...@go...> To: Dorm Eight <dor...@ya...>; mat...@li... Sent: Friday, March 30, 2012 8:01 PM Subject: Re: [Matplotlib-users] (no subject) > ________________________________ > From: Francesco Montesano <fra...@go...> > To: Dorm Eight <dor...@ya...> > Cc: "mat...@li..." > <mat...@li...> > Sent: Tuesday, March 27, 2012 3:38 PM > Subject: Re: [Matplotlib-users] (no subject) > > Il 27 marzo 2012 05:08, Dorm Eight <dor...@ya...> ha scritto: >> hi, everybody! >> >> when I run my script, why there is no figure show up? I downloaded the >> demos >> from matplotlib gallery and it didn't work either. >>>>> >>>>> x=np.arange(100) >>>>> y=x**2+3*x-1 >>>>> pl.plot(x,y) >> [<matplotlib.lines.Line2D object at 0x2581050>] >>>>> pl.show() >>>>> >> there is no error, no figure pop-up! >> >> Thank you for any answer! >> > > Hi Dorm > If you can send more info about the operating system and matplotlib > version, it's easier to help you > (for the latter do > import matplotlib > print matplotlib.__version__ > ) > > Cheers, > Francesco > >> >> ------------------------------------------------------------------------------ >> This SF email is sponsosred by: >> Try Windows Azure free for 90 days Click Here >> http://p.sf.net/sfu/sfd2d-msazure >> _______________________________________________ >> Matplotlib-users mailing list >> Mat...@li... >> https://lists.sourceforge.net/lists/listinfo/matplotlib-users >> > >Il 30 marzo 2012 13:23, Dorm Eight <dor...@ya...> ha scritto: Dear Dorm, please reply to all the list. > My system is Fedora 3.3.0-4.fc16.x86_64, after I recently updated the > system with 'yum update', the problem appeared. > the Matplotlib version is 1.10. I have no idea at all now. I've tested your small example on python 2.6, matplotlib 1.0.0 with MacOSX backend and on Kubuntu 11.04, python 2.7, matplotlib 1.1, with TkAgg and Qt4Agg backends and the small code works for me. In all cases I have set "plt.ion()" If you save the figure instead of showing, does it work? Which backend are you using: the name is stored in "matplotlib.backends.backend" Cheers Francesco |
From: Francesco M. <fra...@go...> - 2012-03-30 12:46:06
|
Dear Dorm, Il 30 marzo 2012 14:17, Dorm Eight <dor...@ya...> ha scritto: > Dear Francesco, > Yes, I just tried it, it can be save perfectly. so might be a problem with the backend. Give a look to this page: http://stackoverflow.com/questions/2512225/matplotlib-not-showing-up-in-mac-osx and try to change the backend. I think that I cannot help much more here. Does anyone else has an idea if there might be any other problem? Cheers, Francesco > > ________________________________ > From: Francesco Montesano <fra...@go...> > To: Dorm Eight <dor...@ya...>; mat...@li... > Sent: Friday, March 30, 2012 8:01 PM > > Subject: Re: [Matplotlib-users] (no subject) > >> ________________________________ >> From: Francesco Montesano <fra...@go...> >> To: Dorm Eight <dor...@ya...> >> Cc: "mat...@li..." >> <mat...@li...> >> Sent: Tuesday, March 27, 2012 3:38 PM >> Subject: Re: [Matplotlib-users] (no subject) >> >> Il 27 marzo 2012 05:08, Dorm Eight <dor...@ya...> ha scritto: >>> hi, everybody! >>> >>> when I run my script, why there is no figure show up? I downloaded the >>> demos >>> from matplotlib gallery and it didn't work either. >>>>>> >>>>>> x=np.arange(100) >>>>>> y=x**2+3*x-1 >>>>>> pl.plot(x,y) >>> [<matplotlib.lines.Line2D object at 0x2581050>] >>>>>> pl.show() >>>>>> >>> there is no error, no figure pop-up! >>> >>> Thank you for any answer! >>> >> >> Hi Dorm >> If you can send more info about the operating system and matplotlib >> version, it's easier to help you >> (for the latter do >> import matplotlib >> print matplotlib.__version__ >> ) >> >> Cheers, >> Francesco >> >>> >>> >>> ------------------------------------------------------------------------------ >>> This SF email is sponsosred by: >>> Try Windows Azure free for 90 days Click Here >>> http://p.sf.net/sfu/sfd2d-msazure >>> _______________________________________________ >>> Matplotlib-users mailing list >>> Mat...@li... >>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users >>> >> >>Il 30 marzo 2012 13:23, Dorm Eight <dor...@ya...> ha scritto: > > Dear Dorm, > > please reply to all the list. >> My system is Fedora 3.3.0-4.fc16.x86_64, after I recently updated the >> system with 'yum update', the problem appeared. >> the Matplotlib version is 1.10. I have no idea at all now. > > I've tested your small example on python 2.6, matplotlib 1.0.0 with > MacOSX backend and on Kubuntu 11.04, python 2.7, matplotlib 1.1, with > TkAgg and Qt4Agg backends and the small code works for me. In all > cases I have set "plt.ion()" > > If you save the figure instead of showing, does it work? > Which backend are you using: the name is stored in > "matplotlib.backends.backend" > > Cheers > Francesco > > > > ------------------------------------------------------------------------------ > This SF email is sponsosred by: > Try Windows Azure free for 90 days Click Here > http://p.sf.net/sfu/sfd2d-msazure > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > |
From: Arek K. <ake...@ya...> - 2012-05-24 04:03:21
|
http://paulaslominska.cba.pl/lnjysgcpta/395506.html |
From: Arek K. <ake...@ya...> - 2012-06-09 03:21:30
|
http://maison-cantury.com/rpsleyubzq/514834.html |