You can subscribe to this list here.
2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(3) |
Jun
|
Jul
|
Aug
(12) |
Sep
(12) |
Oct
(56) |
Nov
(65) |
Dec
(37) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2004 |
Jan
(59) |
Feb
(78) |
Mar
(153) |
Apr
(205) |
May
(184) |
Jun
(123) |
Jul
(171) |
Aug
(156) |
Sep
(190) |
Oct
(120) |
Nov
(154) |
Dec
(223) |
2005 |
Jan
(184) |
Feb
(267) |
Mar
(214) |
Apr
(286) |
May
(320) |
Jun
(299) |
Jul
(348) |
Aug
(283) |
Sep
(355) |
Oct
(293) |
Nov
(232) |
Dec
(203) |
2006 |
Jan
(352) |
Feb
(358) |
Mar
(403) |
Apr
(313) |
May
(165) |
Jun
(281) |
Jul
(316) |
Aug
(228) |
Sep
(279) |
Oct
(243) |
Nov
(315) |
Dec
(345) |
2007 |
Jan
(260) |
Feb
(323) |
Mar
(340) |
Apr
(319) |
May
(290) |
Jun
(296) |
Jul
(221) |
Aug
(292) |
Sep
(242) |
Oct
(248) |
Nov
(242) |
Dec
(332) |
2008 |
Jan
(312) |
Feb
(359) |
Mar
(454) |
Apr
(287) |
May
(340) |
Jun
(450) |
Jul
(403) |
Aug
(324) |
Sep
(349) |
Oct
(385) |
Nov
(363) |
Dec
(437) |
2009 |
Jan
(500) |
Feb
(301) |
Mar
(409) |
Apr
(486) |
May
(545) |
Jun
(391) |
Jul
(518) |
Aug
(497) |
Sep
(492) |
Oct
(429) |
Nov
(357) |
Dec
(310) |
2010 |
Jan
(371) |
Feb
(657) |
Mar
(519) |
Apr
(432) |
May
(312) |
Jun
(416) |
Jul
(477) |
Aug
(386) |
Sep
(419) |
Oct
(435) |
Nov
(320) |
Dec
(202) |
2011 |
Jan
(321) |
Feb
(413) |
Mar
(299) |
Apr
(215) |
May
(284) |
Jun
(203) |
Jul
(207) |
Aug
(314) |
Sep
(321) |
Oct
(259) |
Nov
(347) |
Dec
(209) |
2012 |
Jan
(322) |
Feb
(414) |
Mar
(377) |
Apr
(179) |
May
(173) |
Jun
(234) |
Jul
(295) |
Aug
(239) |
Sep
(276) |
Oct
(355) |
Nov
(144) |
Dec
(108) |
2013 |
Jan
(170) |
Feb
(89) |
Mar
(204) |
Apr
(133) |
May
(142) |
Jun
(89) |
Jul
(160) |
Aug
(180) |
Sep
(69) |
Oct
(136) |
Nov
(83) |
Dec
(32) |
2014 |
Jan
(71) |
Feb
(90) |
Mar
(161) |
Apr
(117) |
May
(78) |
Jun
(94) |
Jul
(60) |
Aug
(83) |
Sep
(102) |
Oct
(132) |
Nov
(154) |
Dec
(96) |
2015 |
Jan
(45) |
Feb
(138) |
Mar
(176) |
Apr
(132) |
May
(119) |
Jun
(124) |
Jul
(77) |
Aug
(31) |
Sep
(34) |
Oct
(22) |
Nov
(23) |
Dec
(9) |
2016 |
Jan
(26) |
Feb
(17) |
Mar
(10) |
Apr
(8) |
May
(4) |
Jun
(8) |
Jul
(6) |
Aug
(5) |
Sep
(9) |
Oct
(4) |
Nov
|
Dec
|
2017 |
Jan
(5) |
Feb
(7) |
Mar
(1) |
Apr
(5) |
May
|
Jun
(3) |
Jul
(6) |
Aug
(1) |
Sep
|
Oct
(2) |
Nov
(1) |
Dec
|
2018 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2020 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2025 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
S | M | T | W | T | F | S |
---|---|---|---|---|---|---|
|
|
1
(47) |
2
(13) |
3
(12) |
4
(16) |
5
(3) |
6
(6) |
7
(20) |
8
(45) |
9
(24) |
10
(30) |
11
(14) |
12
(4) |
13
(1) |
14
(6) |
15
(6) |
16
(10) |
17
(15) |
18
(13) |
19
(4) |
20
|
21
(14) |
22
(13) |
23
(9) |
24
(19) |
25
(24) |
26
|
27
(4) |
28
(20) |
29
(17) |
30
(7) |
|
|
|
From: Russell E. O. <ro...@uw...> - 2010-06-30 23:58:32
|
I'm trying to find a matplotlib 0.99.3 binary installer that works with the standard python.org Python (preferably 2.6) and hence works with Mac OS X 10.4 or greater. (I distribute an application that needs to run on a wide range of versions of Mac OS X). The official binary I found refuses to install on my machine claiming it wants system python 2.6 (I happen to be running 10.5 so that's no use to me, and some users of my application are running 10.4). I also tried the egg, but of course it fails -- presumably it's based on the same build. If a binary isn't available I"ll make my own, but I figured I'd check first. -- Russell |
From: P. R.M. <rom...@ho...> - 2010-06-30 23:35:04
|
I have a non-matplotlib related project that requires usage of GSHHS dataset shapefiles. The regular GSHHS dataset doesnt appear to include political boundaries, however the GSHHS dataset used by matplotlib/basemap does include country/border data. I'd like to extract matplotlib/basemap GSHHS country data & convert it to shapefile format. specifically, the following files that are included with matplotlib/basemap: countries_c.dat countries_f.dat countries_h.dat countries_i.dat countries_l.dat countriesmeta_c.dat countriesmeta_f.dat countriesmeta_h.dat countriesmeta_i.dat countriesmeta_l.dat how can I convert these files to shapefile format, or where can I get shapefiles that already include this data & that are based on the GSHHS coastline data? please help, thanks, P.Romero _________________________________________________________________ The New Busy is not the too busy. Combine all your e-mail accounts with Hotmail. http://www.windowslive.com/campaign/thenewbusy?tile=multiaccount&ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_4 |
From: João L. S. <js...@fc...> - 2010-06-30 16:42:21
|
On 06/30/2010 10:40 AM, magnus_p wrote: > > I am trying to plot a spectrum, with lower x axis = velocity, on the upper = > frequency > > The relationship between them (doppler formula) is > f = (1-v/c)*f_0 > where f is the resulting frequency, v the velocity, c the speed of light, > and f_0 the frequency at v=0, ie. the v_lsr. > > I have tried to solve it by looking at > http://matplotlib.sourceforge.net/examples/axes_grid/parasite_simple2.html > http://matplotlib.sourceforge.net/examples/axes_grid/parasite_simple2.html > , where it is solved by > > pm_to_kms = 1./206265.*2300*3.085e18/3.15e7/1.e5 > aux_trans = matplotlib.transforms.Affine2D().scale(pm_to_kms, 1.) > ax_pm = ax_kms.twin(aux_trans) > ax_pm.set_viewlim_mode("transform") > > well, my problem is that it is not a simple scaling law, but a linear > function. > > Anyone know how to solve this? > > Magnus I had a similar problem when I needed to plot some data in terms of frequency and wavelength. See the attached example script. Regards, João Silva |
From: Philippe C. <phi...@gm...> - 2010-06-30 16:24:19
|
Hello, I have a subplot with 4 lines. I display the legend. I can remove a line easily with something like del(self.ax.lines[n]). But how can I remove the line in the legend ? I found that I can remove all the lines, add news ones, but all the lines (new and deleted) remain in the legend. thanks for helping Philippe |
From: Jeremy C. <jlc...@gm...> - 2010-06-30 14:40:00
|
I am trying to plot some data over a mesh using the plot_surface method. However when I plot my data, everything is the same color when I expected to get a nice rainbow of colors as in the example: http://matplotlib.sourceforge.net/examples/mplot3d/surface3d_demo.html I have attached a simple script to show what I did as well as the result. Essentially, I just copied the above demo, but put my own data in. I think the problem arises because I have "holes" in my data, or areas where the data is zero. These zeros throw the scaling off so I tried to eliminate their effect, but this messed everything up. Essentially my question is: how can I get a nice color distribution while at the same time avoid the extreme scaling issues associated with some data being zero (while all the other data is ~16)? Thanks, Jeremy |
From: magnus_p <ma...@sn...> - 2010-06-30 09:41:08
|
I am trying to plot a spectrum, with lower x axis = velocity, on the upper = frequency The relationship between them (doppler formula) is f = (1-v/c)*f_0 where f is the resulting frequency, v the velocity, c the speed of light, and f_0 the frequency at v=0, ie. the v_lsr. I have tried to solve it by looking at http://matplotlib.sourceforge.net/examples/axes_grid/parasite_simple2.html http://matplotlib.sourceforge.net/examples/axes_grid/parasite_simple2.html , where it is solved by pm_to_kms = 1./206265.*2300*3.085e18/3.15e7/1.e5 aux_trans = matplotlib.transforms.Affine2D().scale(pm_to_kms, 1.) ax_pm = ax_kms.twin(aux_trans) ax_pm.set_viewlim_mode("transform") well, my problem is that it is not a simple scaling law, but a linear function. Anyone know how to solve this? Magnus -- View this message in context: http://old.nabble.com/Twiny-and-affine-transform-for-xlim-tp29032627p29032627.html Sent from the matplotlib - users mailing list archive at Nabble.com. |
From: Aman T. <ama...@gm...> - 2010-06-29 20:47:13
|
Hi, Thanks for the suggestions. I also came the same conclusion about ordering the arrays before hand. This did the trick for the zorder, but I also have to make the marker unique for each data point. I need to keep everything into one artist since I'm using a pick event to display the data represented by that point. I'm not sure how I can use just 1 Artist, but get a variety of distinct shapes (circles, squares, and triangles should be sufficient). Thanks so much! Aman PS. Sorry about the duplicate emails Jeff. I forgot to hit "Reply to All" the first time. On Tue, Jun 29, 2010 at 3:39 PM, Jeff Whitaker <js...@fa...> wrote: > On 6/29/10 1:19 PM, Thomas Lecocq wrote: > > Hi, > > What about ordering the arrays before plotting ? Are the first elements > drawn back to front ? > > Thomas > > ********************** > Thomas Lecocq > Geologist > Ph.D.Student (Seismology) > Royal Observatory of Belgium > ********************** > > > > ------------------------------ > Date: Mon, 28 Jun 2010 12:55:22 -0400 > From: ath...@we... > To: mat...@li... > Subject: [Matplotlib-users] zorder for individual points in a scatter plot > on a Basemap > > Hi, > > I'm currently using a scatter plot on a Basemap and I'd like to set the > zorder of the individual points based on their temperature. The higher the > temperature, the higher the zorder. Also, i'm using a colorbar to set the > colors for the plot. Here is a snippet of my code: > > x = np.array(val) > fig.sca(ax1) > lon_0 =(urcrnrlon+llcrnrlon)/2 > lat_0 =(urcrnrlat+llcrnrlat)/2 > m = > Basemap(llcrnrlon=llcrnrlon,llcrnrlat=llcrnrlat,urcrnrlon=urcrnrlon, > > urcrnrlat=urcrnrlat,resolution='i',projection='cyl',lon_0=lon_0,lat_0=lat_0) > m.drawcoastlines() > m.drawmapboundary() > m.drawparallels(np.arange(llcrnrlat-1,urcrnrlat+1,5.)) > m.drawmeridians(np.arange(llcrnrlon-1,urcrnrlon+1,5.)) > m.fillcontinents(color='white',lake_color='aqua') > m.drawcountries(linewidth=1) > lons,lats = m(lon,lat) > > #I can do it this way, but this screws up the colorbar > #for i in range(len(x)): > # > m.scatter(lons[i],lats[i],c=x[i],marker='o',picker=5,zorder=x[i]) > > m.scatter(lons,lats,c=x,marker='o',picker=5) > plt.title('Time Range: %s to %s'%(startDay.strftime("%b-%d > %H:%M"),endDay.strftime("%b-%d %H:%M"))) > plt.colorbar(shrink=0.5) > > Is there anyway to set the zorder of the points without using the loop in > commented code? Any help would be greatly appreciated. > > Thanks, > > > Aman: You can save the mappable from the scatter you want the colorbar to > represent, then pass that to colorbar. i.e. > > im = m.scatter(lons,lats,c=x,marker='o',picker=5) # plot all the pts, save > mappable > # now do one at a time > > for i in range(len(x)): > m.scatter(lons[i],lats[i],c=x[i],marker='o',picker=5,zorder=x[i]) > plt.colorbar(im,shrink=0.5) # use mappable from 1st call to scatter for > colorbar > > -Jeff > > -- > Jeffrey S. Whitaker Phone : (303)497-6313 > Meteorologist FAX : (303)497-6449 > NOAA/OAR/PSD R/PSD1 Email : Jef...@no... > 325 Broadway Office : Skaggs Research Cntr 1D-113 > Boulder, CO, USA 80303-3328 Web : http://tinyurl.com/5telg > > > > ------------------------------------------------------------------------------ > This SF.net email is sponsored by Sprint > What will you do first with EVO, the first 4G phone? > Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > -- Aman Thakral B.Eng & Biosci, M.Eng Design |
From: John H. <jd...@gm...> - 2010-06-29 20:37:01
|
We have uploaded a tarball and Windows and OSX binaries of matplotlib-1.0rc for testing http://drop.io/xortel1# Please report bugs to the tracker: http://sourceforge.net/tracker2/?group_id=80706 A few highlights: * Closed over 100 bugs in past three months -- largely due to the heroic efforts of Eric Firing * Faster magnification of large images, and the ability to zoom in to a single pixel * axes_grid improvements * Local installs of documentation work better * tick_params -- makes it easier to control the properties and locations of ticks * Improved "widgets" -- mouse grabbing is supported * Improved consistency between backends of the "show" function: blocking is more consistent and all backends can call it multiple times * More accurate snapping of lines to pixel boundaries * More consistent handling of color, particularly the alpha channel, throughout the API * image based regression testing, buildbot tests triggered on svn commits * JJs new gridspec is definitely worth a mention and a code snippet and/or screenshot (the trunkdocs link is currently broken http://matplotlib.sourceforge.net/trunk-docs/users/gridspec.html). In this context you may also mention Fernando's "subplots". * enhanced annotation features. * Ian's monumental contour fix: now contourf handles interior masked regions, and the boundaries of line and filled contours coincide CHANGELOG since 0.99: 2010-06-20 Added Axes.tick_params and corresponding pyplot function to control tick and tick label appearance after an Axes has been created. - EF 2010-06-09 Allow Axes.grid to control minor gridlines; allow Axes.grid and Axis.grid to control major and minor gridlines in the same method call. - EF 2010-06-06 Change the way we do split/dividend adjustments in finance.py to handle dividends and fix the zero division bug reported in sf bug 2949906 and 2123566. Note that volume is not adjusted because the Yahoo CSV does not distinguish between share split and dividend adjustments making it near impossible to get volume adjustement right (unless we want to guess based on the size of the adjustment or scrape the html tables, which we don't) - JDH 2010-06-06 Updated dateutil to 1.5 and pytz to 2010h. 2010-06-02 Add error_kw kwarg to Axes.bar(). - EF 2010-06-01 Fix pcolormesh() and QuadMesh to pass on kwargs as appropriate. - RM 2010-05-18 Merge mpl_toolkits.gridspec into the main tree. - JJL 2010-05-04 Improve backend_qt4 so it displays figures with the correct size - DSD 2010-04-20 Added generic support for connecting to a timer for events. This adds TimerBase, TimerGTK, TimerQT, TimerWx, and TimerTk to the backends and a new_timer() method to each backend's canvas to allow ease of creating a new timer. - RM 2010-04-20 Added margins() Axes method and pyplot function. - EF 2010-04-18 update the axes_grid documentation. -JJL 2010-04-18 Control MaxNLocator parameters after instantiation, and via Axes.locator_params method, with corresponding pyplot function. -EF 2010-04-18 Control ScalarFormatter offsets directly and via the Axes.ticklabel_format() method, and add that to pyplot. -EF 2010-04-16 Add a close_event to the backends. -RM 2010-04-06 modify axes_grid examples to use axes_grid1 and axisartist. -JJL 2010-04-06 rebase axes_grid using axes_grid1 and axisartist modules. -JJL 2010-04-06 axes_grid toolkit is splitted into two separate modules, axes_grid1 and axisartist. -JJL 2010-04-05 Speed up import: import pytz only if and when it is needed. It is not needed if the rc timezone is UTC. - EF 2010-04-03 Added color kwarg to Axes.hist(), based on work by Jeff Klukas. - EF 2010-03-24 refactor colorbar code so that no cla() is necessary when mappable is changed. -JJL 2010-03-22 fix incorrect rubber band during the zoom mode when mouse leaves the axes. -JJL 2010-03-21 x/y key during the zoom mode only changes the x/y limits. -JJL 2010-03-20 Added pyplot.sca() function suggested by JJL. - EF 2010-03-20 Added conditional support for new Tooltip API in gtk backend. - EF 2010-03-20 Changed plt.fig_subplot() to plt.subplots() after discussion on list, and changed its API to return axes as a numpy object array (with control of dimensions via squeeze keyword). FP. 2010-03-13 Manually brought in commits from branch ------------------------------------------------------------------------ r8191 | leejjoon | 2010-03-13 17:27:57 -0500 (Sat, 13 Mar 2010) | 1 line fix the bug that handles for scatter are incorrectly set when dpi!=72. Thanks to Ray Speth for the bug report. 2010-03-03 Manually brought in commits from branch via diff/patch (svnmerge is broken) ------------------------------------------------------------------------ r8175 | leejjoon | 2010-03-03 10:03:30 -0800 (Wed, 03 Mar 2010) | 1 line fix arguments of allow_rasterization.draw_wrapper ------------------------------------------------------------------------ r8174 | jdh2358 | 2010-03-03 09:15:58 -0800 (Wed, 03 Mar 2010) | 1 line added support for favicon in docs build ------------------------------------------------------------------------ r8173 | jdh2358 | 2010-03-03 08:56:16 -0800 (Wed, 03 Mar 2010) | 1 line applied Mattias get_bounds patch ------------------------------------------------------------------------ r8172 | jdh2358 | 2010-03-03 08:31:42 -0800 (Wed, 03 Mar 2010) | 1 line fix svnmerge download instructions ------------------------------------------------------------------------ r8171 | jdh2358 | 2010-03-03 07:47:48 -0800 (Wed, 03 Mar 2010) | 1 line 2010-02-25 add annotation_demo3.py that demonstrates new functionality. -JJL 2010-02-25 refactor Annotation to support arbitrary Transform as xycoords or textcoords. Also, if a tuple of two coordinates is provided, they are interpreted as coordinates for each x and y position. -JJL 2010-02-24 Added pyplot.fig_subplot(), to create a figure and a group of subplots in a single call. This offers an easier pattern than manually making figures and calling add_subplot() multiple times. FP 2010-02-17 Added Gokhan's and Mattias' customizable keybindings patch for the toolbar. You can now set the keymap.* properties in the matplotlibrc file. Newbindings were added for toggling log scaling on the x-axis. JDH 2010-02-16 Committed TJ's filled marker patch for left|right|bottom|top|full filled markers. See examples/pylab_examples/filledmarker_demo.py. JDH 2010-02-11 Added 'bootstrap' option to boxplot. This allows bootstrap estimates of median confidence intervals. Based on an initial patch by Paul Hobson. - ADS 2010-02-06 Added setup.cfg "basedirlist" option to override setting in setupext.py "basedir" dictionary; added "gnu0" platform requested by Benjamin Drung. - EF 2010-02-06 Added 'xy' scaling option to EllipseCollection. - EF 2010-02-03 Made plot_directive use a custom PlotWarning category, so that warnings can be turned into fatal errors easily if desired. - FP 2010-01-29 Added draggable method to Legend to allow mouse drag placement. Thanks Adam Fraser. JDH 2010-01-25 Fixed a bug reported by Olle Engdegard, when using histograms with stepfilled and log=True - MM 2010-01-16 Upgraded CXX to 6.1.1 - JDH 2009-01-16 Don't create minor ticks on top of existing major ticks. Patch by Neil Crighton. -ADS 2009-01-16 Ensure three minor ticks always drawn (SF# 2924245). Patch by Neil Crighton. -ADS 2010-01-16 Applied patch by Ian Thomas to fix two contouring problems: now contourf handles interior masked regions, and the boundaries of line and filled contours coincide. - EF 2009-01-11 The color of legend patch follows the rc parameters axes.facecolor and axes.edgecolor. -JJL 2009-01-11 adjustable of Axes can be "box-forced" which allow sharing axes. -JJL 2009-01-11 Add add_click and pop_click methods in BlockingContourLabeler. -JJL 2010-01-03 Added rcParams['axes.color_cycle'] - EF 2010-01-03 Added Pierre's qt4 formlayout editor and toolbar button - JDH 2009-12-31 Add support for using math text as marker symbols (Thanks to tcb) - MGD 2009-12-31 Commit a workaround for a regression in PyQt4-4.6.{0,1} - DSD 2009-12-22 Fix cmap data for gist_earth_r, etc. -JJL 2009-12-20 spines: put spines in data coordinates, add set_bounds() call. -ADS 2009-12-18 Don't limit notch size in boxplot to q1-q3 range, as this is effectively making the data look better than it is. - ADS 2009-12-18 mlab.prctile handles even-length data, such that the median is the mean of the two middle values. - ADS 2009-12-15 Add raw-image (unsampled) support for the ps backend. - JJL 2009-12-14 Add patch_artist kwarg to boxplot, but keep old default. Convert boxplot_demo2.py to use the new patch_artist. - ADS 2009-12-06 axes_grid: reimplemented AxisArtist with FloatingAxes support. Added new examples. - JJL 2009-12-01 Applied Laurent Dufrechou's patch to improve blitting with the qt4 backend - DSD 2009-11-13 The pdf backend now allows changing the contents of a pdf file's information dictionary via PdfPages.infodict. - JKS 2009-11-12 font_manager.py should no longer cause EINTR on Python 2.6 (but will on the 2.5 version of subprocess). Also the fc-list command in that file was fixed so now it should actually find the list of fontconfig fonts. - JKS 2009-11-10 Single images, and all images in renderers with option_image_nocomposite (i.e. agg, macosx and the svg backend when rcParams['svg.image_noscale'] is True), are now drawn respecting the zorder relative to other artists. (Note that there may now be inconsistencies across backends when more than one image is drawn at varying zorders, but this change introduces correct behavior for the backends in which it's easy to do so.) 2009-10-21 Make AutoDateLocator more configurable by adding options to control the maximum and minimum number of ticks. Also add control of the intervals to be used for ticking. This does not change behavior but opens previously hard-coded behavior to runtime modification`. - RMM 2009-10-19 Add "path_effects" support for Text and Patch. See examples/pylab_examples/patheffect_demo.py -JJL 2009-10-19 Add "use_clabeltext" option to clabel. If True, clabels will be created with ClabelText class, which recalculates rotation angle of the label during the drawing time. -JJL 2009-10-16 Make AutoDateFormatter actually use any specified timezone setting.This was only working correctly when no timezone was specified. - RMM 2009-09-27 Beginnings of a capability to test the pdf backend. - JKS 2009-09-27 Add a savefig.extension rcparam to control the default filename extension used by savefig. - JKS |
From: Jeff W. <js...@fa...> - 2010-06-29 19:39:29
|
On 6/29/10 1:19 PM, Thomas Lecocq wrote: > Hi, > > What about ordering the arrays before plotting ? Are the first > elements drawn back to front ? > > Thomas > > ********************** > Thomas Lecocq > Geologist > Ph.D.Student (Seismology) > Royal Observatory of Belgium > ********************** > > > > ------------------------------------------------------------------------ > Date: Mon, 28 Jun 2010 12:55:22 -0400 > From: ath...@we... > To: mat...@li... > Subject: [Matplotlib-users] zorder for individual points in a scatter > plot on a Basemap > > Hi, > > I'm currently using a scatter plot on a Basemap and I'd like to set > the zorder of the individual points based on their temperature. The > higher the temperature, the higher the zorder. Also, i'm using a > colorbar to set the colors for the plot. Here is a snippet of my code: > > x = np.array(val) > fig.sca(ax1) > lon_0 =(urcrnrlon+llcrnrlon)/2 > lat_0 =(urcrnrlat+llcrnrlat)/2 > m = > Basemap(llcrnrlon=llcrnrlon,llcrnrlat=llcrnrlat,urcrnrlon=urcrnrlon, > > urcrnrlat=urcrnrlat,resolution='i',projection='cyl',lon_0=lon_0,lat_0=lat_0) > m.drawcoastlines() > m.drawmapboundary() > m.drawparallels(np.arange(llcrnrlat-1,urcrnrlat+1,5.)) > m.drawmeridians(np.arange(llcrnrlon-1,urcrnrlon+1,5.)) > m.fillcontinents(color='white',lake_color='aqua') > m.drawcountries(linewidth=1) > lons,lats = m(lon,lat) > > #I can do it this way, but this screws up the colorbar > #for i in range(len(x)): > # > m.scatter(lons[i],lats[i],c=x[i],marker='o',picker=5,zorder=x[i]) > > m.scatter(lons,lats,c=x,marker='o',picker=5) > plt.title('Time Range: %s to %s'%(startDay.strftime("%b-%d > %H:%M"),endDay.strftime("%b-%d %H:%M"))) > plt.colorbar(shrink=0.5) > > Is there anyway to set the zorder of the points without using the loop > in commented code? Any help would be greatly appreciated. > > Thanks, > Aman: You can save the mappable from the scatter you want the colorbar to represent, then pass that to colorbar. i.e. im = m.scatter(lons,lats,c=x,marker='o',picker=5) # plot all the pts, save mappable # now do one at a time for i in range(len(x)): m.scatter(lons[i],lats[i],c=x[i],marker='o',picker=5,zorder=x[i]) plt.colorbar(im,shrink=0.5) # use mappable from 1st call to scatter for colorbar -Jeff -- Jeffrey S. Whitaker Phone : (303)497-6313 Meteorologist FAX : (303)497-6449 NOAA/OAR/PSD R/PSD1 Email : Jef...@no... 325 Broadway Office : Skaggs Research Cntr 1D-113 Boulder, CO, USA 80303-3328 Web : http://tinyurl.com/5telg |
From: Thomas L. <thl...@ms...> - 2010-06-29 19:21:08
|
Hi, You can also use Numpy.gradient to compute the gradient , if e.g. your dx and dy aren't the same. Cheers, Thom ********************** Thomas Lecocq Geologist Ph.D.Student (Seismology) Royal Observatory of Belgium ********************** > Date: Tue, 29 Jun 2010 16:28:11 +0200 > From: mat...@li... > To: mat...@li... > Subject: Re: [Matplotlib-users] Displaying the gradient of an image > > Hello, > > I finally found the solution. It's as simple as: > figure(); > imshow(img); > pylab.quiver(U, V, units='x'); > > Mathieu > > ------------------------------------------------------------------------------ > This SF.net email is sponsored by Sprint > What will you do first with EVO, the first 4G phone? > Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users |
From: Thomas L. <thl...@ms...> - 2010-06-29 19:19:40
|
Hi, What about ordering the arrays before plotting ? Are the first elements drawn back to front ? Thomas ********************** Thomas Lecocq Geologist Ph.D.Student (Seismology) Royal Observatory of Belgium ********************** Date: Mon, 28 Jun 2010 12:55:22 -0400 From: ath...@we... To: mat...@li... Subject: [Matplotlib-users] zorder for individual points in a scatter plot on a Basemap Hi, I'm currently using a scatter plot on a Basemap and I'd like to set the zorder of the individual points based on their temperature. The higher the temperature, the higher the zorder. Also, i'm using a colorbar to set the colors for the plot. Here is a snippet of my code: x = np.array(val) fig.sca(ax1) lon_0 =(urcrnrlon+llcrnrlon)/2 lat_0 =(urcrnrlat+llcrnrlat)/2 m = Basemap(llcrnrlon=llcrnrlon,llcrnrlat=llcrnrlat,urcrnrlon=urcrnrlon, urcrnrlat=urcrnrlat,resolution='i',projection='cyl',lon_0=lon_0,lat_0=lat_0) m.drawcoastlines() m.drawmapboundary() m.drawparallels(np.arange(llcrnrlat-1,urcrnrlat+1,5.)) m.drawmeridians(np.arange(llcrnrlon-1,urcrnrlon+1,5.)) m.fillcontinents(color='white',lake_color='aqua') m.drawcountries(linewidth=1) lons,lats = m(lon,lat) #I can do it this way, but this screws up the colorbar #for i in range(len(x)): # m.scatter(lons[i],lats[i],c=x[i],marker='o',picker=5,zorder=x[i]) m.scatter(lons,lats,c=x,marker='o',picker=5) plt.title('Time Range: %s to %s'%(startDay.strftime("%b-%d %H:%M"),endDay.strftime("%b-%d %H:%M"))) plt.colorbar(shrink=0.5) Is there anyway to set the zorder of the points without using the loop in commented code? Any help would be greatly appreciated. Thanks, Aman |
From: SurendraMohan J <sur...@co...> - 2010-06-29 19:06:05
|
HI, One of our client needs training requirement on MatPlotLib software" which is used to plot graphs in Hyderabad. If you are comfortable to handle this training please send us your updated profile, course content with commercials ASAP. Revert back for any clarifications. Have a Nice Day!!! Thanks & Regards, SurendraMohan J Cogent Solutions, 208, Maximus Towers 2B | Mind Space | Raheja IT Park | Madhapur | Hyderabad - 500081. Mobile : 9247577244 & 9502782872 Land : 040-40205020/21/22 Emaile : sur...@co... | sur...@gm... Website : www.cogentsolutions.in |
From: Ranjit C. <rjc...@gm...> - 2010-06-29 18:40:07
|
I finally got it to work. I did the compilation of matplotlib with: sudo make -f make.osx fetch deps mpl_build mpl_install sudo python setup.py install as described here: http://blog.hyperjeff.net/?p=160 The first command correctly compiled matplotlib but installed it to /usr/local. The second command incorrectly compiled matplotlib and installed it in the Framework. Copying ft2font.so over from the /usr/local installation fixed the problem "Abort trap" problem. On Tue, Jun 29, 2010 at 9:56 AM, Ranjit Chacko <rjc...@gm...> wrote: > I just recompiled freetype-2.4.12 and checked the version of > /usr/local/lib/libfreetype.6.dylib with otool -l: > Load command 3 > cmd LC_ID_DYLIB > cmdsize 64 > name /usr/local/lib/libfreetype.6.dylib (offset 24) > time stamp 1 Wed Dec 31 16:00:01 1969 > current version 11.0.0 > compatibility version 11.0.0 > > And I checked matplotlib's ft2font.so with otool -L: > > ft2font.so: > /usr/local/lib/libfreetype.6.dylib (compatibility version 11.0.0, > current version 11.0.0) > /usr/local/lib/libz.1.dylib (compatibility version 1.0.0, current > version 1.2.5) > /usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current > version 7.9.0) > /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current > version 125.2.0) > /usr/local/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current > version 1.0.0) > > And now that they match I get "Abort trap" on loading matplotlib.pyplot and > it looks as if ft2font.so has something to do with it: > > > Thread 0 Crashed: Dispatch queue: com.apple.main-thread > 0 libSystem.B.dylib 0x00007fff84a893d6 __kill + 10 > 1 libSystem.B.dylib 0x00007fff84b29972 abort + 83 > 2 libgcc_s.1.dylib 0x0000000100487d51 uw_init_context_1 > + 385 > 3 libgcc_s.1.dylib 0x00000001004884cc _Unwind_Resume + > 76 > 4 ft2font.so 0x00000001017b046d > FT2Font::FT2Font(std::string) + 4269 (Extensions.hxx:629) > 5 ft2font.so 0x00000001017b0af8 > ft2font_module::new_ft2font( > Py::Tuple const&) + 408 (ft2font.cpp:1728) > 6 ft2font.so 0x00000001017b3d52 > Py::ExtensionModule<ft2font_module>::invoke_method_varargs(std::string > const&, Py::Tuple const&) + 162 (Extensions.hxx:422) > 7 ft2font.so 0x00000001017c25a0 > method_varargs_call_handler + 512 > > It looks like the sage developers encountered this problem and this is how > they fixed it: > http://trac.sagemath.org/sage_trac/ticket/7022 > > All it does is take the plane vanilla matplotlib-0.99.1.spkg spkg and add a > little script that simply rebuilds f2font.so again using *exactly* the same > command lines used by distutils to build that extension. That's it. For some > reason -- probably involving environment variables (?) -- this fixes the > problem. I consider this a temporary 1-sage release solution until the > matplotlib developers (or me) come up with a real fix. > > How do I rebuild f2font.so? > > > >> >> |
From: Ranjit C. <rjc...@gm...> - 2010-06-29 16:56:16
|
I just recompiled freetype-2.4.12 and checked the version of /usr/local/lib/libfreetype.6.dylib with otool -l: Load command 3 cmd LC_ID_DYLIB cmdsize 64 name /usr/local/lib/libfreetype.6.dylib (offset 24) time stamp 1 Wed Dec 31 16:00:01 1969 current version 11.0.0 compatibility version 11.0.0 And I checked matplotlib's ft2font.so with otool -L: ft2font.so: /usr/local/lib/libfreetype.6.dylib (compatibility version 11.0.0, current version 11.0.0) /usr/local/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.5) /usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 7.9.0) /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 125.2.0) /usr/local/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1.0.0) And now that they match I get "Abort trap" on loading matplotlib.pyplot and it looks as if ft2font.so has something to do with it: Thread 0 Crashed: Dispatch queue: com.apple.main-thread 0 libSystem.B.dylib 0x00007fff84a893d6 __kill + 10 1 libSystem.B.dylib 0x00007fff84b29972 abort + 83 2 libgcc_s.1.dylib 0x0000000100487d51 uw_init_context_1 + 385 3 libgcc_s.1.dylib 0x00000001004884cc _Unwind_Resume + 76 4 ft2font.so 0x00000001017b046d FT2Font::FT2Font(std::string) + 4269 (Extensions.hxx:629) 5 ft2font.so 0x00000001017b0af8 ft2font_module::new_ft2font( Py::Tuple const&) + 408 (ft2font.cpp:1728) 6 ft2font.so 0x00000001017b3d52 Py::ExtensionModule<ft2font_module>::invoke_method_varargs(std::string const&, Py::Tuple const&) + 162 (Extensions.hxx:422) 7 ft2font.so 0x00000001017c25a0 method_varargs_call_handler + 512 It looks like the sage developers encountered this problem and this is how they fixed it: http://trac.sagemath.org/sage_trac/ticket/7022 All it does is take the plane vanilla matplotlib-0.99.1.spkg spkg and add a little script that simply rebuilds f2font.so again using *exactly* the same command lines used by distutils to build that extension. That's it. For some reason -- probably involving environment variables (?) -- this fixes the problem. I consider this a temporary 1-sage release solution until the matplotlib developers (or me) come up with a real fix. How do I rebuild f2font.so? > > |
From: Bartosz T. <b.t...@bi...> - 2010-06-29 15:39:36
|
Hi all, I am trying to change the labels of minor ticks, but leave the labels of the major ticks unchanged. To do this, I use the following function: ax = plt.subplot(111) ax.set_xticks([1,3,5]) ax.set_xticks([2,4], minor=True) ax.set_xticklabels(["a", "b"], minor=True) However, in result of the function both minor and major tick labels are changes. I checked the source code of XAxis.set_ticklabels and it contains following lines: axis.py: lines 1335-1342 if minor: self.set_minor_formatter(mticker.FixedFormatter(ticklabels)) ticks = self.get_minor_ticks() else: self.set_major_formatter( mticker.FixedFormatter(ticklabels) ) ticks = self.get_major_ticks() self.set_major_formatter( mticker.FixedFormatter(ticklabels) ) Note that the last lines sets the major tick formatter regardless of the "minor" argument. Is it intentional behaviour? Yours, Bartosz |
From: Mathieu D. <mat...@li...> - 2010-06-29 14:28:19
|
Hello, I finally found the solution. It's as simple as: figure(); imshow(img); pylab.quiver(U, V, units='x'); Mathieu |
From: ninjasmith <hen...@gm...> - 2010-06-29 13:52:35
|
hi there, I've got a bit stuck with running matplotlib in interactive mode. maybe what I want to do can't be done easily. want I want is a simple python script which I can run with a file argument. this will then create some plots. the script will wait for user input (via sys.stdin.readline()), use the input to adjust a threshold and replot my plots. after the user is satisfied with the thresholds the script exit the loop and will perform other processing. Basically I'm trying to get a simple interactive program with plots but without having use wxpython or simliar I have been trying to test the potting part of this. I have successfully set interactive mode on and from the python interpreter I can plot and I see my plots and updates to them without needing to use pyplot.show(). when I run the same scripts by using 'python scriptname.py' I don't see the plots unless I use pyplot.show(). my simple test script is as follows ############ #test interactive matplotlib plotting import numpy as np import sys import matplotlib.pylab as pyp a=np.array([0,4,5,5,3,4,5]) pyp.figure() pyp.plot(a) #pyp.show() input=sys.stdin.readline() pyp.xlabel('my xlabel %s' %input) input=sys.stdin.readline() any help much appreciated -- View this message in context: http://old.nabble.com/matplotlib-in-interactive-mode-from-a-script-tp29023641p29023641.html Sent from the matplotlib - users mailing list archive at Nabble.com. |
From: John H. <jd...@gm...> - 2010-06-29 13:25:44
|
On Fri, Jun 11, 2010 at 8:49 PM, Eric Firing <ef...@ha...> wrote: >> Do you have access to Sun SPARC hardware? If not, I can almost certainly arrange >> access to a Sun T5240 (16 core) at the University of Washington for a serious >> matplotlib developer. > > Dave, > > Thanks, but much as I would like to see this problem solved, I don't > really want to get sucked into it. I haven't messed with Suns for many > years, and I am not eager to resume. > > Did you compile the previous version of matplotlib that you used on your > machine, or did someone else there do it? > > Have you looked at the Cookbook entry? > http://www.scipy.org/Cookbook/Matplotlib/CompilingMatPlotLibOnSolaris10 This issue is new and not related to the issue on the cookbook, I'm pretty sure. I have the same problem on my box at work, and it was introduced when I upgraded to CXX6. I have spent some time on it but haven't found the fix yet. I guess it's my bug :-( I've added it to the tracker: https://sourceforge.net/tracker/?func=detail&aid=3022815&group_id=80706&atid=560720 |
From: Alexander D. <ale...@go...> - 2010-06-29 10:37:01
|
Hi Friedrich, thanks a lot, that was exactly what I was looking for... Alex On Mon, Jun 28, 2010 at 23:00, Friedrich Romstedt < fri...@gm...> wrote: > 2010/6/28 Alexander Dietz <ale...@go...>: > > I have a plot, to which I am drawing a colorbar. The standard colorbar > > ranges from the values -1 (blue) over 0 (green) to e.g. 1(red). So far so > > good. > > But now I want to change the colorbar that it shows only the colors > between > > 0 and 1. What I mean is: the colorbar should start at value 0 (with > green) > > and go to 1(red), and leave the original plot unchanged. > > Ah, it wasn't that easy (for me). > > Friedrich > |
From: Mathieu D. <mat...@li...> - 2010-06-29 09:44:33
|
Hello, I'm playing with some image processing algorithm (HOG descriptor) and I'm a bit lost. I am a newbie in image processing (especially in python). I have computed the vertical and horizontal gradients of an image (convolution with [-1, 0, 1] on the 0 and 1 axis respectively). After that I computed the gradient' magnitude (sqrt(horizontal_gradient**2 + vertical_gradient**2)) and orientation (arctan2(vertical_gradient, horizontal_gradient)). Now I would like to display the original image with the gradient vector. The quiver() function allows to plot vector fields and it's pretty easy to convert the gradient' magnitude and orientation into U and V (U =grad_mag*cos(grad_orientation), V = grad_mag*sin(grad_orientation)) but I cannot figure out how to display the image and the gradient with the right orientation. Can anyone help? Thanks in advance, Mathieu |
From: Friedrich R. <fri...@gm...> - 2010-06-29 07:34:07
|
2010/6/29 Ranjit Chacko <rjc...@gm...>: > I tried again by compiling version 2.4.11 of freetype instead of the latest > and recompiling matplotlib with that and now I get the following less severe > error: > Reason: Incompatible library version: ft2font.so requires version 11.0.0 > or later, but libfreetype.6.dylib provides version 10.0.0 Hmm, I'm using freetype 2.3.12 and yesterday it compiled fine with this. It guess it has some very simple reason, maybe you forgot to remove the old compilation result or something like this? :-) Good luck, Friedrich |
From: Ranjit C. <rjc...@gm...> - 2010-06-29 02:00:08
|
I tried again by compiling version 2.4.11 of freetype instead of the latest and recompiling matplotlib with that and now I get the following less severe error: Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/pyplot.py", line 6, in <module> from matplotlib.figure import Figure, figaspect File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/figure.py", line 18, in <module> from axes import Axes, SubplotBase, subplot_class_factory File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/axes.py", line 12, in <module> import matplotlib.axis as maxis File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/axis.py", line 10, in <module> import matplotlib.font_manager as font_manager File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/font_manager.py", line 52, in <module> from matplotlib import ft2font ImportError: dlopen(/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/ft2font.so, 2): Library not loaded: /usr/local/lib/libfreetype.6.dylib Referenced from: /Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/ft2font.so Reason: Incompatible library version: ft2font.so requires version 11.0.0 or later, but libfreetype.6.dylib provides version 10.0.0 On Mon, Jun 28, 2010 at 5:43 PM, Ranjit Chacko <rjc...@gm...> wrote: > I've been having some trouble with compiling matplotlib on Snow Leopard. I > managed to get rid of all my old problems by recompiling everything with > gcc-4.2. > > But now when I import matplotlib.pyplot I get an Abort trap message and > python quits. Here is part of the error message I get: > > Thread 0 Crashed: Dispatch queue: com.apple.main-thread > 0 libSystem.B.dylib 0x00007fff84a893d6 __kill + 10 > 1 libSystem.B.dylib 0x00007fff84b29972 abort + 83 > 2 libgcc_s.1.dylib 0x0000000100487d51 uw_init_context_1 > + 385 > 3 libgcc_s.1.dylib 0x00000001004884cc _Unwind_Resume + > 76 > 4 ft2font.so 0x00000001017b046d > FT2Font::FT2Font(std::string) + 4269 (Extensions.hxx:629) > 5 ft2font.so 0x00000001017b0af8 > ft2font_module::new_ft2font(Py::Tuple const&) + 408 (ft2font.cpp:1728) > 6 ft2font.so 0x00000001017b3d52 > Py::ExtensionModule<ft2font_module>::invoke_method_varargs(std::string > const&, Py::Tuple const&) + 162 (Extensions.hxx:422) > 7 ft2font.so 0x00000001017c25a0 > method_varargs_call_handler + 512 > > It seems like freetype is the problem and from a little googling I see that > the sage developers also had a problem with this. Does anyone know how to > fix this? > > Thanks, > > -Ranjit > > |
From: Ranjit C. <rjc...@gm...> - 2010-06-29 00:43:19
|
I've been having some trouble with compiling matplotlib on Snow Leopard. I managed to get rid of all my old problems by recompiling everything with gcc-4.2. But now when I import matplotlib.pyplot I get an Abort trap message and python quits. Here is part of the error message I get: Thread 0 Crashed: Dispatch queue: com.apple.main-thread 0 libSystem.B.dylib 0x00007fff84a893d6 __kill + 10 1 libSystem.B.dylib 0x00007fff84b29972 abort + 83 2 libgcc_s.1.dylib 0x0000000100487d51 uw_init_context_1 + 385 3 libgcc_s.1.dylib 0x00000001004884cc _Unwind_Resume + 76 4 ft2font.so 0x00000001017b046d FT2Font::FT2Font(std::string) + 4269 (Extensions.hxx:629) 5 ft2font.so 0x00000001017b0af8 ft2font_module::new_ft2font(Py::Tuple const&) + 408 (ft2font.cpp:1728) 6 ft2font.so 0x00000001017b3d52 Py::ExtensionModule<ft2font_module>::invoke_method_varargs(std::string const&, Py::Tuple const&) + 162 (Extensions.hxx:422) 7 ft2font.so 0x00000001017c25a0 method_varargs_call_handler + 512 It seems like freetype is the problem and from a little googling I see that the sage developers also had a problem with this. Does anyone know how to fix this? Thanks, -Ranjit |
From: Friedrich R. <fri...@gm...> - 2010-06-28 21:00:07
|
2010/6/28 Alexander Dietz <ale...@go...>: > I have a plot, to which I am drawing a colorbar. The standard colorbar > ranges from the values -1 (blue) over 0 (green) to e.g. 1(red). So far so > good. > But now I want to change the colorbar that it shows only the colors between > 0 and 1. What I mean is: the colorbar should start at value 0 (with green) > and go to 1(red), and leave the original plot unchanged. Ah, it wasn't that easy (for me). Friedrich |
From: Ranjit C. <rjc...@gm...> - 2010-06-28 20:53:25
|
It didn't work. But I may have misunderstood your instructions. Here's the output from compiling matplotlib: http://pastebin.org/363870 Here's what I did. Set export CC=gcc-4.2 Set export MACOSX_DEPLOYMENT_TARGET=10.5 Downloaded and compiled libpng-1.4.3 Downloaded and compiled libfreetype-2.3.12 Downloaded matplotlib-0.99.3 Modified src/_png.cpp in matplotlib Replaced setupext.py with your version. sudo python setup.py build sudo python setup.py install Any obvious mistakes? Thanks again for your help, -Ranjit On Mon, Jun 28, 2010 at 1:05 PM, Friedrich Romstedt < fri...@gm...> wrote: > 2010/6/28 Ranjit Chacko <rjc...@gm...>: > > I just tried compiling with the following command: > > sudo make -f make.osx fetch deps mpl_build mpl_install > > I don't know, I saw now so many people running into trouble with > make.osx, would you, as a test case, please apply the following steps > to your installation: > > First, I see that the freetype is linked in statically, but still it > cannot be loaded on startup time (this _something_foobar symbol seems > the first one it attemts to load). I remember that make.osx is > intended for binary distributable generation, and therefore it links > statically. > > I want to propose a different solution here. > > Would you please modify first your matplotlib setupext.py in the > following way. We'll attemt a build without make.osx and fetch etc., > but a real distutil build with dynamic linking :-) !: > > On the line with 'darwin' : [], add: > > 'darwin' : ['/usr/local'], > > and maybe also '/usr/X11/lib' or '/usr/X11' and let the /lib suffix > alone, but I think as you installed pkg-config, it could maybe work > also out of the box. For me, I were not aware of pkg-config for OS X, > so I still don't have it :-). If you are not sure, simply try to run > pkg-config in the console, by tab expansion, if it finds it, it's > installed. > > I also attach the modified files for your convenience, but you should > use diff because I built that time 0.99.1.2, and something may have > changed by that. > > Then, please compile (if you did not already do that), libpng 1.4 (not > 1.2!) and libfreetype2 from the official sources. Always use the > following environment variables: > > export CC=gcc-4.2 > (To not use 4.0 occasionally) > export MACOSX_DEPLOYMENT_TARGET=10.5 > (To avoid certain warnings which are quite annoying during build. If > you attemt to use py2app for deployment on 10.3 or 10.4 you should > modify of course.) > > It is important that you compile *all* your software which is > incorporated with the same variables. Well, at least I by accident > one time set _TARGET to another value after ./configure, and it > refused to compile then. So, feel free to experiment, but please > document properly and, most important, tell us the results! I'm still > in the ascending branch of my OS X learning curve. > > Maybe now it's the right moment to compile Python (1.6.5, I think not > 1.7) and then numpy again with this settings. For Python, use > > ./configure --enable-framework > > Then compile libfreetype2. Compile libpng 1.4 or whatever. > > Now it's time to compile matplotlib itself. Just use the usual flags, > and, for me, it worked like a charm. But one modification has to be > made: matplotlib isn't compatible with libpng 1.4 from the beginning, > please add the following lines to src/_png.cpp: > > #define png_infopp_NULL (png_infopp)NULL > #define int_p_NULL (int*)NULL > > Somewhere before the actual code, it doesn't matter where, but after > the #include <png.cpp> of course. I also attach the file, same > applies, run diff before. It's my obligation to provide a proper > matplotlib patch for this issue, but for now please patch by hand. > > There are several reasons why to compile Python yourself: It will use > the new Tcl/Tk, which is much more beautiful than the old one. It > will compile with the compatible flags. Well that's it I think. If > you intend to use PIL btw, you have to compile Python yourself. > > Now you should be done. If you run into some problems, please tell us. > > Friedrich > |