Re: [Matplotlib-users] Need some help adjusting placement of colorbar in basemap-derived graphic
Hi Jeff,
Thanks very much for this bit of code that you sent me. I got some graph
paper out and plotted all of the axes in your code and it finally all made
sense.
Roger
--
On Fri, Dec 12, 2008 at 3:50 PM, Roger André wrote:
> Thanks Jeff,
>
> I'll study your code and will see if I can adapt it for my use.
>
> Great tool also,
>
> Roger
> --
>
>
> On Fri, Dec 12, 2008 at 3:20 PM, Jeff Whitaker wrote:
>
>> Roger André wrote:
>>
>>> Hi All,
>>>
>>> I'm very new to Matplotlib and am having some trouble getting a colorbar
>>> to be positioned and sized I want it to. A big part of the problem is that
>>> I have adapted several examples from the Cookbook and Gallery, just to see
>>> if I could roughly approximate what I want to see, and now am having trouble
>>> integrating the different pieces. Specifically, I can't seem to resolve
>>> when to use add_subplot vs. add_axes. Below are 2 examples of code. The
>>> first one shows correct layout of a data figure and a separate colorbar
>>> below it. The colorbar is the correct size, and is located in the right
>>> spot. The second example has the correct data mapped in it using the
>>> basemap module, but I cannot get the colorbar to move up closer to the
>>> figure, or to shrink it. Could someone advise me on this? I've looked at
>>> the "Artist tutorial", and although it is very well written, I'm still not
>>> sure how to get this done .
>>>
>>> Thanks in advance,
>>>
>>> Roger
>>>
>>
>> Roger: I usually explicity two separate axes instances, one for the plot
>> and one for the colorbar. The location of the axes always takes a bit of
>> tweaking to get right. Here's an example:
>>
>> from mpl_toolkits.basemap import Basemap
>> import matplotlib.pyplot as plt
>> import numpy as np
>> # create figure instance.
>> fig = plt.figure(figsize=(8,8))
>> # create an axes instance, leaving room for colorbars on right and bottom.
>> ax = fig.add_axes([0.05,0.15,0.8,0.8]) # color on bottom
>> # set up orthographic map projection with
>> # perspective of satellite looking down at 50N, 100W.
>> # use low resolution coastlines.
>> map = Basemap(projection='ortho',lat_0=50,lon_0=-100,resolution='c')
>> # draw coastlines, country boundaries, fill continents.
>> map.drawcoastlines()
>> # draw the edge of the map projection region (the projection limb)
>> map.drawmapboundary()
>> # draw lat/lon grid lines every 30 degrees.
>> map.drawmeridians(np.arange(0,360,30))
>> map.drawparallels(np.arange(-90,90,30))
>> # make up some data on a regular lat/lon grid.
>> nlats = 73; nlons = 145; delta = 2.*np.pi/(nlons-1)
>> lats = (0.5*np.pi-delta*np.indices((nlats,nlons))[0,:,:])
>> lons = (delta*np.indices((nlats,nlons))[1,:,:])
>> wave = 0.75*(np.sin(2.*lats)**8*np.cos(4.*lons))
>> mean = 0.5*np.cos(2.*lats)*((np.sin(2.*lats))**2 + 2.)
>> # compute native map projection coordinates of lat/lon grid.
>> x, y = map(lons*180./np.pi, lats*180./np.pi)
>> # contour data over the map.
>> cs = map.contourf(x,y,wave+mean,15)
>> # get axes bounds.
>> pos = ax.get_position()
>> l, b, w, h = pos.bounds
>> # create axes instance for colorbar on right.
>> cax = plt.axes([l+w+0.03, b, 0.04, h])
>> # draw colorbar on right.
>> plt.colorbar(cax=cax,orientation='vertical')
>> # create axes instance for colorbar on bottom.
>> cax = plt.axes([l, b-0.07, w, 0.04])
>> # draw colorbar on bottom.
>> plt.colorbar(cax=cax,orientation='horizontal')
>> plt.show()
>>
>> HTH,
>>
>> -Jeff
>>
>>> -
>>>
>>> Example 1:
>>>
>>> #! /usr/bin/python
>>>
>>> import matplotlib.pyplot as plt
>>> import numpy as np
>>> from numpy.random import randn
>>> from matplotlib import mpl
>>>
>>> # Make plot with horizontal colorbar
>>>
>>> fig = plt.figure(figsize=(7,8))
>>> ax = fig.add_subplot(111)
>>>
>>> # 'add_axes' for color bar
>>> ax1 = fig.add_axes([0.25, .07, 0.5, 0.03]) # [x_loc, y_loc, x_size,
>>> y_size]
>>>
>>> data = np.clip(randn(250, 250), -1, 1) # DATA FOR SQUARE FIG
>>> ax.imshow(data, interpolation='nearest') # DRAW DATA IN SQUARE FIG
>>>
>>> ax.set_title('Monthly PCP percentiles for 9-2008')
>>>
>>> ### Colorbar Settings
>>> cmap = mpl.cm.cool
>>> norm = mpl.colors.Normalize(vmin=0.0, vmax=1.0)
>>> cb1 = mpl.colorbar.ColorbarBase(ax1, cmap=cmap, norm=norm,
>>> orientation='horizontal')
>>> cb1.set_label('percentile')
>>>
>>>
>>> plt.show()
>>> fig.savefig('test.png')
>>>
>>>
>>>
>>> Example 2:
>>>
>>> #! /usr/bin/python
>>>
>>> """taken from geos_demo_2.py"""
>>>
>>> from PIL import Image
>>> from mpl_toolkits.basemap import Basemap
>>> import numpy as np
>>> import matplotlib
>>> from matplotlib import mpl
>>> import matplotlib.pyplot as plt
>>> from matplotlib.image import pil_to_array
>>>
>>> plot_name = 'hydro_demo.png'
>>> overlay_color = 'black'
>>>
>>> # read in jpeg image to rgb array
>>> pilImage = Image.open('wms_mapser.png')
>>>
>>> #da
Re: [Matplotlib-users] FancyArrowPatch without annotate
On Wed, Dec 17, 2008 at 9:09 AM, Ken Schutte wrote: > On Wed, Dec 17, 2008 at 1:49 AM, Jae-Joon Lee wrote: >> >> This is a correct way indeed. >> I believe that you considered it as a plain line because the arrow >> head is too small. >> You need to adjust the mutation_scale parameter. Try >> >> c = matplotlib.patches.FancyArrowPatch((0.2, 0.2), (0.5, 0.5), >> arrowstyle="->", mutation_scale=20.) >> >> Maybe the defaults need to be changed. > > Great. Is there a way to draw filled in arrow heads? > > I'm thinking of arrows like those made by graphviz, such as, > http://www.graphviz.org/Gallery/directed/fsm.html > > The closest I can seem to get is like this, > c = matplotlib.patches.FancyArrowPatch((0.2, 0.2), (0.5, 0.5), > arrowstyle="simple", linewidth=0.1, fc='k',mutation_scale=20.) > > (a) I don't know if this is possible if the whole arrow is implemented as a > single polygon (i.e. to draw line with a triangle head), and (b) I'm a bit > confused about the kwargs to the different things like axes.arrow, > FancyArrowPatch, ArrowStyle, etc. (for example, arrow takes 'headwidth', > but FancyArrowPatch does not.). > (a) As of now, there is no arrowclass that meets your need. The arrow is implemented as a single path, and it IS still possible to draw a line+a triangle. But, the artist only has a single "fill" mode and it is impossible to fill only a part of the path. It may be relatively easy to support. I'll take a look into it. (b) The FancyArrowPatch was very recently introduced and it's argument is not consistent with previous ones (Arrow,FancyArrow, YAArrow). Unlike other classes, FancyArrowPatch itself does not know how to draw an arrow. It delegates it to ArrowStyle. So, If you want to use FancyArrowPatch, "headwidth" should be given to ArrowStyle not to FancyArrowPatch itself. I agree this can be a bit confusing, but all the arrow-related parameters should be given to the style class. Take a look at "annotation_demo2.py" and see how it specifies the arrowstyle (and also connectionstyle). The 'arrowprops' parameter in the annotate function is mostly consumed by FancyArrowPatch class. Regards, -JJ > Thanks a lot, > Ken > > -- SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada. The future of the web can't happen without you. Join us at MIX09 to help pave the way to the Next Web now. Learn more and register at http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/ ___ Matplotlib-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] requesting for testing, os x installers
I uploaded new OSX binary eggs and a mpkg file to the sourceforge site. We have at least one more bugfix release to push out later, and before I do that I'd really like to know if the current installers resolve the known problems. If you have an OS X platfor to test on, I'd like to hear from you https://sourceforge.net/project/showfiles.php?group_id=80706&package_id=278194&release_id=646644 -- SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada. The future of the web can't happen without you. Join us at MIX09 to help pave the way to the Next Web now. Learn more and register at http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/ ___ Matplotlib-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] FancyArrowPatch without annotate
On Wed, Dec 17, 2008 at 1:07 PM, Jae-Joon Lee wrote: > On Wed, Dec 17, 2008 at 9:09 AM, Ken Schutte wrote: > > On Wed, Dec 17, 2008 at 1:49 AM, Jae-Joon Lee > wrote: > >> > >> This is a correct way indeed. > >> I believe that you considered it as a plain line because the arrow > >> head is too small. > >> You need to adjust the mutation_scale parameter. Try > >> > >> c = matplotlib.patches.FancyArrowPatch((0.2, 0.2), (0.5, 0.5), > >> arrowstyle="->", mutation_scale=20.) > >> > >> Maybe the defaults need to be changed. > > > > Great. Is there a way to draw filled in arrow heads? > > > > I'm thinking of arrows like those made by graphviz, such as, > > http://www.graphviz.org/Gallery/directed/fsm.html > > > > The closest I can seem to get is like this, > > c = matplotlib.patches.FancyArrowPatch((0.2, 0.2), (0.5, 0.5), > > arrowstyle="simple", linewidth=0.1, fc='k',mutation_scale=20.) > > > > (a) I don't know if this is possible if the whole arrow is implemented as > a > > single polygon (i.e. to draw line with a triangle head), and (b) I'm a > bit > > confused about the kwargs to the different things like axes.arrow, > > FancyArrowPatch, ArrowStyle, etc. (for example, arrow takes 'headwidth', > > but FancyArrowPatch does not.). > > > > (a) As of now, there is no arrowclass that meets your need. The arrow > is implemented as a single path, and it IS still possible to draw a > line+a triangle. But, the artist only has a single "fill" mode and it > is impossible to fill only a part of the path. It may be relatively > easy to support. I'll take a look into it. > > > (b) The FancyArrowPatch was very recently introduced and it's argument > is not consistent with previous ones (Arrow,FancyArrow, YAArrow). > Unlike other classes, FancyArrowPatch itself does not know how to draw > an arrow. It delegates it to ArrowStyle. So, If you want to use > FancyArrowPatch, "headwidth" should be given to ArrowStyle not to > FancyArrowPatch itself. I agree this can be a bit confusing, but all > the arrow-related parameters should be given to the style class. > > Take a look at "annotation_demo2.py" and see how it specifies the > arrowstyle (and also connectionstyle). The 'arrowprops' parameter in > the annotate function is mostly consumed by FancyArrowPatch class. > > Regards, > > -JJ > Thanks for the reply. I will be taking a look at the code, and if I come up with anything useful, I can post it. (It might be nice if eventually there were extra styles, e.g. "-|>", "<|-|>" for single lines with solid arrowheads). Ken -- SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada. The future of the web can't happen without you. Join us at MIX09 to help pave the way to the Next Web now. Learn more and register at http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/___ Matplotlib-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Falling over the edge of the world
Mauro Cavalcanti wrote: > Dear Jeff & ALL, > > When trying to plot a set of points in Basemap using an > Equirectangular projection centered on a longitude different from the > default (using the parameter lon_0 to generate a map centered on the > desired longitude), I end up with a stange plot like the one attached > to this message (ie., all the points are plotted "over the edge of the > world"). Has Basemap been taught about the sphericity of the Earth? > (just a joke!) > > N.B. This happens no matter if I call ax.cla() (where ax is an > instance of figure.axes) and reload all the dataset after changing the > longitude. > > Any hints? > Mauro: Say you create a cylindrical basemap with lon_0=180. The longitudinal extent of the map will be lon=0 to lon=360. If you then plot a point with a longitude of -60, it will be off the map to the left (similar to what your example plot shows). The solution is to renormalize the longitudes of the points your are plotting to be within 0 and 360 (by adding 360 if the longitude is negative). -Jeff > With warmest regards, > > > > > > > > -- > SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada. > The future of the web can't happen without you. Join us at MIX09 to help > pave the way to the Next Web now. Learn more and register at > http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/ > > > ___ > Matplotlib-users mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > -- Jeffrey S. Whitaker Phone : (303)497-6313 Meteorologist FAX: (303)497-6449 NOAA/OAR/PSD R/PSD1Email : [email protected] 325 BroadwayOffice : Skaggs Research Cntr 1D-113 Boulder, CO, USA 80303-3328 Web: http://tinyurl.com/5telg -- SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada. The future of the web can't happen without you. Join us at MIX09 to help pave the way to the Next Web now. Learn more and register at http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/ ___ Matplotlib-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Falling over the edge of the world
Dear Jeff, 2008/12/17 Jeff Whitaker : > Mauro: Say you create a cylindrical basemap with lon_0=180. The > longitudinal extent of the map will be lon=0 to lon=360. If you then plot a > point with a longitude of -60, it will be off the map to the left (similar > to what your example plot shows). The solution is to renormalize the > longitudes of the points your are plotting to be within 0 and 360 (by adding > 360 if the longitude is negative). Thanks for the explanation -- it is obvious in retrospect! (Have to find the nearest wall...). With best regards, -- Dr. Mauro J. Cavalcanti Ecoinformatics Studio P.O. Box 46521, CEP 20551-970 Rio de Janeiro, RJ, BRASIL E-mail: [email protected] Web: http://studio.infobio.net Linux Registered User #473524 * Ubuntu User #22717 "Life is complex. It consists of real and imaginary parts." -- SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada. The future of the web can't happen without you. Join us at MIX09 to help pave the way to the Next Web now. Learn more and register at http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/ ___ Matplotlib-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] FancyArrowPatch without annotate
On Wed, Dec 17, 2008 at 1:49 AM, Jae-Joon Lee wrote: > > This is a correct way indeed. > I believe that you considered it as a plain line because the arrow > head is too small. > You need to adjust the mutation_scale parameter. Try > > c = matplotlib.patches.FancyArrowPatch((0.2, 0.2), (0.5, 0.5), > arrowstyle="->", mutation_scale=20.) > > Maybe the defaults need to be changed. Great. Is there a way to draw filled in arrow heads? I'm thinking of arrows like those made by graphviz, such as, http://www.graphviz.org/Gallery/directed/fsm.html The closest I can seem to get is like this, c = matplotlib.patches.FancyArrowPatch((0.2, 0.2), (0.5, 0.5), arrowstyle="simple", linewidth=0.1, fc='k',mutation_scale=20.) (a) I don't know if this is possible if the whole arrow is implemented as a single polygon (i.e. to draw line with a triangle head), and (b) I'm a bit confused about the kwargs to the different things like axes.arrow, FancyArrowPatch, ArrowStyle, etc. (for example, arrow takes 'headwidth', but FancyArrowPatch does not.). Thanks a lot, Ken -- SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada. The future of the web can't happen without you. Join us at MIX09 to help pave the way to the Next Web now. Learn more and register at http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/___ Matplotlib-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] OSX 10.5 event.key bug
Hello John and others, my favorite solution is: > * axes param: specific for a given axes in figure; interface would > be something like > >ax.auto_toolbar_keys(False) Which would be really helpful in case an axes belongs to a button (slider, ...), where logarithmic scaling or a grid are not of special interest - at least for me. best regards, Matthias On Wednesday 17 September 2008 04:58:34 John Hunter wrote: > On Tue, Sep 16, 2008 at 9:00 PM, James Schombert wrote: > > I'm switching from an old graphics package (PGPLOT) to matplotlib, and I > > prefer to use the graphics window to input commands (such as, a new > > file name) by typing at the bottom of the frame > > > > so if the file name, for example, has a 'g' or 'l' in its name, the > > window redraws a grid or log > > > > it would be nice to have some sort of disable option, or a freeze method > > until I have finished inputing the text > > > > currently my work around is to test for a 'g' or 'l' and ax.grid(False) > > plus a forced redraw, but this is not elegant and breaks the flow of my > > analysis routines > > This will not be particularly hard to conditionally turn off -- the > question is what is the best mechanism? The main choices are: > > * rc param - global for all figures > > * figure param - specific to a given figure; interface would be > something like: > > fig.auto_toolbar_keys(False) > > * axes param: specific for a given axes in figure; interface would > be something like > >ax.auto_toolbar_keys(False) > > Any preferences, thoughts? I think the ability to turn this off is > pretty important for application developers and others. I guess > another option would be to support an rc param like > > figure.toolbar_keys : l, g, f, a > > which is a sequence of keys that will generate the default behavior > (log, grid, fullscreen, set_navigate on all). The user could set just > the elements of the list that they want to have the default action for > (or None) > > JDH -- SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada. The future of the web can't happen without you. Join us at MIX09 to help pave the way to the Next Web now. Learn more and register at http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/ ___ Matplotlib-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] bad keys in event.key
Using matplotlib 0.98.5 on OSX 10.5, the following error occurs for many key_press events using the standard connect class - letter such as c,v,s etc (and most important, backspace) Exception in Tkinter callback Traceback (most recent call last): File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/lib-tk/Tkinter.py", line 1403, in __call__ return self.func(*args) File "/Library/Python/2.5/site-packages/matplotlib/backends/backend_tkagg.py",line 312, in key_press FigureCanvasBase.key_press_event(self, key, guiEvent=event) File "/Library/Python/2.5/site-packages/matplotlib/backend_bases.py", line 1122, in key_press_event self.callbacks.process(s, event) File "/Library/Python/2.5/site-packages/matplotlib/cbook.py", line 155, in process func(*args, **kwargs) File "/Library/Python/2.5/site-packages/matplotlib/backend_bases.py", line 1626, in key_press self.canvas.toolbar.back() AttributeError: FigureCanvasTkAgg instance has no attribute 'toolbar' would a full list of the "bad" keys help? J -- SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada. The future of the web can't happen without you. Join us at MIX09 to help pave the way to the Next Web now. Learn more and register at http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/ ___ Matplotlib-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] figimage and image magnification (was: imshow with pdf)
On Mon, Dec 15, 2008 at 2:44 PM, John Hunter wrote: > I am not sure what figimage should mean for a vector backend so I want > to hear from Perry who motivated the function. When I implemented it > on his original request, I understood it to be a raw pixel dump to the > canvas with no scaling, no interpolation, etc What does a pixel > dump to a canvas mean for a vector backend? I think we could define > something that was at least consistent, but we should probably hear > from Perry et al who are presumably using the function. After sleeping on this overnight, I think the answer here is clear. figimage is meant to be a pixel dump, so we should just treat a pixel as a dot. When dpi is increased, the number of dots on the canvas increases so the figimage should look smaller. I added your patch and support for magnification to figimage -- the output looks right for PNG, PDF and EPS -- svg still not. I haven't had a chance to look but perhaps SVG does not utilize the magnification param. I'll check into this later. JDH -- SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada. The future of the web can't happen without you. Join us at MIX09 to help pave the way to the Next Web now. Learn more and register at http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/ ___ Matplotlib-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] bad keys in event.key
On Wed, Dec 17, 2008 at 1:24 PM, James Schombert wrote: > Using matplotlib 0.98.5 on OSX 10.5, the following error > occurs for many key_press events using the standard > connect class - letter such as c,v,s etc (and most important, backspace) > > Exception in Tkinter callback > Traceback (most recent call last): > File > "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/lib-tk/Tkinter.py", > line 1403, in __call__ > return self.func(*args) > File > "/Library/Python/2.5/site-packages/matplotlib/backends/backend_tkagg.py",line > 312, in key_press > FigureCanvasBase.key_press_event(self, key, guiEvent=event) > File "/Library/Python/2.5/site-packages/matplotlib/backend_bases.py", > line 1122, in key_press_event > self.callbacks.process(s, event) > File "/Library/Python/2.5/site-packages/matplotlib/cbook.py", line 155, > in process > func(*args, **kwargs) > File "/Library/Python/2.5/site-packages/matplotlib/backend_bases.py", > line 1626, in key_press > self.canvas.toolbar.back() > AttributeError: FigureCanvasTkAgg instance has no attribute 'toolbar' > > would a full list of the "bad" keys help I am not seeing this on the 0.98.5 release candidate. I fire up > python simple_plot.py -dTkAgg and click 'c' somewhere on the figure/axes, or 'delete' and I am not getting the traceback. JDH -- SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada. The future of the web can't happen without you. Join us at MIX09 to help pave the way to the Next Web now. Learn more and register at http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/ ___ Matplotlib-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] OSX 10.5 event.key bug
On Wed, Dec 17, 2008 at 12:22 PM, Matthias Michler wrote: > Hello John and others, > > my favorite solution is: >> * axes param: specific for a given axes in figure; interface would >> be something like >> >>ax.auto_toolbar_keys(False) This is on my list of things to do JDH -- SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada. The future of the web can't happen without you. Join us at MIX09 to help pave the way to the Next Web now. Learn more and register at http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/ ___ Matplotlib-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] [Fwd: Matplotlib 0.98.5 egg on Mac OS X : Install Problem]
Hi Everyone, I am running into a problem when trying to install 0.98.5 egg on a Mac OS X machine. Any help much appreciated. Relevant error messages follow: Thanks -Kaushik sudo easy_install matplotlib-0.98.5-py2.5-macosx-10.3.egg** BUILDING MATPLOTLIB matplotlib: 0.98.5 python: 2.5.2 (r252:60911, Feb 22 2008, 07:57:53) [GCC 4.0.1 (Apple Computer, Inc. build 5363)] platform: darwin REQUIRED DEPENDENCIES numpy: 1.2.1 freetype2: found, but unknown version (no pkg-config) OPTIONAL BACKEND DEPENDENCIES libpng: found, but unknown version (no pkg-config) Tkinter: Tkinter: 50704, Tk: 8.4, Tcl: 8.4 wxPython: no * wxPython not found Gtk+: no * Building for Gtk+ requires pygtk; you must be able * to "import gtk" in your build/install environment Mac OS X native: yes Qt: no Qt4: no Cairo: no OPTIONAL DATE/TIMEZONE DEPENDENCIES datetime: present, version unknown dateutil: matplotlib will provide pytz: 2008c OPTIONAL USETEX DEPENDENCIES dvipng: no ghostscript: /bin/sh: gs: command not found latex: no EXPERIMENTAL CONFIG PACKAGE DEPENDENCIES configobj: matplotlib will provide enthought.traits: no [Edit setup.cfg to suppress the above messages] error: lib/matplotlib/mpl-data/matplotlib.conf.template: No such file or directory Exception exceptions.OSError: (2, 'No such file or directory', 'src/image.cpp') in > ignored Exception exceptions.OSError: (2, 'No such file or directory', 'src/path.cpp') in > ignored Exception exceptions.OSError: (2, 'No such file or directory', 'src/backend_agg.cpp') in > ignored From within ipython:*** In [1]: import pylab --- ImportError Traceback (most recent call last) /Users/kghose/ in () /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib-0.98.5-py2.5-macosx-10.3.egg/pylab.py in () > 1 from matplotlib.pylab import * 2 import matplotlib.pylab 3 __doc__ = matplotlib.pylab.__doc__ /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib-0.98.5-py2.5-macosx-10.3.egg/matplotlib/pylab.py in () 204 from numpy import ma 205 --> 206 from matplotlib import mpl # pulls in most modules 207 208 from matplotlib.dates import date2num, num2date,\ /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib-0.98.5-py2.5-macosx-10.3.egg/matplotlib/mpl.py in () 2 from matplotlib import axis > 3 from matplotlib import axes 4 from matplotlib import cbook 5 from matplotlib import collections 6 from matplotlib import colors /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib-0.98.5-py2.5-macosx-10.3.egg/matplotlib/axes.py in () 16 import matplotlib.dates as mdates 17 import matplotlib.font_manager as font_manager ---> 18 import matplotlib.image as mimage 19 import matplotlib.legend as mlegend 20 import matplotlib.lines as mlines /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib-0.98.5-py2.5-macosx-10.3.egg/matplotlib/image.py in () 17 # For clarity, names from _image are given explicitly in this module: 18 from matplotlib import _image ---> 19 from matplotlib import _png 20 21 # For user convenience, the names from _image are also imported into ImportError: dlopen(/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib-0.98.5-py2.5-macosx-10.3.egg/matplotlib/_png.so, 2): Library not loaded: /usr/local/lib/libpng12.0.dylib Referenced from: /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib-0.98.5-py2.5-macosx-10.3.egg/matplotlib/_png.so Reason: image not found In [2]: -- SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada. The future of the web can't happen without you. Join us at MIX09 to help pave the way to the Next Web now. Learn more and register at http://ad.doubleclick.net
[Matplotlib-users] Matplotlib 0.98.5 egg on Mac OS X : Install Problem
Hi Everyone, I am running into a problem when trying to install 0.98.5 egg on a Mac OS X machine. Any help much appreciated. Relevant error messages follow: Thanks -Kaushik sudo easy_install matplotlib-0.98.5-py2.5-macosx-10.3.egg** BUILDING MATPLOTLIB matplotlib: 0.98.5 python: 2.5.2 (r252:60911, Feb 22 2008, 07:57:53) [GCC 4.0.1 (Apple Computer, Inc. build 5363)] platform: darwin REQUIRED DEPENDENCIES numpy: 1.2.1 freetype2: found, but unknown version (no pkg-config) OPTIONAL BACKEND DEPENDENCIES libpng: found, but unknown version (no pkg-config) Tkinter: Tkinter: 50704, Tk: 8.4, Tcl: 8.4 wxPython: no * wxPython not found Gtk+: no * Building for Gtk+ requires pygtk; you must be able * to "import gtk" in your build/install environment Mac OS X native: yes Qt: no Qt4: no Cairo: no OPTIONAL DATE/TIMEZONE DEPENDENCIES datetime: present, version unknown dateutil: matplotlib will provide pytz: 2008c OPTIONAL USETEX DEPENDENCIES dvipng: no ghostscript: /bin/sh: gs: command not found latex: no EXPERIMENTAL CONFIG PACKAGE DEPENDENCIES configobj: matplotlib will provide enthought.traits: no [Edit setup.cfg to suppress the above messages] error: lib/matplotlib/mpl-data/matplotlib.conf.template: No such file or directory Exception exceptions.OSError: (2, 'No such file or directory', 'src/image.cpp') in > ignored Exception exceptions.OSError: (2, 'No such file or directory', 'src/path.cpp') in > ignored Exception exceptions.OSError: (2, 'No such file or directory', 'src/backend_agg.cpp') in > ignored From within ipython:*** In [1]: import pylab --- ImportError Traceback (most recent call last) /Users/kghose/ in () /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib-0.98.5-py2.5-macosx-10.3.egg/pylab.py in () > 1 from matplotlib.pylab import * 2 import matplotlib.pylab 3 __doc__ = matplotlib.pylab.__doc__ /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib-0.98.5-py2.5-macosx-10.3.egg/matplotlib/pylab.py in () 204 from numpy import ma 205 --> 206 from matplotlib import mpl # pulls in most modules 207 208 from matplotlib.dates import date2num, num2date,\ /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib-0.98.5-py2.5-macosx-10.3.egg/matplotlib/mpl.py in () 2 from matplotlib import axis > 3 from matplotlib import axes 4 from matplotlib import cbook 5 from matplotlib import collections 6 from matplotlib import colors /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib-0.98.5-py2.5-macosx-10.3.egg/matplotlib/axes.py in () 16 import matplotlib.dates as mdates 17 import matplotlib.font_manager as font_manager ---> 18 import matplotlib.image as mimage 19 import matplotlib.legend as mlegend 20 import matplotlib.lines as mlines /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib-0.98.5-py2.5-macosx-10.3.egg/matplotlib/image.py in () 17 # For clarity, names from _image are given explicitly in this module: 18 from matplotlib import _image ---> 19 from matplotlib import _png 20 21 # For user convenience, the names from _image are also imported into ImportError: dlopen(/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib-0.98.5-py2.5-macosx-10.3.egg/matplotlib/_png.so, 2): Library not loaded: /usr/local/lib/libpng12.0.dylib Referenced from: /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib-0.98.5-py2.5-macosx-10.3.egg/matplotlib/_png.so Reason: image not found In [2]: -- SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada. The future of the web can't happen without you. Join us at MIX09 to help pave the way to the Next Web now. Learn more and register at http://ad.doubleclick.net
Re: [Matplotlib-users] [Fwd: Matplotlib 0.98.5 egg on Mac OS X : Install Problem]
On Wed, Dec 17, 2008 at 2:29 PM, Kaushik Ghose wrote: > Hi Everyone, > > I am running into a problem when trying to install 0.98.5 egg on a Mac OS X > machine. Any help much appreciated. Relevant error messages follow: I posted binaries to fix this problem and have requested testers, so please try the binaries at https://sourceforge.net/project/showfiles.php?group_id=80706&package_id=278194&release_id=646644 You might want to be sure to delete the old dir to get a clean install > sudo rm -rf > /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib* before installing the new. Let me know how it goes. JDH -- SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada. The future of the web can't happen without you. Join us at MIX09 to help pave the way to the Next Web now. Learn more and register at http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/ ___ Matplotlib-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Bug in ubuntu intrepid
On Mon, Dec 15, 2008 at 11:22 AM, Alejandro Weinstein wrote: > Is anybody aware of the MPL bug on Ubuntu intrepid? > > https://bugs.launchpad.net/ubuntu/+source/matplotlib/+bug/299381 The problem is caused by outdated *.pyc files. The solution is sudo python -c 'import matplotlib' -- SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada. The future of the web can't happen without you. Join us at MIX09 to help pave the way to the Next Web now. Learn more and register at http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/ ___ Matplotlib-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Matplotlib 0.98.5 egg on Mac OS X : Install Problem
On Wed, Dec 17, 2008 at 2:32 PM, Kaushik Ghose wrote: > Hi Everyone, > > I am running into a problem when trying to install 0.98.5 egg on a Mac OS X > machine. Any help much appreciated. Relevant error messages follow: Did you miss my repeated posts on this subject, asking for people to test the new binaries that (hopefully) have fixed this problem? https://sourceforge.net/project/showfiles.php?group_id=80706&package_id=278194&release_id=646644 -- SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada. The future of the web can't happen without you. Join us at MIX09 to help pave the way to the Next Web now. Learn more and register at http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/ ___ Matplotlib-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Matplotlib 0.98.5 egg on Mac OS X : Install Problem
Heh, Sorry. Thanks for the link though and Happy Holidays! -Kaushik John Hunter wrote: > On Wed, Dec 17, 2008 at 2:32 PM, Kaushik Ghose > wrote: >> Hi Everyone, >> >> I am running into a problem when trying to install 0.98.5 egg on a Mac OS X >> machine. Any help much appreciated. Relevant error messages follow: > > Did you miss my repeated posts on this subject, asking for people to > test the new binaries that (hopefully) have fixed this problem? > > https://sourceforge.net/project/showfiles.php?group_id=80706&package_id=278194&release_id=646644 -- SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada. The future of the web can't happen without you. Join us at MIX09 to help pave the way to the Next Web now. Learn more and register at http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/ ___ Matplotlib-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] Error with matplotlib-0.98.5.1-py2.5-macosx10.5.mpkg
Hi John, The install goes fine, but I come up blank on the import. Thanks -Kaushik sudo rm -rf /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib* ++ sudo installer -pkg matplotlib-0.98.5.1-py2.5-macosx10.5.mpkg -target / installer: Package name is matplotlib 0.98.5.1-r0 installer: Installing at base path / installer: The install was successful. +++ In [1]: import pylab --- ImportError Traceback (most recent call last) /Users/kghose/Source/ in () /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/pylab.py in () > 1 from matplotlib.pylab import * 2 import matplotlib.pylab 3 __doc__ = matplotlib.pylab.__doc__ ImportError: No module named pylab ++ John Hunter wrote: > On Wed, Dec 17, 2008 at 2:29 PM, Kaushik Ghose > wrote: >> Hi Everyone, >> >> I am running into a problem when trying to install 0.98.5 egg on a Mac OS X >> machine. Any help much appreciated. Relevant error messages follow: > > I posted binaries to fix this problem and have requested testers, so > please try the binaries at > > https://sourceforge.net/project/showfiles.php?group_id=80706&package_id=278194&release_id=646644 > > You might want to be sure to delete the old dir to get a clean install > >> sudo rm -rf >> /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib* > > before installing the new. Let me know how it goes. > > JDH -- SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada. The future of the web can't happen without you. Join us at MIX09 to help pave the way to the Next Web now. Learn more and register at http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/ ___ Matplotlib-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] Error with matplotlib-0.98.5.1_r0-py2.5-macosx-10.3-fat.egg
Hi John,
I tried the .egg package but no joy.
Thanks
-Kaushik
sudo rm -rf
/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib*
sudo easy_install matplotlib-0.98.5.1_r0-py2.5-macosx-10.3-fat.egg
Processing matplotlib-0.98.5.1_r0-py2.5-macosx-10.3-fat.egg
creating
/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib-0.98.5.1_r0-py2.5-macosx-10.3-fat.egg
Extracting matplotlib-0.98.5.1_r0-py2.5-macosx-10.3-fat.egg to
/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages
Adding matplotlib 0.98.5.1-r0 to easy-install.pth file
Installed
/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib-0.98.5.1_r0-py2.5-macosx-10.3-fat.egg
Processing dependencies for matplotlib==0.98.5.1-r0
Searching for matplotlib==0.98.5.1-r0
Reading http://pypi.python.org/simple/matplotlib/
Reading http://matplotlib.sourceforge.net
Reading http://sourceforge.net/project/showfiles.php?group_id=80706
Reading
https://sourceforge.net/project/showfiles.php?group_id=80706&package_id=278194
Reading
https://sourceforge.net/project/showfiles.php?group_id=80706&package_id=82474
No local packages or download links found for matplotlib==0.98.5.1-r0
error: Could not find suitable distribution for
Requirement.parse('matplotlib==0.98.5.1-r0')
John Hunter wrote:
> On Wed, Dec 17, 2008 at 2:29 PM, Kaushik Ghose
> wrote:
>> Hi Everyone,
>>
>> I am running into a problem when trying to install 0.98.5 egg on a Mac OS X
>> machine. Any help much appreciated. Relevant error messages follow:
>
> I posted binaries to fix this problem and have requested testers, so
> please try the binaries at
>
> https://sourceforge.net/project/showfiles.php?group_id=80706&package_id=278194&release_id=646644
>
> You might want to be sure to delete the old dir to get a clean install
>
>> sudo rm -rf
>> /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib*
>
> before installing the new. Let me know how it goes.
>
> JDH
--
SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
The future of the web can't happen without you. Join us at MIX09 to help
pave the way to the Next Web now. Learn more and register at
http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
___
Matplotlib-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Error with matplotlib-0.98.5.1-py2.5-macosx10.5.mpkg
On Wed, Dec 17, 2008 at 4:43 PM, Kaushik Ghose wrote: > Hi John, > > The install goes fine, but I come up blank on the import. > > Thanks > -Kaushik > > sudo rm -rf > /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib* > > ++ > > sudo installer -pkg matplotlib-0.98.5.1-py2.5-macosx10.5.mpkg -target / > installer: Package name is matplotlib 0.98.5.1-r0 > installer: Installing at base path / > installer: The install was successful. > > +++ > > In [1]: import pylab Please run the following commands after cleaning the previous installs and reinstalling the mpkg file:: ls python -c 'import matplotlib; print matplotlib.__file__' python -c 'import matplotlib; print matplotlib.__version__' python -c 'import pylab' The ls is important because sometimes a person has a directory named 'matplotlib' in their local path, and this is getting picked rather than the installed matplotlib which contains the pylab module. JDH -- SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada. The future of the web can't happen without you. Join us at MIX09 to help pave the way to the Next Web now. Learn more and register at http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/ ___ Matplotlib-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Error with matplotlib-0.98.5.1_r0-py2.5-macosx-10.3-fat.egg
On Wed, Dec 17, 2008 at 4:50 PM, Kaushik Ghose
wrote:
> Hi John,
>
> I tried the .egg package but no joy.
>
> Thanks
> -Kaushik
>
> sudo rm -rf
> /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib*
>
>
>
> sudo easy_install matplotlib-0.98.5.1_r0-py2.5-macosx-10.3-fat.egg
> Processing matplotlib-0.98.5.1_r0-py2.5-macosx-10.3-fat.egg
> creating
> /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib-0.98.5.1_r0-py2.5-macosx-10.3-fat.egg
> Extracting matplotlib-0.98.5.1_r0-py2.5-macosx-10.3-fat.egg to
> /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages
> Adding matplotlib 0.98.5.1-r0 to easy-install.pth file
>
> Installed
> /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib-0.98.5.1_r0-py2.5-macosx-10.3-fat.egg
> Processing dependencies for matplotlib==0.98.5.1-r0
> Searching for matplotlib==0.98.5.1-r0
> Reading http://pypi.python.org/simple/matplotlib/
> Reading http://matplotlib.sourceforge.net
> Reading http://sourceforge.net/project/showfiles.php?group_id=80706
> Reading
> https://sourceforge.net/project/showfiles.php?group_id=80706&package_id=278194
> Reading
> https://sourceforge.net/project/showfiles.php?group_id=80706&package_id=82474
> No local packages or download links found for matplotlib==0.98.5.1-r0
> error: Could not find suitable distribution for
> Requirement.parse('matplotlib==0.98.5.1-r0')
Eggs are an abomination -- the person who named the installer
"easy_install" should have their license revoked. I think we may
distributing them because they are simply broken in too many ways.
This recurring problem -- where the easy_install goes looking on pypi
for an egg even though you are pointing at one locally on the file
system, is simply ridiculous.
Chris Barker suggests renaming the egg to matplotlib-0.98.5-py2.5.egg.
Try that, and please let me know. Thanks for the testing.
JDH
--
SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
The future of the web can't happen without you. Join us at MIX09 to help
pave the way to the Next Web now. Learn more and register at
http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
___
Matplotlib-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] bad keys in event.key
I downloaded keypress_demo.py from the matplotlib website runs as follows ./keypress_demo.py (then typed letter 'c') Exception in Tkinter callback Traceback (most recent call last): File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/lib-tk/Tkinter.py", line 1403, in __call__ return self.func(*args) File "/Library/Python/2.5/site-packages/matplotlib/backends/backend_tkagg.py", line 312, in key_press FigureCanvasBase.key_press_event(self, key, guiEvent=event) File "/Library/Python/2.5/site-packages/matplotlib/backend_bases.py", line 1122, in key_press_event self.callbacks.process(s, event) File "/Library/Python/2.5/site-packages/matplotlib/cbook.py", line 155, in process func(*args, **kwargs) File "/Library/Python/2.5/site-packages/matplotlib/backend_bases.py", line 1626, in key_press self.canvas.toolbar.back() AttributeError: FigureCanvasTkAgg instance has no attribute 'toolbar' now you are making me think something is wrong with my build, but this is an out of the box laptop, 10.5, numpy 1.2.1, zlib-1.2.3, freetype-2.3.7, libpng-1.2.33, then build matplotlib-0.98.5 J note: i backed down to 0.98.3, it works fine John Hunter wrote: > On Wed, Dec 17, 2008 at 1:24 PM, James Schombert wrote: >> Using matplotlib 0.98.5 on OSX 10.5, the following error >> occurs for many key_press events using the standard >> connect class - letter such as c,v,s etc (and most important, backspace) >> >> Exception in Tkinter callback >> Traceback (most recent call last): >> File >> "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/lib-tk/Tkinter.py", >> line 1403, in __call__ >> return self.func(*args) >> File >> "/Library/Python/2.5/site-packages/matplotlib/backends/backend_tkagg.py",line >> 312, in key_press >> FigureCanvasBase.key_press_event(self, key, guiEvent=event) >> File "/Library/Python/2.5/site-packages/matplotlib/backend_bases.py", >> line 1122, in key_press_event >> self.callbacks.process(s, event) >> File "/Library/Python/2.5/site-packages/matplotlib/cbook.py", line 155, >> in process >> func(*args, **kwargs) >> File "/Library/Python/2.5/site-packages/matplotlib/backend_bases.py", >> line 1626, in key_press >> self.canvas.toolbar.back() >> AttributeError: FigureCanvasTkAgg instance has no attribute 'toolbar' >> >> would a full list of the "bad" keys help > > I am not seeing this on the 0.98.5 release candidate. I fire up > > > python simple_plot.py -dTkAgg > > and click 'c' somewhere on the figure/axes, or 'delete' and I am not > getting the traceback. > > JDH -- SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada. The future of the web can't happen without you. Join us at MIX09 to help pave the way to the Next Web now. Learn more and register at http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/ ___ Matplotlib-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Error with matplotlib-0.98.5.1_r0-py2.5-macosx-10.3-fat.egg
Yess! The renaming works. Would simply changing the name of the file on
sourceforge solve this problem? That would be so odd! Thanks -Kaushik
$mv matplotlib-0.98.5.1_r0-py2.5-macosx-10.3-fat.egg matplotlib-0.98.5-py2.5.egg
$ sudo easy_install matplotlib-0.98.5-py2.5.egg
Password:
Processing matplotlib-0.98.5-py2.5.egg
creating
/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib-0.98.5-py2.5.egg
Extracting matplotlib-0.98.5-py2.5.egg to
/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages
Removing matplotlib 0.98.5.1-r0 from easy-install.pth file
Adding matplotlib 0.98.5 to easy-install.pth file
Installed
/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib-0.98.5-py2.5.egg
Processing dependencies for matplotlib==0.98.5
Finished processing dependencies for matplotlib==0.98.5
and pylab imports and runs fine...
John Hunter wrote:
> On Wed, Dec 17, 2008 at 4:50 PM, Kaushik Ghose
> wrote:
>> Hi John,
>>
>> I tried the .egg package but no joy.
>>
>> Thanks
>> -Kaushik
>>
>> sudo rm -rf
>> /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib*
>>
>>
>>
>> sudo easy_install matplotlib-0.98.5.1_r0-py2.5-macosx-10.3-fat.egg
>> Processing matplotlib-0.98.5.1_r0-py2.5-macosx-10.3-fat.egg
>> creating
>> /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib-0.98.5.1_r0-py2.5-macosx-10.3-fat.egg
>> Extracting matplotlib-0.98.5.1_r0-py2.5-macosx-10.3-fat.egg to
>> /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages
>> Adding matplotlib 0.98.5.1-r0 to easy-install.pth file
>>
>> Installed
>> /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib-0.98.5.1_r0-py2.5-macosx-10.3-fat.egg
>> Processing dependencies for matplotlib==0.98.5.1-r0
>> Searching for matplotlib==0.98.5.1-r0
>> Reading http://pypi.python.org/simple/matplotlib/
>> Reading http://matplotlib.sourceforge.net
>> Reading http://sourceforge.net/project/showfiles.php?group_id=80706
>> Reading
>> https://sourceforge.net/project/showfiles.php?group_id=80706&package_id=278194
>> Reading
>> https://sourceforge.net/project/showfiles.php?group_id=80706&package_id=82474
>> No local packages or download links found for matplotlib==0.98.5.1-r0
>> error: Could not find suitable distribution for
>> Requirement.parse('matplotlib==0.98.5.1-r0')
>
>
> Eggs are an abomination -- the person who named the installer
> "easy_install" should have their license revoked. I think we may
> distributing them because they are simply broken in too many ways.
> This recurring problem -- where the easy_install goes looking on pypi
> for an egg even though you are pointing at one locally on the file
> system, is simply ridiculous.
>
> Chris Barker suggests renaming the egg to matplotlib-0.98.5-py2.5.egg.
> Try that, and please let me know. Thanks for the testing.
>
> JDH
--
SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
The future of the web can't happen without you. Join us at MIX09 to help
pave the way to the Next Web now. Learn more and register at
http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
___
Matplotlib-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Error with matplotlib-0.98.5.1-py2.5-macosx10.5.mpkg
Hi John, This is odd. After successfully installing the egg (last post) and then removing it by doing sudo rm -rf /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib* I now get sudo installer -pkg matplotlib-0.98.5.1-py2.5-macosx10.5.mpkg -target / installer: Package name is matplotlib 0.98.5.1-r0 installer: Upgrading at base path / installer: The upgrade was successful. So there are some files I haven't gotten rid of, what should I be looking to remove? Thanks! -Kaushik John Hunter wrote: > On Wed, Dec 17, 2008 at 4:43 PM, Kaushik Ghose > wrote: >> Hi John, >> >> The install goes fine, but I come up blank on the import. >> >> Thanks >> -Kaushik >> >> sudo rm -rf >> /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib* >> >> ++ >> >> sudo installer -pkg matplotlib-0.98.5.1-py2.5-macosx10.5.mpkg -target / >> installer: Package name is matplotlib 0.98.5.1-r0 >> installer: Installing at base path / >> installer: The install was successful. >> >> +++ >> >> In [1]: import pylab > > Please run the following commands after cleaning the previous installs > and reinstalling the mpkg file:: > > >ls >python -c 'import matplotlib; print matplotlib.__file__' >python -c 'import matplotlib; print matplotlib.__version__' >python -c 'import pylab' > > The ls is important because sometimes a person has a directory named > 'matplotlib' in their local path, and this is getting picked rather > than the installed matplotlib which contains the pylab module. > > JDH -- SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada. The future of the web can't happen without you. Join us at MIX09 to help pave the way to the Next Web now. Learn more and register at http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/ ___ Matplotlib-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Error with matplotlib-0.98.5.1-py2.5-macosx10.5.mpkg
Kaushik Ghose wrote: > Hi John, > > This is odd. After successfully installing the egg (last post) and then > removing > it by doing > > sudo rm -rf > /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib* > > I now get > sudo installer -pkg matplotlib-0.98.5.1-py2.5-macosx10.5.mpkg -target / > installer: Package name is matplotlib 0.98.5.1-r0 > installer: Upgrading at base path / > installer: The upgrade was successful. > > So there are some files I haven't gotten rid of, what should I be looking to > remove? What's the problem here? this looks successful to me. If you're referring to the "Upgrading" -- I think that's because the Mac pkg installer keep some kind of record that is separate from the python tree. At home without my Mac, so can't test myself now -- sorry. -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/OR&R(206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception [email protected] -- SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada. The future of the web can't happen without you. Join us at MIX09 to help pave the way to the Next Web now. Learn more and register at http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/ ___ Matplotlib-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/matplotlib-users
