Re: [Matplotlib-users] cannot import animation module
now I updated to 1.1.0, it works. thanks to all. chao 2011/11/23 Chao YUE chaoyue...@gmail.com Dear all, I am using matplotlib 0.99.3 (I think it's the default version when I use sudo apt-get install under ubuntu 11.04), but I don't have matplotlib.animation module. I think I need to reinstall it? thanks, chao -- *** Chao YUE Laboratoire des Sciences du Climat et de l'Environnement (LSCE-IPSL) UMR 1572 CEA-CNRS-UVSQ Batiment 712 - Pe 119 91191 GIF Sur YVETTE Cedex Tel: (33) 01 69 08 29 02; Fax:01.69.08.77.16 -- *** Chao YUE Laboratoire des Sciences du Climat et de l'Environnement (LSCE-IPSL) UMR 1572 CEA-CNRS-UVSQ Batiment 712 - Pe 119 91191 GIF Sur YVETTE Cedex Tel: (33) 01 69 08 29 02; Fax:01.69.08.77.16 -- All the data continuously generated in your IT infrastructure contains a definitive record of customers, application performance, security threats, fraudulent activity, and more. Splunk takes this data and makes sense of it. IT sense. And common sense. http://p.sf.net/sfu/splunk-novd2d___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] ft2font error while building with python3 support
Dear list, I have been trying to build matplotlib with python2 *and* python3 support. I am using Gentoo and a custom ebuild which can be found on gnlay overlay[1]. However, I had a build error while trying to compile 'src/ft2font.cpp' (see the log attached[2]). I was wondering weather there are any preparation steps involved to make this file compile, which might be different from the python2 version? I found the 'CXX/Extensions.hxx' and the problem might be that it is not loaded due to some reason? I am afraid that this might have something to do with the my ebuild, so could someone tell me more about how the building process works? Or how much it is different for python3 compared with python2? Thanks a lot, Ignas [1] - https://github.com/gns-ank/gnlay/tree/ [2] - http://pastebin.com/m9Lf3s0J -- Q: Because it reverses the logical flow of conversation. A: Why is putting a reply at the top of the message frowned upon? -- All the data continuously generated in your IT infrastructure contains a definitive record of customers, application performance, security threats, fraudulent activity, and more. Splunk takes this data and makes sense of it. IT sense. And common sense. http://p.sf.net/sfu/splunk-novd2d ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] Performance after benchmarking seems low
Dear MatPlotLib users, I am having trouble with the performance of matplotlib. For data analysis, I want to be able to place multiple graphs on screen, with multiple lines, each consisting of 16000 data points. I have benchmarked my solution, but it did not perform too well. For example: 6 graphs with 6 lines each, takes 12.5 seconds. This graph indicates my benchmark: http://img59.imageshack.us/img59/7613/graphpython.gif I also noticed that memory usage during the benchmark rises to too high levels. I have, during a different experiment, plotted 36 graphs with 1 line. This is about 9MB of total (x,y) data alltogether, but execution of the benchmark spikes 1GB of memory usage. My question: - Is this performance of matplotlib to be expected? - Can it be improved in any way? Thank you very much in advance, Anne The code I use for the benchmark for nr_of_graphs in range (1,7): for nr_of_lines in range(1,7): root = Tk.Tk() #nr_of_lines = int(argv[0]) #nr_of_graphs = int(argv[1]) m = myLinMultiPlot() m.drawxy(test {0}L on {1}G.format(nr_of_lines, nr_of_graphs), nr_of_graphs, nr_of_lines) root.mainloop() The code that plots the actual lines class myLinMultiPlot(Tk.Toplevel): def drawxy(self, test_name, plots, lines): pointsize = 16000 figure = Figure(figsize=(2,1), dpi=100) storage = [] axes_arr = [] for p in range(0,plots): for li in range(0,lines): shift = li * 100 axes = figure.add_subplot(plots,1,1 + p) axes_arr.append(axes) xarr = xrange(0,16000) yarr = [] for x in xarr: yarr.append(math.sqrt(x + shift)) strg = [xarr,yarr] storage.append(strg) startdraw = timeit.default_timer() for a in axes_arr: for l in storage: a.plot(l[0],l[1]) canvas = FigureCanvasTkAgg(figure, master = self) canvas._tkcanvas.pack(side=Tk.TOP, fill=Tk.BOTH, expand=1) canvas.show() canvas.blit() //This is the time depicted in my benchmark! durationdraw = timeit.default_timer() - startdraw -- All the data continuously generated in your IT infrastructure contains a definitive record of customers, application performance, security threats, fraudulent activity, and more. Splunk takes this data and makes sense of it. IT sense. And common sense. http://p.sf.net/sfu/splunk-novd2d ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] Fwd: Bug or feature: bbox of maps
The original message with attachment didn't go thru... Begin forwarded message: *From:* Arlindo da Silva dasi...@alum.mit.edu *To:* matplotlib-users matplotlib-users@lists.sourceforge.net *Subject:* *Bug or feature: bbox of maps* Hi, (A similar issue was reported back in 7/4/11 without a definite solution, so I am reposting with some additional diagnostics. ) Up to Matplotlib 0.99 (EPD 6.3) the code snippet below produced a plot with an aligned colorbar as in the attached correct.png plot: fig = plt.figure() ax = fig.add_axes(...) m = Basemap(..., ax=ax, ...) im = m.imshow(...) # show() # setup colorbar axes and draw colorbar bbox = ax.get_position() l,b,w,h = bbox.bounds cax = fig.add_axes([l+w+0.05, b, 0.05, h],frameon=False) fig.colorbar(im, cax=cax) Starting with Matplotlib 1.0.0 this no longer works. The ax.get_position() no longer returns the bounding box of the plot but the bbox of the window, see the attached wrong.png attached. Some odd behavior: 1) I can get the code above to work correctly under MPL 1.0 if I uncomment the show() line above. (This is not an acceptable solution because show() blocks if not in interactive mode). 2) Under ipython, if after plotting I print gca().get_position().bounds I get the correct bounding box, even when I just got the wrong colorbar positioning. 3) If I run the code above twice in a row (without creating a new fig), the second time around the correct bounding box is returned. Can someone explain to me what is going on? Is this one of those arcane features of matplotlib transform caching? It appears that show() is flushing some type of buffer. Is there any way of accomplishing this without actually calling show()? Thank you, Arlindo -- Arlindo da Silva dasi...@alum.mit.edu correct.png wrong.png -- All the data continuously generated in your IT infrastructure contains a definitive record of customers, application performance, security threats, fraudulent activity, and more. Splunk takes this data and makes sense of it. IT sense. And common sense. http://p.sf.net/sfu/splunk-novd2d___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] Page not available on server
Dear mailinglist readers, I have a problem by accessing the content http://matplotlib.sourceforge.net/examples/pylab_examples/demo_tight_layout_00.html whereas other contents, like for example http://matplotlib.sourceforge.net/examples/pylab_examples/demo_ribbon_box.html are well accessible. Is there a reason, why this content is not available? I would be glad, if you might help. Best regards, Sven Ahrens The error message: An error has been encountered in accessing this page. 1. *Server:* matplotlib.sourceforge.net 2. *URL path:* /examples/pylab_examples/demo_tight_layout_00.html 3. *Error notes:* NONE 4. *Error type:* 404 5. *Request method:* GET 6. *Request query string:* NONE 7. *Time:* 2011-11-23 12:45:59 UTC (1322052359) -- All the data continuously generated in your IT infrastructure contains a definitive record of customers, application performance, security threats, fraudulent activity, and more. Splunk takes this data and makes sense of it. IT sense. And common sense. http://p.sf.net/sfu/splunk-novd2d___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Clearing the axis in a figure embedded in Tkinter
johnmcpot wrote: Hi JD, I'm having exactly the same problem. Did you find a solution? Hello I have exactly the same problem while embedding matplotlib in PyQT4 on OS X with backend_qt4agg. I think I have found a solution : do you use frameon=False in this line : fig = Figure(figsize=(width, height), dpi=dpi, frameon=False) I did, and went back to True ... and no more axes update problems !!! You can check this behavior in this tutorial : add the frameon=False, and the axes are no more updating correctly (on OS X, didn't test it on Linux). http://matplotlib.sourceforge.net/examples/user_interfaces/embedding_in_qt4.html Perhaps this is normal. If not I think I'll submit a bug report in matplotlib's bugtracker. Michka -- View this message in context: http://old.nabble.com/Clearing-the-axis-in-a-figure-embedded-in-Tkinter-tp32054762p32875027.html Sent from the matplotlib - users mailing list archive at Nabble.com. -- All the data continuously generated in your IT infrastructure contains a definitive record of customers, application performance, security threats, fraudulent activity, and more. Splunk takes this data and makes sense of it. IT sense. And common sense. http://p.sf.net/sfu/splunk-novd2d ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] Basemap drawparallels failed issue
Hi, I am a new user of matplotlib Basemap. I tried to draw the latitude with interval 0.1 degree using drawparallels, but failed. I wonder if the drawparallels can draw latitude lines with small interval instead of integer values. (drawmeridian can work with small interval 0.1). Does anyone have any idea to fix this issue? Thanks! Dave #here is a test program to test the drawparallels function #testbasemap.py from mpl_toolkits.basemap import Basemap import matplotlib.pyplot as plt import numpy as np import math latmin=36.803200 latmax=37.306640 lonmin=-76.396026 lonmax=-75.602331 latmin1=math.floor(latmin) latmax1=math.ceil(latmax) lonmin1=math.floor(lonmin) lonmax1=math.ceil(lonmax) m=Basemap(projection='merc',resolution='h',llcrnrlat=latmin,urcrnrlat=latmax,llcrnrlon=lonmin,urcrnrlon=lonmax) m.drawcoastlines() m.drawmapboundary(fill_color='aqua') m.fillcontinents(color='coral',lake_color='aqua') meridians = np.arange(lonmin1,lonmax1,0.1) m.drawmeridians(meridians,labels=[1,1,0,1],fmt='%5.2f') parallels=np.arange(latmin,latmax,0.1) m.drawparallels(parallels,labels=[1,1,0,1],fmt='%5.2f') plt.savefig('test.png') # The error message is as follows: Traceback (most recent call last): File testbasemap.py, line 25, in module m.drawparallels(parallels,labels=[1,1,0,1],fmt='%5.2f') File /usr/local/lib/python2.7/site-packages/mpl_toolkits/basemap/__init__.py, line 2067, in drawparallels if t is not None: linecolls[int(lat)][1].append(t) KeyError: 36 -- All the data continuously generated in your IT infrastructure contains a definitive record of customers, application performance, security threats, fraudulent activity, and more. Splunk takes this data and makes sense of it. IT sense. And common sense. http://p.sf.net/sfu/splunk-novd2d___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] Bug or feature: bbox of maps
The original message with attachments are still being held because of file size, so I am reposting here without the attachments... -- Forwarded message -- From: Arlindo da Silva dasi...@alum.mit.edu Date: Mon, Nov 21, 2011 at 10:45 PM Subject: Bug or feature: bbox of maps To: Matplotlib-users@lists.sourceforge.net Cc: Jeff Whitaker jeffrey.s.whita...@noaa.gov Hi, (A similar issue was reported back in 7/4/11 without a definite solution, so I am reposting with some additional diagnostics. ) Up to Matplotlib 0.99 (EPD 6.3) the code snippet below produced a plot with an aligned colorbar as in the attached correct.png plot: fig = plt.figure() ax = fig.add_axes(...) m = Basemap(..., ax=ax, ...) im = m.imshow(...) # show() # setup colorbar axes and draw colorbar bbox = ax.get_position() l,b,w,h = bbox.bounds cax = fig.add_axes([l+w+0.05, b, 0.05, h],frameon=False) fig.colorbar(im, cax=cax) Starting with Matplotlib 1.0.0 this no longer works. The ax.get_position() no longer returns the bounding box of the plot but the bbox of the window, see the attached wrong.png attached. Some odd behavior: 1) I can get the code above to work correctly under MPL 1.0 if I uncomment the show() line above. (This is not an acceptable solution because show() blocks if not in interactive mode). 2) Under ipython, if after plotting I print gca().get_position().bounds I get the correct bounding box, even when I just got the wrong colorbar positioning. 3) If I run the code above twice in a row (without creating a new fig), the second time around the correct bounding box is returned. Can someone explain to me what is going on? Is this one of those arcane features of matplotlib transform caching? It appears that show() is flushing some type of buffer. Is there any way of accomplishing this without actually calling show()? Thank you, Arlindo -- Arlindo da Silva dasi...@alum.mit.edu -- All the data continuously generated in your IT infrastructure contains a definitive record of customers, application performance, security threats, fraudulent activity, and more. Splunk takes this data and makes sense of it. IT sense. And common sense. http://p.sf.net/sfu/splunk-novd2d___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Removing ticks and frame (imshow)
Hello, I am sending my email again, with no attachment this time. Thanks for reading! Marianne On Thu, Nov 24, 2011 at 3:48 PM, Marianne C. mariyann...@gmail.com wrote: Hi all, My name is Marianne, I am a beginner user of matplotlib. I am using imshow in pyplot. I am desperate to get rid of the ticks on both x and y axes (see attached picture). I do not need the black box around the data either. Should I use imshow in axes.Axes instead, to be able to call set_ticks_position(none)? Thank you for your help, Marianne Here is my script so far: import numpy from matplotlib import pyplot q=numpy.loadtxt('field.txt') myfield = pyplot.imshow(q,aspect=1) myfield.set_clim(vmin=0, vmax=0.6) pyplot.colorbar() pyplot.savefig('field_1.eps') -- All the data continuously generated in your IT infrastructure contains a definitive record of customers, application performance, security threats, fraudulent activity, and more. Splunk takes this data and makes sense of it. IT sense. And common sense. http://p.sf.net/sfu/splunk-novd2d___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Page not available on server
On Nov 23, 2011, at 7:58 , Sven Ahrens wrote: Dear mailinglist readers, I have a problem by accessing the content http://matplotlib.sourceforge.net/examples/pylab_examples/demo_tight_layout_00.html This one works: http://matplotlib.sourceforge.net/examples/pylab_examples/demo_tight_layout.html I'm wondering where the _00 came from in your link? -Dale whereas other contents, like for example http://matplotlib.sourceforge.net/examples/pylab_examples/demo_ribbon_box.html are well accessible. Is there a reason, why this content is not available? I would be glad, if you might help. Best regards, Sven Ahrens The error message: An error has been encountered in accessing this page. 1. Server: matplotlib.sourceforge.net 2. URL path: /examples/pylab_examples/demo_tight_layout_00.html 3. Error notes: NONE 4. Error type: 404 5. Request method: GET 6. Request query string: NONE 7. Time: 2011-11-23 12:45:59 UTC (1322052359) -- All the data continuously generated in your IT infrastructure contains a definitive record of customers, application performance, security threats, fraudulent activity, and more. Splunk takes this data and makes sense of it. IT sense. And common sense. http://p.sf.net/sfu/splunk-novd2d___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users -- All the data continuously generated in your IT infrastructure contains a definitive record of customers, application performance, security threats, fraudulent activity, and more. Splunk takes this data and makes sense of it. IT sense. And common sense. http://p.sf.net/sfu/splunk-novd2d ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] markeredgecolor (mec) in the plot function not working?
Dear all, I use matplotlib 1.1.0. import matplotlib.pyplot as plt plt.plot(np.arange(10),'ro',mec='none') when I use plt.show(), there is only blank frame with axis not no points. but plt.plot(np.arange(10),'ro') will give good plot with read filled circles and black edges. plt.scatter(np.arange(10),np.arange(10),c='r',marker='o',edgecolor='none') is working fine. but I really think plt.plot is a very good and easy function if you don't make complex scatter points. and the circles look much nicer than that produced by plt.scatter (thought I don't know why as they use the same symble) does anyone else have found the same ? thanks to all, Chao -- *** Chao YUE Laboratoire des Sciences du Climat et de l'Environnement (LSCE-IPSL) UMR 1572 CEA-CNRS-UVSQ Batiment 712 - Pe 119 91191 GIF Sur YVETTE Cedex Tel: (33) 01 69 08 29 02; Fax:01.69.08.77.16 -- All the data continuously generated in your IT infrastructure contains a definitive record of customers, application performance, security threats, fraudulent activity, and more. Splunk takes this data and makes sense of it. IT sense. And common sense. http://p.sf.net/sfu/splunk-novd2d___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] markeredgecolor (mec) in the plot function not working?
On 11/24/2011 07:04 AM, Chao YUE wrote: Dear all, I use matplotlib 1.1.0. import matplotlib.pyplot as plt plt.plot(np.arange(10),'ro',mec='none') when I use plt.show(), there is only blank frame with axis not no points. but plt.plot(np.arange(10),'ro') will give good plot with read filled circles and black edges. plt.scatter(np.arange(10),np.arange(10),c='r',marker='o',edgecolor='none') is working fine. but I really think plt.plot is a very good and easy function if you don't make complex scatter points. and the circles look much nicer than that produced by plt.scatter (thought I don't know why as they use the same symble) does anyone else have found the same ? Confirmed with git master. This is a major bug. Eric thanks to all, Chao -- *** Chao YUE Laboratoire des Sciences du Climat et de l'Environnement (LSCE-IPSL) UMR 1572 CEA-CNRS-UVSQ Batiment 712 - Pe 119 91191 GIF Sur YVETTE Cedex Tel: (33) 01 69 08 29 02; Fax:01.69.08.77.16 -- All the data continuously generated in your IT infrastructure contains a definitive record of customers, application performance, security threats, fraudulent activity, and more. Splunk takes this data and makes sense of it. IT sense. And common sense. http://p.sf.net/sfu/splunk-novd2d ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users -- All the data continuously generated in your IT infrastructure contains a definitive record of customers, application performance, security threats, fraudulent activity, and more. Splunk takes this data and makes sense of it. IT sense. And common sense. http://p.sf.net/sfu/splunk-novd2d ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] markeredgecolor (mec) in the plot function not working?
On Thursday, November 24, 2011, Eric Firing efir...@hawaii.edu wrote: On 11/24/2011 07:04 AM, Chao YUE wrote: Dear all, I use matplotlib 1.1.0. import matplotlib.pyplot as plt plt.plot(np.arange(10),'ro',mec='none') when I use plt.show(), there is only blank frame with axis not no points. but plt.plot(np.arange(10),'ro') will give good plot with read filled circles and black edges. plt.scatter(np.arange(10),np.arange(10),c='r',marker='o',edgecolor='none') is working fine. but I really think plt.plot is a very good and easy function if you don't make complex scatter points. and the circles look much nicer than that produced by plt.scatter (thought I don't know why as they use the same symble) does anyone else have found the same ? Confirmed with git master. This is a major bug. Eric Hmmm, the bug that I once reported before about the errorbar plots having black edges seems to be back for me as well... I wonder if this is related? Ben Root -- All the data continuously generated in your IT infrastructure contains a definitive record of customers, application performance, security threats, fraudulent activity, and more. Splunk takes this data and makes sense of it. IT sense. And common sense. http://p.sf.net/sfu/splunk-novd2d___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] ft2font error while building with python3 support
2011/11/24 Ignas Anikevicius anikevic...@gmail.com: Dear list, I have been trying to build matplotlib with python2 *and* python3 support. I am using Gentoo and a custom ebuild which can be found on gnlay overlay[1]. However, I had a build error while trying to compile 'src/ft2font.cpp' (see the log attached[2]). I was wondering weather there are any preparation steps involved to make this file compile, which might be different from the python2 version? I found the 'CXX/Extensions.hxx' and the problem might be that it is not loaded due to some reason? The log looks ok, although the lines are remarkably short, compared to building on a Mac. Did you modify CFLAGS or CC? The ``-I.`` should just do the trick, at least. So I wonder if, for some reason, maybe your CWD is no longer the matplotlib root directory. I could imagine that it has either sth to do with your gentoo ebuild or with Python3k's distutils? Just a rough guess. I am afraid that this might have something to do with the my ebuild, so could someone tell me more about how the building process works? Or how much it is different for python3 compared with python2? For py2k it's just pythonX.Y setup.py build and then pythonX.Y setup.py install, if you want to install. ft2font.so is built during the build step. I believe it's the same for py3k. I actually don't know if it'll work if you say e.g. pythonX.Y matplotlib.git/setup.py build .. might be an mistake in either distutils or the matplotlib build engine which I don't know at all (if there are additions from the mpl side to building at all.). If I'm right a ``cd ./matplotlib`` should do the trick. :-) I believe it's rare to invoke the setup.py from another directory than that where it resides in. I don't know how to build ebuild scripts. I'm just a user of them. cu, Friedrich -- All the data continuously generated in your IT infrastructure contains a definitive record of customers, application performance, security threats, fraudulent activity, and more. Splunk takes this data and makes sense of it. IT sense. And common sense. http://p.sf.net/sfu/splunk-novd2d ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Removing ticks and frame (imshow)
2011/11/24 Marianne C. mariyann...@gmail.com: On Thu, Nov 24, 2011 at 3:48 PM, Marianne C. mariyann...@gmail.com wrote: Hi all, My name is Marianne, I am a beginner user of matplotlib. I am using imshow in pyplot. I am desperate to get rid of the ticks on both x and y axes (see attached picture). I do not need the black box around the data either. Should The cleanes solution, is to use the NullLocator. I'm not a user of pylab Matlabish interface, but from what I know:: gca().xaxis.set_major_locator(matplotlib.ticker.NullLocator()) gca().yaxis.set_major_locator(matplotlib.ticker.NullLocator()) after importing matplotlib.ticker of course. Should work, but didn't try. http://matplotlib.sourceforge.net/api/ticker_api.html http://matplotlib.sourceforge.net/api/axis_api.html#matplotlib.axis.Axis.set_major_locator http://matplotlib.sourceforge.net/api/pyplot_api.html#matplotlib.pyplot.gca You are free to use the OO interface which yields the same. Notice that upon clear() the locators are most probably lost. gca() get the current Axes object. xaxis and yaxis are its Axis attributes. The locator defines where to set ticks. If it's the NoneLocator this is rather a stub to saying don't place ticks ever. But it's more clean than to force them directly to the empty list because it'll survive at least limit changes. I don't know if the manual method survives that. Otherwise it's also a matter of taste. From the docs I do not see that you could hand over the locators directly to the imshow call http://matplotlib.sourceforge.net/api/pyplot_api.html#matplotlib.pyplot.imshow. For the frame, if it really matters, you can set the ``edgecolor`` probably to 'none', literally with the quotes. There's a Figure object created when you create the plot, you can get it via gcf(). Try to figure out how to set its egdecolor either on construction or later. If you are stuck tell. Make sure to reply to all. cu, Friedrich -- All the data continuously generated in your IT infrastructure contains a definitive record of customers, application performance, security threats, fraudulent activity, and more. Splunk takes this data and makes sense of it. IT sense. And common sense. http://p.sf.net/sfu/splunk-novd2d ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] markeredgecolor (mec) in the plot function not working?
On 11/24/2011 08:13 AM, Benjamin Root wrote: On Thursday, November 24, 2011, Eric Firing efir...@hawaii.edu mailto:efir...@hawaii.edu wrote: On 11/24/2011 07:04 AM, Chao YUE wrote: Dear all, I use matplotlib 1.1.0. import matplotlib.pyplot as plt plt.plot(np.arange(10),'ro',mec='none') when I use plt.show(), there is only blank frame with axis not no points. but plt.plot(np.arange(10),'ro') will give good plot with read filled circles and black edges. plt.scatter(np.arange(10),np.arange(10),c='r',marker='o',edgecolor='none') is working fine. but I really think plt.plot is a very good and easy function if you don't make complex scatter points. and the circles look much nicer than that produced by plt.scatter (thought I don't know why as they use the same symble) does anyone else have found the same ? Confirmed with git master. This is a major bug. Eric Hmmm, the bug that I once reported before about the errorbar plots having black edges seems to be back for me as well... I wonder if this is related? Ben Root Looks like an alpha-handling bug. I think the mec='none' is setting edgecolor alpha to zero, which is setting the gc alpha to zero, which is clobbering the rgbFace. Eric -- All the data continuously generated in your IT infrastructure contains a definitive record of customers, application performance, security threats, fraudulent activity, and more. Splunk takes this data and makes sense of it. IT sense. And common sense. http://p.sf.net/sfu/splunk-novd2d ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] data free margin
I don't know if this will work for you, but in your situation I would probably just make another axis for the data with no y value. Like, a short squat axis directly below the main axis. -Jeff Thanks. That crossed my mind, but I never tried it yet. I thought it would take up too much vertical room in the display to have another axis just for what would likely be 1-2 data points worth of y-less data. I'd really want to not display the x axis for that one and just align it with the x axis of the main plot, but then the data points would be *below* the axis, and that would seem visually odd. I'll play with it in a sample app and see if I can get it to look good this way. Che -- All the data continuously generated in your IT infrastructure contains a definitive record of customers, application performance, security threats, fraudulent activity, and more. Splunk takes this data and makes sense of it. IT sense. And common sense. http://p.sf.net/sfu/splunk-novd2d___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] markeredgecolor (mec) in the plot function not working?
On 11/24/2011 07:04 AM, Chao YUE wrote: Dear all, I use matplotlib 1.1.0. import matplotlib.pyplot as plt plt.plot(np.arange(10),'ro',mec='none') when I use plt.show(), there is only blank frame with axis not no points. but plt.plot(np.arange(10),'ro') will give good plot with read filled circles and black edges. plt.scatter(np.arange(10),np.arange(10),c='r',marker='o',edgecolor='none') is working fine. but I really think plt.plot is a very good and easy function if you don't make complex scatter points. and the circles look much nicer than that produced by plt.scatter (thought I don't know why as they use the same symble) does anyone else have found the same ? See https://github.com/matplotlib/matplotlib/pull/598 for a proposed quick fix. Eric thanks to all, Chao -- *** Chao YUE Laboratoire des Sciences du Climat et de l'Environnement (LSCE-IPSL) UMR 1572 CEA-CNRS-UVSQ Batiment 712 - Pe 119 91191 GIF Sur YVETTE Cedex Tel: (33) 01 69 08 29 02; Fax:01.69.08.77.16 -- All the data continuously generated in your IT infrastructure contains a definitive record of customers, application performance, security threats, fraudulent activity, and more. Splunk takes this data and makes sense of it. IT sense. And common sense. http://p.sf.net/sfu/splunk-novd2d ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users -- All the data continuously generated in your IT infrastructure contains a definitive record of customers, application performance, security threats, fraudulent activity, and more. Splunk takes this data and makes sense of it. IT sense. And common sense. http://p.sf.net/sfu/splunk-novd2d ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] ft2font error while building with python3 support
Hi, Thanks for your reply. On 24/11/11 18:54, Friedrich Romstedt wrote: ... building on a Mac. Did you modify CFLAGS or CC? There was in the ebuild some additional flags like fno-strict-aliasing, but nothing change by removing the aditional flags. The strange thing is that it still builds for 2.7, but not for 3.2. ... ... I actually don't know if it'll work if you say e.g. pythonX.Y matplotlib.git/setup.py build .. might be an mistake in either distutils or the matplotlib build engine which I don't know at all (if there are additions from the mpl side to building at all.). If I'm right a ``cd ./matplotlib`` should do the trick. :-) It did not help :(... I have probably found out the cause in the difference. The relevant part of the log for the Python 2.7 build: --- running build_ext building 'matplotlib.ft2font' extension creating build-2.7/temp.linux-x86_64-2.7 creating build-2.7/temp.linux-x86_64-2.7/src creating build-2.7/temp.linux-x86_64-2.7/CXX x86_64-pc-linux-gnu-g++ -pthread -march=native -O2 -fno-strict-aliasing -fPIC -DPY_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API -DPYCXX_ISO_CPP_LIB=1 -I/usr/local/include -I/usr/include -I/usr/lib64/python2.7/site-packages/numpy/core/include -I/usr/include/freetype2 -I/usr/include -I. -I/usr/include/python2.7 -c src/ft2font.cpp -o build-2.7/temp.linux-x86_64-2.7/src/ft2font.o --- And know for the Python 3.2 build: --- running build_ext building 'matplotlib.ft2font' extension creating build-3.2/temp.linux-x86_64-3.2 creating build-3.2/temp.linux-x86_64-3.2/src --- !missing line !! --- x86_64-pc-linux-gnu-g++ -pthread -march=native -O2 -fPIC -DPY_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API -DPYCXX_ISO_CPP_LIB=1 -DPYCXX_PYTHON_2TO3=1 -I/usr/local/include -I/usr/include -I/usr/lib64/python3.2/site-packages/numpy/core/include -I/usr/include/freetype2 -I/usr/include -I. -I/usr/include/python3.2 -c src/ft2font.cpp -o build-3.2/temp.linux-x86_64-3.2/src/ft2font.o --- Note that there is a missing line for the 3.2 build as it does not create the build-3.2/temp.linux-x86_64-3.2/CXX directory. Hence, my question is whether this behaviour is due to some code in the MPL building system, or should I research my ebuild more? Cheers, Ignas A. -- Q: Because it reverses the logical flow of conversation. A: Why is putting a reply at the top of the message frowned upon? -- All the data continuously generated in your IT infrastructure contains a definitive record of customers, application performance, security threats, fraudulent activity, and more. Splunk takes this data and makes sense of it. IT sense. And common sense. http://p.sf.net/sfu/splunk-novd2d___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] ft2font error while building with python3 support
2011/11/24 Ignas Anikevicius anikevic...@gmail.com: I have probably found out the cause in the difference. The relevant part of the log for the Python 2.7 build: --- running build_ext building 'matplotlib.ft2font' extension creating build-2.7/temp.linux-x86_64-2.7 creating build-2.7/temp.linux-x86_64-2.7/src creating build-2.7/temp.linux-x86_64-2.7/CXX x86_64-pc-linux-gnu-g++ -pthread -march=native -O2 -fno-strict-aliasing -fPIC -DPY_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API -DPYCXX_ISO_CPP_LIB=1 -I/usr/local/include -I/usr/include -I/usr/lib64/python2.7/site-packages/numpy/core/include -I/usr/include/freetype2 -I/usr/include -I. -I/usr/include/python2.7 -c src/ft2font.cpp -o build-2.7/temp.linux-x86_64-2.7/src/ft2font.o --- And know for the Python 3.2 build: --- running build_ext building 'matplotlib.ft2font' extension creating build-3.2/temp.linux-x86_64-3.2 creating build-3.2/temp.linux-x86_64-3.2/src --- !missing line !! --- x86_64-pc-linux-gnu-g++ -pthread -march=native -O2 -fPIC -DPY_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API -DPYCXX_ISO_CPP_LIB=1 -DPYCXX_PYTHON_2TO3=1 -I/usr/local/include -I/usr/include -I/usr/lib64/python3.2/site-packages/numpy/core/include -I/usr/include/freetype2 -I/usr/include -I. -I/usr/include/python3.2 -c src/ft2font.cpp -o build-3.2/temp.linux-x86_64-3.2/src/ft2font.o --- Note that there is a missing line for the 3.2 build as it does not create the build-3.2/temp.linux-x86_64-3.2/CXX directory. Hence, my question is whether this behaviour is due to some code in the MPL building system, or should I research my ebuild more? Good research! Unfortunately, this beyond my level. Keep us posted. I would suspect some bug in distutils, but this can be completely off. Normally the obvious guesses are rather wrong in such cases as this. How does the ebuild work? Does it invoke setup.py? If yes, maybe matplotlib installs the CXX dir s.t. it does not work for py3k? Maybe just the attribute matplotlib is monkeypatching. if at all, changed its name? All this ideas do not claim that they explain it, they just are meant to help you being let to the real cause of the malfunction. Good luck, and a lot of inspiration Friedrich P.S.: Luck – has nothing to do with it. Faith, and hard work, girl, 'cause I'll be damned if ... [Final Fantasy] -- All the data continuously generated in your IT infrastructure contains a definitive record of customers, application performance, security threats, fraudulent activity, and more. Splunk takes this data and makes sense of it. IT sense. And common sense. http://p.sf.net/sfu/splunk-novd2d ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] ft2font error while building with python3 support
Hi all, On 24/11/11 23:02, Friedrich Romstedt wrote: How does the ebuild work? Does it invoke setup.py? If yes, maybe matplotlib installs the CXX dir s.t. it does not work for py3k? Sorry for making the noise, I found the problem, actually it was my ebuild which removed the CXX folder after the 2.7 python succeeded to build. I do not know the reasons behind this though. No I do not have the error there, but I have elsewhere. :) Here it is: -- x86_64-pc-linux-gnu-g++ -pthread -march=native -O2 -fno-strict-aliasing -fPIC -DPY_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API -DPYCXX_ISO_CPP_LIB=1 -DPYCXX_PYTHON_2TO3=1 -I/usr/local/include -I/usr/include -I/usr/include -I. -I/usr/lib64/python3.2/site-packages/numpy/core/include -Isrc -Iagg24/include -I. -I/usr/lib64/python3.2/site-packages/numpy/core/include -I/usr/include/freetype2 -I/usr/include -I. -I/usr/include -I. -I/usr/include/pygtk-2.0 -I/usr/include/gtk-2.0 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/lib64/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/pango-1.0 -I/usr/include/pixman-1 -I/usr/include/libpng15 -I/usr/include/libdrm -I/usr/lib64/python3.2/site-packages/numpy/core/include -I/usr/include/python3.2 -c src/_gtkagg.cpp -o build-3.2/temp.linux-x86_64-3.2/src/_gtkagg.o src/_gtkagg.cpp: In function ‘PyObject* init_gtkagg()’: src/_gtkagg.cpp:137:5: error: return-statement with no value, in function returning ‘PyObject*’ src/_gtkagg.cpp:138:5: error: ‘PyCObject_Check’ was not declared in this scope src/_gtkagg.cpp:138:5: error: ‘PyCObject_AsVoidPtr’ was not declared in this scope src/_gtkagg.cpp:138:5: error: return-statement with no value, in function returning ‘PyObject*’ src/_gtkagg.cpp:138:5: error: return-statement with no value, in function returning ‘PyObject*’ -- If anybody could explain why I am getting the above. Is it because of a wrong version of PyGobject (2.28.6) or PyGtk (2.24.0) ? Or is it because the GTK Backend is not yet ported to Python 3? Also, could anybody tell me what differences are there in dependencies between Py2 and Py3 versions of MPL? Cheers, Ignas A. -- Q: Because it reverses the logical flow of conversation. A: Why is putting a reply at the top of the message frowned upon? -- All the data continuously generated in your IT infrastructure contains a definitive record of customers, application performance, security threats, fraudulent activity, and more. Splunk takes this data and makes sense of it. IT sense. And common sense. http://p.sf.net/sfu/splunk-novd2d___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users