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
(1) |
2
|
3
|
4
|
5
(10) |
6
|
7
(3) |
8
(5) |
9
|
10
(3) |
11
(1) |
12
(16) |
13
(1) |
14
|
15
(5) |
16
(5) |
17
(4) |
18
(2) |
19
(9) |
20
(4) |
21
(2) |
22
|
23
(1) |
24
|
25
(4) |
26
(6) |
27
(9) |
28
(1) |
29
(2) |
30
|
|
|
|
|
|
From: Sturla M. <stu...@gm...> - 2014-06-29 20:35:13
|
"Dawes, Andrew M." <da...@pa...> wrote: > Any suggestions/hacks are welcome! Mayavi (a VTK-based plotting tool) is much better for 3D plots: http://docs.enthought.com/mayavi/mayavi/auto/examples.html http://docs.enthought.com/mayavi/mayavi/mlab.html Sturla |
From: Philippe Mallet-L. <phi...@ce...> - 2014-06-29 19:06:28
|
Hello, I try to threshold an image manually by using a slider widget to set the threshold value (I don’t binarize my image, but mask it). I superimpose my thresholded image to the original according to a colormap. I cannot figure out why if I put the initial threshold to the max value of my original image, my thresolded one is monochrome while with another initial value, it follows the colormap. Here is my code (change `f0 = gray_data.max()` to `f0 = gray_data.max() / 2` to see the difference): ''' import numpy as np import matplotlib.pyplot as plt from matplotlib.widgets import Slider # Generate some data... gray_data = np.arange(10000).reshape(100, 100) fig, ax = plt.subplots() fig.subplots_adjust(bottom=0.25) ax.matshow(gray_data, cmap=plt.cm.gray) axcolor = 'lightgoldenrodyellow' axthresh = fig.add_axes([0.25, 0.1, 0.65, 0.03], axisbg=axcolor) f0 = gray_data.max() sthresh = Slider(axthresh, 'threshold', gray_data.min(), gray_data.max(), valinit=f0) mask = gray_data < f0 masked = np.ma.array(gray_data, mask=mask) masked_ax = ax.imshow(masked, alpha=0.5) def update(val): threshold = sthresh.val mask = gray_data < threshold masked.mask = mask masked_ax.set_data(masked) fig.canvas.draw_idle() sthresh.on_changed(update) plt.show() ''' Thank you for your help. |
From: Eric F. <ef...@ha...> - 2014-06-28 07:20:54
|
On 2014/06/27, 9:59 AM, zunbeltz wrote: > I have a script that fetchs data from a database and plot using > something similar to > > fig, (ax1, ax3) = plt.subplots(2, 1, sharex=False, sharey=False, num=fignum) > ax1.errorbar(...) > title(...) > ax2 = ax1.twiny() > ax4 = ax2.twiny() > ... > plt.legent() > plt.draw() > > Then, I call this script with plt.ion() and I use plt.show(block=True); > so the plot stays opened. > > Now, I want to rerun the script every second to get the updated data > from the database. Is it posible to have the plot no blocking the script > and being refresh? You might find that plt.pause(1) is helpful. See pylab_examples/animation_demo.py. Also, it sounds like running via ipython, if possible, would make things easier for you; it takes care of all sorts of difficulties with interactivity. And it's wonderfully helpful in other ways as well. > > I try to use block=False but this makes that the plot is not shown. I > want to change my original script as little as possible. One posible > idea I have is to pickle the plot (in the original script); and use > another script that opens the pickled file every second. That sounds overly complex and roundabout. I'm sure that one or more of the suggestions above can lead to a simple solution. Eric > > TIA > > Zunbeltz > (posted unsuccessfully at stackoverflow) > > > ------------------------------------------------------------------------------ > Open source business process management suite built on Java and Eclipse > Turn processes into business applications with Bonita BPM Community Edition > Quickly connect people, data, and systems into organized workflows > Winner of BOSSIE, CODIE, OW2 and Gartner awards > http://p.sf.net/sfu/Bonitasoft > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > |
From: Dawes, A. M. <da...@pa...> - 2014-06-27 18:04:35
|
Thanks Ben for the tip on edgecolor. I’ve got what I wanted now and since it took some digging and tinkering I figured I’d write it up and share the solution with anyone who may want it: https://dawes.wordpress.com/2014/06/27/publication-ready-3d-figures-from-matplotlib/ and full test-case script here: https://github.com/DawesLab/Qfunction/blob/master/TestQfunc.py This creates two surface plots with contours below them, labels placed tight to the axes, and some other bits that make it work well for publishing in a two-column journal (black & white, color online). I’m happy to format and post this to the official documentation if that would be helpful. Best, Andy -- Andrew M.C. Dawes Associate Professor of Physics Pacific University amcdawes.com On June 26, 2014 at 6:27:10 PM, Benjamin Root (ben...@ou...<mailto:ben...@ou...>) wrote: If you supply the code you did to get where you got, I have a rough idea how to get what you need. Essentially, you need to set the edgecolor of the panes, I think. I have to dig a bit in the code to see how to do that, though. Cheers! Ben Root On Thu, Jun 26, 2014 at 7:42 PM, Dawes, Andrew M. <da...@pa...<mailto:da...@pa...>> wrote: I’m trying to plot a 3d surface with a box frame around both sides (see example in the following link) comparable example: http://cloud.originlab.com/www/products/images2/3DGraph_ColorSurface.png I made the axis panes white and disabled the grid which gets me 80% of the way. I don’t see anything obvious for showing additional axis lines to make the rest of the box (if such an option exists). Any suggestions/hacks are welcome! Thanks, Andy -- Andrew M.C. Dawes Associate Professor of Physics Pacific University amcdawes.com<http://amcdawes.com> ------------------------------------------------------------------------------ Open source business process management suite built on Java and Eclipse Turn processes into business applications with Bonita BPM Community Edition Quickly connect people, data, and systems into organized workflows Winner of BOSSIE, CODIE, OW2 and Gartner awards http://p.sf.net/sfu/Bonitasoft _______________________________________________ Matplotlib-users mailing list Mat...@li...<mailto:Mat...@li...> https://lists.sourceforge.net/lists/listinfo/matplotlib-users |
From: Benjamin R. <ben...@ou...> - 2014-06-27 14:23:37
|
actually, that is technically incorrect. That only works for monotonically increasing series, but not monotonically decreasing series. diffs = np.diff(lon) if np.all(diffs <= 0): return True if np.all(diffs >= 0): return True return False provided that len(lon) >= 2, obviously (and it doesn't work right for 2 or more dimensions). Ben Root On Fri, Jun 27, 2014 at 10:03 AM, Jason Swails <jas...@gm...> wrote: > On Thu, 2014-06-26 at 23:14 -0700, billyi wrote: > > Oh my, it WAS the meshgrid! Thank you so much! > > When reading the coordinates like: > > lat = FB.variables['lat'][:,:] > > lon = FB.variables['lon'][:,:] > > > > And plotting (without meshgrid!): > > m.pcolormesh(lon, lat, masked_fb, latlon=True) > > > > it works! Now I feel stupid. > > And I think the longitudes and latitudes are not monotonic, but I don't > know > > the way to check this, other than checking the array like lon[:] in > > terminal. Is there a better way? > > Yes. Consider: > > py> all(lon[:-1] <= lon[1:]) > > If True, then lon is monotonically increasing. Otherwise it's not. > > Description: > > lon[:-1] is a slice that takes every element of lon except the last one. > lon[1:] is a slice that takes every element of lon except the first one. > The comparison operator will create a bool numpy array whose elements > will be True for each element "i" if the i'th element is less than or > equal to the i+1'th element. Applying the "all" (or numpy.all) > functions to this bool array will return True if every element is true > and False otherwise. > > Faster, easier, and less error-prone than printing out the array and > checking it yourself. Of course you could do something more explicit: > > py> monotonic = True > py> for i in range(len(lon)-1): > py> if lon[i] > lon[i+1]: > py> monotonic = False > py> break > > HTH, > Jason > > > > ------------------------------------------------------------------------------ > Open source business process management suite built on Java and Eclipse > Turn processes into business applications with Bonita BPM Community Edition > Quickly connect people, data, and systems into organized workflows > Winner of BOSSIE, CODIE, OW2 and Gartner awards > http://p.sf.net/sfu/Bonitasoft > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > |
From: Jason S. <jas...@gm...> - 2014-06-27 14:00:35
|
On Thu, 2014-06-26 at 23:14 -0700, billyi wrote: > Oh my, it WAS the meshgrid! Thank you so much! > When reading the coordinates like: > lat = FB.variables['lat'][:,:] > lon = FB.variables['lon'][:,:] > > And plotting (without meshgrid!): > m.pcolormesh(lon, lat, masked_fb, latlon=True) > > it works! Now I feel stupid. > And I think the longitudes and latitudes are not monotonic, but I don't know > the way to check this, other than checking the array like lon[:] in > terminal. Is there a better way? Yes. Consider: py> all(lon[:-1] <= lon[1:]) If True, then lon is monotonically increasing. Otherwise it's not. Description: lon[:-1] is a slice that takes every element of lon except the last one. lon[1:] is a slice that takes every element of lon except the first one. The comparison operator will create a bool numpy array whose elements will be True for each element "i" if the i'th element is less than or equal to the i+1'th element. Applying the "all" (or numpy.all) functions to this bool array will return True if every element is true and False otherwise. Faster, easier, and less error-prone than printing out the array and checking it yourself. Of course you could do something more explicit: py> monotonic = True py> for i in range(len(lon)-1): py> if lon[i] > lon[i+1]: py> monotonic = False py> break HTH, Jason |
From: Joel B. M. <jo...@ki...> - 2014-06-27 10:09:26
|
On 06/27/2014 02:14 AM, billyi wrote: > And I think the longitudes and latitudes are not monotonic, but I don't know > the way to check this, other than checking the array like lon[:] in > terminal. Is there a better way? numpy slicing (subtract prior from next element check that 'all' the results are >=0): In [1]: import numpy In [2]: x=numpy.array([1,2,3,4,5]) In [3]: (x[1:]-x[:-1])>=0 Out[3]: array([ True, True, True, True], dtype=bool) In [4]: numpy.all((x[1:]-x[:-1])>=0) Out[4]: True In [5]: x=numpy.array([1,3,2,5,4]) In [6]: numpy.all((x[1:]-x[:-1])>=0) Out[6]: False |
From: zunbeltz <zun...@gm...> - 2014-06-27 07:59:45
|
I have a script that fetchs data from a database and plot using something similar to fig, (ax1, ax3) = plt.subplots(2, 1, sharex=False, sharey=False, num=fignum) ax1.errorbar(...) title(...) ax2 = ax1.twiny() ax4 = ax2.twiny() ... plt.legent() plt.draw() Then, I call this script with plt.ion() and I use plt.show(block=True); so the plot stays opened. Now, I want to rerun the script every second to get the updated data from the database. Is it posible to have the plot no blocking the script and being refresh? I try to use block=False but this makes that the plot is not shown. I want to change my original script as little as possible. One posible idea I have is to pickle the plot (in the original script); and use another script that opens the pickled file every second. TIA Zunbeltz (posted unsuccessfully at stackoverflow) |
From: Nils W. <ni...@go...> - 2014-06-27 07:28:56
|
Hi all, how can I resolve the problem described at http://community.coreldraw.com/forums/p/31103/146512.aspx Nils |
From: billyi <bil...@ho...> - 2014-06-27 06:15:02
|
Oh my, it WAS the meshgrid! Thank you so much! When reading the coordinates like: lat = FB.variables['lat'][:,:] lon = FB.variables['lon'][:,:] And plotting (without meshgrid!): m.pcolormesh(lon, lat, masked_fb, latlon=True) it works! Now I feel stupid. And I think the longitudes and latitudes are not monotonic, but I don't know the way to check this, other than checking the array like lon[:] in terminal. Is there a better way? And thank you again! Bill Wang -- View this message in context: http://matplotlib.1069221.n5.nabble.com/Data-plotting-in-a-wrong-place-tp43580p43588.html Sent from the matplotlib - users mailing list archive at Nabble.com. |
From: Benjamin R. <ben...@ou...> - 2014-06-27 01:27:20
|
If you supply the code you did to get where you got, I have a rough idea how to get what you need. Essentially, you need to set the edgecolor of the panes, I think. I have to dig a bit in the code to see how to do that, though. Cheers! Ben Root On Thu, Jun 26, 2014 at 7:42 PM, Dawes, Andrew M. <da...@pa...> wrote: > I’m trying to plot a 3d surface with a box frame around both sides (see > example in the following link) > > comparable example: > http://cloud.originlab.com/www/products/images2/3DGraph_ColorSurface.png > > I made the axis panes white and disabled the grid which gets me 80% of > the way. I don’t see anything obvious for showing additional axis lines to > make the rest of the box (if such an option exists). > > Any suggestions/hacks are welcome! > > Thanks, Andy > > > -- > Andrew M.C. Dawes > Associate Professor of Physics > Pacific University > amcdawes.com > > > ------------------------------------------------------------------------------ > Open source business process management suite built on Java and Eclipse > Turn processes into business applications with Bonita BPM Community Edition > Quickly connect people, data, and systems into organized workflows > Winner of BOSSIE, CODIE, OW2 and Gartner awards > http://p.sf.net/sfu/Bonitasoft > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > |
From: Dawes, A. M. <da...@pa...> - 2014-06-27 00:17:26
|
I’m trying to plot a 3d surface with a box frame around both sides (see example in the following link) comparable example: http://cloud.originlab.com/www/products/images2/3DGraph_ColorSurface.png I made the axis panes white and disabled the grid which gets me 80% of the way. I don’t see anything obvious for showing additional axis lines to make the rest of the box (if such an option exists). Any suggestions/hacks are welcome! Thanks, Andy -- Andrew M.C. Dawes Associate Professor of Physics Pacific University amcdawes.com |
From: Benjamin R. <ben...@ou...> - 2014-06-26 14:52:47
|
don't know if this would make a difference, but meshgrid here is completely unnecessary given that the netcdf file has the lats and lons in 2 dimensions anyway. Given that this is a polar projection, I wouldn't be surprised if there is something wonky there. Are the longitudes and latitudes monotonic? Cheers! Ben Root On Thu, Jun 26, 2014 at 4:42 AM, billyi <bil...@ho...> wrote: > Hi all! I'm trying to plot some sea ice freeboard data (netCDF, Gridded > total > freeboard) on the Antarctic sea, but the data that should plot nicely > around > Antarctica lies at the bottom of my image. NetCDF and matplotlib are fairly > new to me so I'm not quite sure, where the error could be and I feel like > I've search and tried everything there is. > <http://matplotlib.1069221.n5.nabble.com/file/n43580/bad_fb.png> > > from scipy.io.netcdf import netcdf_file as Dataset > import numpy as np > import matplotlib.pyplot as plt > > FB = Dataset('./datasets/fb-0217-0320.nc', 'r') > f = FB.variables['f'][:,:] > lat = FB.variables['lat'][:,0] > lon = FB.variables['lon'][0,:] > masked_fb = np.ma.masked_where(np.isnan(f), f) > mtx_lon, mtx_lat = np.meshgrid(lon, lat) > m = Basemap(projection='spstere',boundinglat=-50, lon_0=180., > resolution='l') > m.bluemarble() > > plt.figure() > m.pcolormesh(mtx_lon, mtx_lat, masked_fb, latlon=True) > plt.show() > > And ncdump gives: > dimensions: > x = 79 ; > y = 83 ; > variables: > float lat(y, x) ; > lat:standard_name = "latitude" ; > lat:long_name = "latitude coordinate" ; > lat:units = "degrees_north" ; > float lon(y, x) ; > lon:standard_name = "longitude" ; > lon:long_name = "longitude coordinate" ; > lon:units = "degrees_east" ; > float f(y, x) ; > f:long_name = "total_freeboard" ; > f:units = "mm" ; > f:coordinates = "lat lon" ; > > Could there be something funny with the projection or handling the data? > (When using meshgrid, handling the coordinates like ['lat'][:,0] seems > necessary, otherwise it turns lats and lons like (6557,6557) and gives > error > message for pcolormesh, since masked_fb is (83,79).) > > > > -- > View this message in context: > http://matplotlib.1069221.n5.nabble.com/Data-plotting-in-a-wrong-place-tp43580.html > Sent from the matplotlib - users mailing list archive at Nabble.com. > > > ------------------------------------------------------------------------------ > Open source business process management suite built on Java and Eclipse > Turn processes into business applications with Bonita BPM Community Edition > Quickly connect people, data, and systems into organized workflows > Winner of BOSSIE, CODIE, OW2 and Gartner awards > http://p.sf.net/sfu/Bonitasoft > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > |
From: billyi <bil...@ho...> - 2014-06-26 08:43:04
|
Hi all! I'm trying to plot some sea ice freeboard data (netCDF, Gridded total freeboard) on the Antarctic sea, but the data that should plot nicely around Antarctica lies at the bottom of my image. NetCDF and matplotlib are fairly new to me so I'm not quite sure, where the error could be and I feel like I've search and tried everything there is. <http://matplotlib.1069221.n5.nabble.com/file/n43580/bad_fb.png> from scipy.io.netcdf import netcdf_file as Dataset import numpy as np import matplotlib.pyplot as plt FB = Dataset('./datasets/fb-0217-0320.nc', 'r') f = FB.variables['f'][:,:] lat = FB.variables['lat'][:,0] lon = FB.variables['lon'][0,:] masked_fb = np.ma.masked_where(np.isnan(f), f) mtx_lon, mtx_lat = np.meshgrid(lon, lat) m = Basemap(projection='spstere',boundinglat=-50, lon_0=180., resolution='l') m.bluemarble() plt.figure() m.pcolormesh(mtx_lon, mtx_lat, masked_fb, latlon=True) plt.show() And ncdump gives: dimensions: x = 79 ; y = 83 ; variables: float lat(y, x) ; lat:standard_name = "latitude" ; lat:long_name = "latitude coordinate" ; lat:units = "degrees_north" ; float lon(y, x) ; lon:standard_name = "longitude" ; lon:long_name = "longitude coordinate" ; lon:units = "degrees_east" ; float f(y, x) ; f:long_name = "total_freeboard" ; f:units = "mm" ; f:coordinates = "lat lon" ; Could there be something funny with the projection or handling the data? (When using meshgrid, handling the coordinates like ['lat'][:,0] seems necessary, otherwise it turns lats and lons like (6557,6557) and gives error message for pcolormesh, since masked_fb is (83,79).) -- View this message in context: http://matplotlib.1069221.n5.nabble.com/Data-plotting-in-a-wrong-place-tp43580.html Sent from the matplotlib - users mailing list archive at Nabble.com. |
From: Christoph G. <cg...@uc...> - 2014-06-26 01:31:58
|
On 6/25/2014 6:22 PM, Alan Ezust wrote: > I apologize, the error message I posted earlier was for a branch which > was not even merged into the current git origin/master. > > I just switched back to the real "origin/master" branch... Now I get a > completely different error message. > Windows 7, with ms visual C++ 2010 SP1 x86 > > python setup.py install > ============================================================================ > Edit setup.cfg to change the build options > > BUILDING MATPLOTLIB > matplotlib: yes [1.4.x] > python: yes [3.3.5 (v3.3.5:62cf4e77f785, Mar 9 2014, > 10:37:12) [MSC v.1600 32 bit (Intel)]] > platform: yes [win32] > > REQUIRED DEPENDENCIES AND EXTENSIONS > numpy: yes [version 1.8.1] > six: yes [using six version 1.6.1] > dateutil: yes [using dateutil version 2.2] > tornado: yes [using tornado version 3.2.1] > pyparsing: yes [using pyparsing version 2.0.2] > pycxx: yes [Official versions of PyCXX are not compatible > with Python 3.x. Using local copy] > libagg: yes [pkg-config information for 'libagg' could not > be found. Using local copy.] > freetype: yes [Unknown version] > png: yes [pkg-config information for 'libpng' could not > be found. Using unknown version.] > qhull: yes [pkg-config information for 'qhull' could > not be > found. Using local copy.] > > OPTIONAL SUBPACKAGES > sample_data: yes [installing] > toolkits: yes [installing] > tests: yes [using nose version 1.3.3 / using > unittest.mock] > > OPTIONAL BACKEND EXTENSIONS > macosx: no [Mac OS-X only] > qt4agg: no [PyQt4 not found] > gtk3agg: no [gtk3agg backend does not work on Python 3] > gtk3cairo: no [Requires pygobject to be installed.] > gtkagg: no [Requires pygtk] > tkagg: no [The C/C++ header for Tk (tk.h) could not be > found. You may need to install the development > package.] > wxagg: no [requires wxPython] > gtk: no [Requires pygtk] > agg: yes [installing] > cairo: yes [installing, pycairo version 1.10.0] > windowing: yes [installing, installing] > > OPTIONAL LATEX DEPENDENCIES > dvipng: no > ghostscript: no > latex: no > pdftops: no > > running install > running bdist_egg > running egg_info > writing namespace_packages to lib\matplotlib.egg-info\namespace_packages.txt > writing top-level names to lib\matplotlib.egg-info\top_level.txt > writing dependency_links to lib\matplotlib.egg-info\dependency_links.txt > writing lib\matplotlib.egg-info\PKG-INFO > writing requirements to lib\matplotlib.egg-info\requires.txt > writing namespace_packages to lib\matplotlib.egg-info\namespace_packages.txt > writing top-level names to lib\matplotlib.egg-info\top_level.txt > writing dependency_links to lib\matplotlib.egg-info\dependency_links.txt > writing lib\matplotlib.egg-info\PKG-INFO > writing requirements to lib\matplotlib.egg-info\requires.txt > reading manifest file 'lib\matplotlib.egg-info\SOURCES.txt' > reading manifest template 'MANIFEST.in' > writing manifest file 'lib\matplotlib.egg-info\SOURCES.txt' > installing library code to build\bdist.win32\egg > running install_lib > running build_py > copying lib\matplotlib\mpl-data\matplotlibrc -> > build\lib.win32-3.3\matplotlib\mpl-data > running build_ext > building 'freetype2' extension > Traceback (most recent call last): > File "setup.py", line 264, in <module> > **extra_args > File "C:\Python33\lib\distutils\core.py", line 148, in setup > dist.run_commands() > File "C:\Python33\lib\distutils\dist.py", line 930, in run_commands > self.run_command(cmd) > File "C:\Python33\lib\distutils\dist.py", line 949, in run_command > cmd_obj.run() > File "C:\Python33\lib\site-packages\setuptools\command\install.py", > line 65, in run > self.do_egg_install() > File "C:\Python33\lib\site-packages\setuptools\command\install.py", > line 107, in do_egg_install > self.run_command('bdist_egg') > File "C:\Python33\lib\distutils\cmd.py", line 313, in run_command > self.distribution.run_command(command) > File "C:\Python33\lib\distutils\dist.py", line 949, in run_command > cmd_obj.run() > File "C:\Python33\lib\site-packages\setuptools\command\bdist_egg.py", > line 157, in run > cmd = self.call_command('install_lib', warn_dir=0) > File "C:\Python33\lib\site-packages\setuptools\command\bdist_egg.py", > line 143, in call_command > self.run_command(cmdname) > File "C:\Python33\lib\distutils\cmd.py", line 313, in run_command > self.distribution.run_command(command) > File "C:\Python33\lib\distutils\dist.py", line 949, in run_command > cmd_obj.run() > File > "C:\Python33\lib\site-packages\setuptools\command\install_lib.py", line > 8, in run > self.build() > File "C:\Python33\lib\distutils\command\install_lib.py", line 107, in > build > self.run_command('build_ext') > File "C:\Python33\lib\distutils\cmd.py", line 313, in run_command > self.distribution.run_command(command) > File "C:\Python33\lib\distutils\dist.py", line 949, in run_command > cmd_obj.run() > File "C:\Python33\lib\site-packages\setuptools\command\build_ext.py", > line 49, in run > _build_ext.run(self) > File "C:\Python33\lib\distutils\command\build_ext.py", line 353, in run > self.build_extensions() > File "C:\Python33\lib\distutils\command\build_ext.py", line 462, in > build_extensions > self.build_extension(ext) > File "C:\Python33\lib\site-packages\setuptools\command\build_ext.py", > line 178, in build_extension > _build_ext.build_extension(self,ext) > File "C:\Python33\lib\distutils\command\build_ext.py", line 549, in > build_extension > target_lang=language) > File "C:\Python33\lib\distutils\ccompiler.py", line 717, in > link_shared_object > extra_preargs, extra_postargs, build_temp, target_lang) > File "C:\Python33\lib\distutils\msvc9compiler.py", line 621, in link > build_temp = os.path.dirname(objects[0]) > IndexError: list index out of range > > That's <https://github.com/matplotlib/matplotlib/issues/3140> For hints building matplotlib and dependencies on Windows see <https://github.com/matplotlib/matplotlib/issues/1717> Christoph |
From: Alan E. <ala...@gm...> - 2014-06-26 01:22:59
|
I apologize, the error message I posted earlier was for a branch which was not even merged into the current git origin/master. I just switched back to the real "origin/master" branch... Now I get a completely different error message. Windows 7, with ms visual C++ 2010 SP1 x86 python setup.py install ============================================================================ Edit setup.cfg to change the build options BUILDING MATPLOTLIB matplotlib: yes [1.4.x] python: yes [3.3.5 (v3.3.5:62cf4e77f785, Mar 9 2014, 10:37:12) [MSC v.1600 32 bit (Intel)]] platform: yes [win32] REQUIRED DEPENDENCIES AND EXTENSIONS numpy: yes [version 1.8.1] six: yes [using six version 1.6.1] dateutil: yes [using dateutil version 2.2] tornado: yes [using tornado version 3.2.1] pyparsing: yes [using pyparsing version 2.0.2] pycxx: yes [Official versions of PyCXX are not compatible with Python 3.x. Using local copy] libagg: yes [pkg-config information for 'libagg' could not be found. Using local copy.] freetype: yes [Unknown version] png: yes [pkg-config information for 'libpng' could not be found. Using unknown version.] qhull: yes [pkg-config information for 'qhull' could not be found. Using local copy.] OPTIONAL SUBPACKAGES sample_data: yes [installing] toolkits: yes [installing] tests: yes [using nose version 1.3.3 / using unittest.mock] OPTIONAL BACKEND EXTENSIONS macosx: no [Mac OS-X only] qt4agg: no [PyQt4 not found] gtk3agg: no [gtk3agg backend does not work on Python 3] gtk3cairo: no [Requires pygobject to be installed.] gtkagg: no [Requires pygtk] tkagg: no [The C/C++ header for Tk (tk.h) could not be found. You may need to install the development package.] wxagg: no [requires wxPython] gtk: no [Requires pygtk] agg: yes [installing] cairo: yes [installing, pycairo version 1.10.0] windowing: yes [installing, installing] OPTIONAL LATEX DEPENDENCIES dvipng: no ghostscript: no latex: no pdftops: no running install running bdist_egg running egg_info writing namespace_packages to lib\matplotlib.egg-info\namespace_packages.txt writing top-level names to lib\matplotlib.egg-info\top_level.txt writing dependency_links to lib\matplotlib.egg-info\dependency_links.txt writing lib\matplotlib.egg-info\PKG-INFO writing requirements to lib\matplotlib.egg-info\requires.txt writing namespace_packages to lib\matplotlib.egg-info\namespace_packages.txt writing top-level names to lib\matplotlib.egg-info\top_level.txt writing dependency_links to lib\matplotlib.egg-info\dependency_links.txt writing lib\matplotlib.egg-info\PKG-INFO writing requirements to lib\matplotlib.egg-info\requires.txt reading manifest file 'lib\matplotlib.egg-info\SOURCES.txt' reading manifest template 'MANIFEST.in' writing manifest file 'lib\matplotlib.egg-info\SOURCES.txt' installing library code to build\bdist.win32\egg running install_lib running build_py copying lib\matplotlib\mpl-data\matplotlibrc -> build\lib.win32-3.3\matplotlib\mpl-data running build_ext building 'freetype2' extension Traceback (most recent call last): File "setup.py", line 264, in <module> **extra_args File "C:\Python33\lib\distutils\core.py", line 148, in setup dist.run_commands() File "C:\Python33\lib\distutils\dist.py", line 930, in run_commands self.run_command(cmd) File "C:\Python33\lib\distutils\dist.py", line 949, in run_command cmd_obj.run() File "C:\Python33\lib\site-packages\setuptools\command\install.py", line 65, in run self.do_egg_install() File "C:\Python33\lib\site-packages\setuptools\command\install.py", line 107, in do_egg_install self.run_command('bdist_egg') File "C:\Python33\lib\distutils\cmd.py", line 313, in run_command self.distribution.run_command(command) File "C:\Python33\lib\distutils\dist.py", line 949, in run_command cmd_obj.run() File "C:\Python33\lib\site-packages\setuptools\command\bdist_egg.py", line 157, in run cmd = self.call_command('install_lib', warn_dir=0) File "C:\Python33\lib\site-packages\setuptools\command\bdist_egg.py", line 143, in call_command self.run_command(cmdname) File "C:\Python33\lib\distutils\cmd.py", line 313, in run_command self.distribution.run_command(command) File "C:\Python33\lib\distutils\dist.py", line 949, in run_command cmd_obj.run() File "C:\Python33\lib\site-packages\setuptools\command\install_lib.py", line 8, in run self.build() File "C:\Python33\lib\distutils\command\install_lib.py", line 107, in build self.run_command('build_ext') File "C:\Python33\lib\distutils\cmd.py", line 313, in run_command self.distribution.run_command(command) File "C:\Python33\lib\distutils\dist.py", line 949, in run_command cmd_obj.run() File "C:\Python33\lib\site-packages\setuptools\command\build_ext.py", line 49, in run _build_ext.run(self) File "C:\Python33\lib\distutils\command\build_ext.py", line 353, in run self.build_extensions() File "C:\Python33\lib\distutils\command\build_ext.py", line 462, in build_extensions self.build_extension(ext) File "C:\Python33\lib\site-packages\setuptools\command\build_ext.py", line 178, in build_extension _build_ext.build_extension(self,ext) File "C:\Python33\lib\distutils\command\build_ext.py", line 549, in build_extension target_lang=language) File "C:\Python33\lib\distutils\ccompiler.py", line 717, in link_shared_object extra_preargs, extra_postargs, build_temp, target_lang) File "C:\Python33\lib\distutils\msvc9compiler.py", line 621, in link build_temp = os.path.dirname(objects[0]) IndexError: list index out of range |
From: Dino B. <lj...@gm...> - 2014-06-26 01:02:18
|
Not directly related, but considering the similarity of the mail I've decided to just append my issue here. I'm using python 3.4 x86 in virtualenv on win7 x64 with full copy of Visual Studio 2010. This is my Exception message: Exception information: ____________________________________ C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\BIN\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -DPY_ARRAY_UNIQUE_SYMBOL=MPL_matplotlib_ft2font_ARRAY_API -DPYCXX_ISO_CPP_LIB=1 -DPYCXX_PYTHON_2TO3=1 -IC:\Users\Dino\Desktop\Virtual\lib\site-packages\numpy\core\include -I. -IC:\Users\Dino\Desktop\Virtual\include -IC:\python34\include -IC:\python34\include /Tpsrc/ft2font.cpp /Fobuild\temp.win32-3.4\Release\src/ft2font.obj ft2font.cpp C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\xlocale(323) : warning C4530: C++ exception handler used, but unwind semantics are not enabled. Specify /EHsc c:\users\dino\desktop\virtual\build\matplotlib\src\ft2font.h(16) : fatal error C1083: Cannot open include file: 'ft2build.h': No such file or directory error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 10.0\\VC\\BIN\\cl.exe' failed with exit status 2 ________________________________ 2014-06-26 2:52 GMT+02:00 Alan Ezust <ala...@gm...>: > Hi, I'm trying to build matplotlib (git master) on windows 7, Python 3.3, > with ms visual C++ 2010 SP1 > The error I am getting is related to how it can't find ft2build.h but > after running freetype-2.3.5-1.setup.exe, there is now a copy of it under > C:\Program Files (x86)\GnuWin32\include > How do I tell setup.py to look there for the header file? > Any other hints building this building on Windows 7 would be appreciated. > > [C:\Workspace\matplotlib]python setup.py build > ============================================================================ > Edit setup.cfg to change the build options > > BUILDING MATPLOTLIB > matplotlib: yes [1.4.x] > python: yes [3.3.5 (v3.3.5:62cf4e77f785, Mar 9 2014, > 10:35:05) [MSC v.1600 64 bit (AMD64)]] > platform: yes [win32] > > REQUIRED DEPENDENCIES AND EXTENSIONS > numpy: yes [version 1.8.1] > six: yes [using six version 1.7.2] > dateutil: yes [using dateutil version 2.2] > tornado: yes [tornado was not found. It is required for the > WebAgg backend. pip/easy_install may attempt to > install it after matplotlib.] > pyparsing: yes [using pyparsing version 2.0.2] > pycxx: yes [Official versions of PyCXX are not compatible > with Python 3.x. Using local copy] > libagg: yes [pkg-config information for 'libagg' could not > be found. Using local copy.] > freetype: yes [Unknown version] > png: yes [pkg-config information for 'libpng' could not > be found. Using unknown version.] > qhull: yes [pkg-config information for 'qhull' could not be > found. Using local copy.] > > OPTIONAL SUBPACKAGES > sample_data: yes [installing] > toolkits: yes [installing] > tests: yes [nose 0.11.1 or later is required to run the > matplotlib test suite. pip/easy_install may attempt > to install it after matplotlib. / using > unittest.mock] > > OPTIONAL BACKEND EXTENSIONS > macosx: no [Mac OS-X only] > qt5agg: yes [installing, Qt: 5.2.1, PyQt: 5.2.1] > qt4agg: no [PyQt4 not found] > pyside: no [PySide not found] > gtk3agg: no [gtk3agg backend does not work on Python 3] > gtk3cairo: no [Requires cairocffi or pycairo to be installed.] > gtkagg: no [Requires pygtk] > tkagg: no [The C/C++ header for Tk (tk.h) could not be > found. You may need to install the development > package.] > wxagg: no [requires wxPython] > gtk: no [Requires pygtk] > agg: yes [installing] > cairo: no [cairocffi or pycairo not found] > windowing: yes [installing, installing] > > OPTIONAL LATEX DEPENDENCIES > dvipng: no > ghostscript: no > latex: no > pdftops: no > > running build > running build_py > copying lib\matplotlib\mpl-data\matplotlibrc -> > build\lib.win-amd64-3.3\matplotlib\mpl-data > running build_ext > building 'matplotlib.ft2font' extension > C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\Bin\cl.exe /c /nologo > /Ox /MD /W3 /GS- /DNDEBUG -DPY_ARRAY_UN > IQUE_SYMBOL=MPL_matplotlib_ft2font_ARRAY_API -DPYCXX_ISO_CPP_LIB=1 > -DPYCXX_PYTHON_2TO3=1 -IC:\Python33\lib\site-pack > ages\numpy\core\include -I. -Iextern -IC:\Python33\include > -IC:\Python33\include /Tpsrc/ft2font.cpp /Fobuild\temp.wi > n-amd64-3.3\Release\src/ft2font.obj > ft2font.cpp > C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\xlocale(323) > : warning C4530: C++ exception handler u > sed, but unwind semantics are not enabled. Specify /EHsc > c:\users\r4hr-dev\workspace\matplotlib\src\ft2font.h(16) : fatal error > C1083: Cannot open include file: 'ft2build.h' > : No such file or directory > error: command '"C:\Program Files (x86)\Microsoft Visual Studio > 10.0\VC\Bin\cl.exe"' failed with exit status 2 > > > ------------------------------------------------------------------------------ > Open source business process management suite built on Java and Eclipse > Turn processes into business applications with Bonita BPM Community Edition > Quickly connect people, data, and systems into organized workflows > Winner of BOSSIE, CODIE, OW2 and Gartner awards > http://p.sf.net/sfu/Bonitasoft > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > |
From: Alan E. <ala...@gm...> - 2014-06-26 00:52:43
|
Hi, I'm trying to build matplotlib (git master) on windows 7, Python 3.3, with ms visual C++ 2010 SP1 The error I am getting is related to how it can't find ft2build.h but after running freetype-2.3.5-1.setup.exe, there is now a copy of it under C:\Program Files (x86)\GnuWin32\include How do I tell setup.py to look there for the header file? Any other hints building this building on Windows 7 would be appreciated. [C:\Workspace\matplotlib]python setup.py build ============================================================================ Edit setup.cfg to change the build options BUILDING MATPLOTLIB matplotlib: yes [1.4.x] python: yes [3.3.5 (v3.3.5:62cf4e77f785, Mar 9 2014, 10:35:05) [MSC v.1600 64 bit (AMD64)]] platform: yes [win32] REQUIRED DEPENDENCIES AND EXTENSIONS numpy: yes [version 1.8.1] six: yes [using six version 1.7.2] dateutil: yes [using dateutil version 2.2] tornado: yes [tornado was not found. It is required for the WebAgg backend. pip/easy_install may attempt to install it after matplotlib.] pyparsing: yes [using pyparsing version 2.0.2] pycxx: yes [Official versions of PyCXX are not compatible with Python 3.x. Using local copy] libagg: yes [pkg-config information for 'libagg' could not be found. Using local copy.] freetype: yes [Unknown version] png: yes [pkg-config information for 'libpng' could not be found. Using unknown version.] qhull: yes [pkg-config information for 'qhull' could not be found. Using local copy.] OPTIONAL SUBPACKAGES sample_data: yes [installing] toolkits: yes [installing] tests: yes [nose 0.11.1 or later is required to run the matplotlib test suite. pip/easy_install may attempt to install it after matplotlib. / using unittest.mock] OPTIONAL BACKEND EXTENSIONS macosx: no [Mac OS-X only] qt5agg: yes [installing, Qt: 5.2.1, PyQt: 5.2.1] qt4agg: no [PyQt4 not found] pyside: no [PySide not found] gtk3agg: no [gtk3agg backend does not work on Python 3] gtk3cairo: no [Requires cairocffi or pycairo to be installed.] gtkagg: no [Requires pygtk] tkagg: no [The C/C++ header for Tk (tk.h) could not be found. You may need to install the development package.] wxagg: no [requires wxPython] gtk: no [Requires pygtk] agg: yes [installing] cairo: no [cairocffi or pycairo not found] windowing: yes [installing, installing] OPTIONAL LATEX DEPENDENCIES dvipng: no ghostscript: no latex: no pdftops: no running build running build_py copying lib\matplotlib\mpl-data\matplotlibrc -> build\lib.win-amd64-3.3\matplotlib\mpl-data running build_ext building 'matplotlib.ft2font' extension C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\Bin\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -DPY_ARRAY_UN IQUE_SYMBOL=MPL_matplotlib_ft2font_ARRAY_API -DPYCXX_ISO_CPP_LIB=1 -DPYCXX_PYTHON_2TO3=1 -IC:\Python33\lib\site-pack ages\numpy\core\include -I. -Iextern -IC:\Python33\include -IC:\Python33\include /Tpsrc/ft2font.cpp /Fobuild\temp.wi n-amd64-3.3\Release\src/ft2font.obj ft2font.cpp C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\xlocale(323) : warning C4530: C++ exception handler u sed, but unwind semantics are not enabled. Specify /EHsc c:\users\r4hr-dev\workspace\matplotlib\src\ft2font.h(16) : fatal error C1083: Cannot open include file: 'ft2build.h' : No such file or directory error: command '"C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\Bin\cl.exe"' failed with exit status 2 |
From: Benjamin R. <ben...@ou...> - 2014-06-25 18:24:41
|
What it means, specifically, is that one (or more) figure objects still in memory at the time of exiting the python interpretor are missing the expected canvas attribute. I see this happen in various backends from time to time. The best I can figure is that somehow, the destructor for the figure has already been called (as it should), which should eliminate its "FigureManager" instance, but for some reason, that figure manager is still around and its destructor finally tries to destroy the canvas, which is already gone. It is really an odd bug, and I am fairly certain my diagnostic isn't quite right because I never was able to make a SSCE for testing/debugging/traceback purposes. The closest I was able to get was with a preliminary version of the animation framework Ryan May and I were working on a few years back. His code was holding some extra references, while destroying other objects... it was weird. Sorry, I don't have any solutions for you. Maybe someone else will. Ben Root On Wed, Jun 25, 2014 at 8:29 AM, <kei...@bt...> wrote: > I am running matplotlib 1.3.1 under Ubuntu 13 and python3. > Everything works fine, but I get this message every time: > > Error in atexit._run_exitfuncs: > AttributeError: 'FigureManagerGTK3Cairo' object has no attribute 'canvas' > > What does it mean, and how do I stop it? > > Keith > > > > ------------------------------------------------------------------------------ > Open source business process management suite built on Java and Eclipse > Turn processes into business applications with Bonita BPM Community Edition > Quickly connect people, data, and systems into organized workflows > Winner of BOSSIE, CODIE, OW2 and Gartner awards > http://p.sf.net/sfu/Bonitasoft > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > |
From: Benjamin R. <ben...@ou...> - 2014-06-25 13:30:46
|
It is because the polar projection expects theta to be in radians, not degrees. This is a somewhat common mistake as the default labelling of a polar plot is in degrees, and so it tends to confuse new users. Also, don't forget that your radar data is (most likely) describing "bearing" (so, 0 azimuth is North rather than East). Cheers! Ben Root On Wed, Jun 25, 2014 at 9:14 AM, Alexander Borghgraef < ale...@gm...> wrote: > Hi all, > > I'm trying to plot some radar data I'm working on, which is presented as > a 2048x1440 2D array of ints. This means 2048 azimuth angle values between > 0° and 360°, and 1440 range increments. Array values represent signal > return in that angle/range coordinate. Due to hardware problems, some angle > ranges are missing, there the signal value is zero in the grid. > The obvious way of plotting this would be a polar grid, so I used a > pcolormesh, like this: > > > > > * import numpy as np import matplotlib.pyplot as plt * > > * plt.ion()* > > > > > * fig = plt.figure() ax = fig.add_subplot(111, projection='polar') > theta,rad = np.meshgrid(np.arange(0., 360., 360./scan.shape[0]), > np.arange(scan.shape[1])) ax.pcolormesh(theta, rad, scan.T) plt.draw()* > > I transposed scan because theta and rad are 1440x2048 arrays, where scan > is a 2048x1440 array. > The resulting image seemed ok, but there were no gaps, which I knew were > there, so I ran the same code without the 'polar' option, and put them side > to side. The result is this: > > > In the rectangular plot, there is a gap between around 120° to 160°, > which should be an empty wedge in the polar plot, but it isn't there. Same > for the obvious echos at long range between 0° and 50°. OTOH the plot seems > quite right, with the gating gap around the radar station in the center and > the stronger echos at short range. > So I'm a bit baffled as to why this doesn't work the way it should. Does > anyone here have an explanation? > > -- > Alex Borghgraef > > > ------------------------------------------------------------------------------ > Open source business process management suite built on Java and Eclipse > Turn processes into business applications with Bonita BPM Community Edition > Quickly connect people, data, and systems into organized workflows > Winner of BOSSIE, CODIE, OW2 and Gartner awards > http://p.sf.net/sfu/Bonitasoft > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > |
From: Alexander B. <ale...@gm...> - 2014-06-25 13:14:59
|
Hi all, I'm trying to plot some radar data I'm working on, which is presented as a 2048x1440 2D array of ints. This means 2048 azimuth angle values between 0° and 360°, and 1440 range increments. Array values represent signal return in that angle/range coordinate. Due to hardware problems, some angle ranges are missing, there the signal value is zero in the grid. The obvious way of plotting this would be a polar grid, so I used a pcolormesh, like this: * import numpy as np import matplotlib.pyplot as plt * * plt.ion()* * fig = plt.figure() ax = fig.add_subplot(111, projection='polar') theta,rad = np.meshgrid(np.arange(0., 360., 360./scan.shape[0]), np.arange(scan.shape[1])) ax.pcolormesh(theta, rad, scan.T) plt.draw()* I transposed scan because theta and rad are 1440x2048 arrays, where scan is a 2048x1440 array. The resulting image seemed ok, but there were no gaps, which I knew were there, so I ran the same code without the 'polar' option, and put them side to side. The result is this: In the rectangular plot, there is a gap between around 120° to 160°, which should be an empty wedge in the polar plot, but it isn't there. Same for the obvious echos at long range between 0° and 50°. OTOH the plot seems quite right, with the gating gap around the radar station in the center and the stronger echos at short range. So I'm a bit baffled as to why this doesn't work the way it should. Does anyone here have an explanation? -- Alex Borghgraef |
From: <kei...@bt...> - 2014-06-25 12:30:18
|
I am running matplotlib 1.3.1 under Ubuntu 13 and python3. Everything works fine, but I get this message every time: Error in atexit._run_exitfuncs: AttributeError: 'FigureManagerGTK3Cairo' object has no attribute 'canvas' What does it mean, and how do I stop it? Keith |
From: 不坏阿峰 <onl...@gm...> - 2014-06-23 12:56:38
|
i have read demo before. when not line not move auto, it can . but while my case is need the diagram is dynamic move, i do not know how to modify my code. i have tried many times.but failed. 2014-06-21 21:22 GMT+07:00 Eric Firing <ef...@ha...>: > On 2014/06/21, 3:39 PM, 不坏阿峰 wrote: > > is there someone can help me ? > > Posting a *simple*, self-contained example as a starting point would > make it more likely that someone would understand your question. Leave > out everything that is irrelevant--I suspect all the gui and threading > code is in that category. > > Also, although it is not directly related to your question, please note > that you are using a horrible mixture of backend invocations, and even > if it works now, it will do you no good in the long run. > > See the embedding examples: no matplotlib.use, no pylab, one and only > one gui toolkit. > > I also suspect the answer to your question is at least partly in one of > the examples of plotting with dates; dates and times are handled > together. Here is one such example: > > http://matplotlib.org/examples/pylab_examples/date_demo1.html > > Eric > > > many thanks > > > > > > 2014-06-19 19:36 GMT+07:00 不坏阿峰 <onl...@gm... > > <mailto:onl...@gm...>>: > > > > Dear all > > > > could some expert can help me. > > I have modify from one demo. but i do not how to change the x_lable > > to time like H:M:S, and can move it. i have try some way, but > failed. > > > > hope some expert can do me a favor. > > thanks a lot > > > > ###################### > > # coding=utf-8 > > import os > > import pprint > > import random, time > > import sys > > from PyQt4 import QtGui, QtCore > > from threading import * > > import time > > import datetime > > > > import matplotlib > > matplotlib.use('WXAgg') > > from matplotlib.figure import Figure > > from matplotlib.backends.backend_qt4agg import \ > > FigureCanvasQTAgg as FigCanvas, \ > > NavigationToolbar2QT as NavigationToolbar > > import numpy as np > > import pylab > > class DataGen(object): > > """ A silly class that generates pseudo-random data for > > display in the plot. > > """ > > def __init__(self, init=50): > > self.data = self.init = init > > def next(self): > > self._recalc_data() > > return self.data > > def _recalc_data(self): > > delta = random.uniform(-0.5, 0.5) > > r = random.random() > > if r > 0.9: > > self.data += delta * 15 > > elif r > 0.8: > > # attraction to the initial value > > delta += (0.5 if self.init > self.data else -0.5) > > self.data += delta > > else: > > self.data += delta > > > > class myThing(): > > class myThread(Thread): > > def __init__(self): > > Thread.__init__(self) > > self.running = True > > self.vec = [0] > > self.dg = DataGen() > > > > print "Initializing myThread..." > > > > def run(self): > > print "Running myThread..." > > while self.running: > > time.sleep(1) > > self.vec.append(self.dg.next()) > > print "Splat" > > def getVec(self): > > return self.vec > > def stop(self): > > self.running = False > > def __init__(self): > > self.theThread = self.myThread() > > self.threadRunning = True > > print "initializing myThing..." > > self.theThread.start() > > def __del__(self): > > self.theThread.stop() > > def getVec(self): > > #print self.theThread.vec[:] > > return self.theThread.vec[:] > > class ApplicationWindow(QtGui.QMainWindow): > > """ The main window of the application > > """ > > def __init__(self): > > QtGui.QMainWindow.__init__(self) > > self.setAttribute(QtCore.Qt.WA_DeleteOnClose) > > self.setWindowTitle('Demo: dynamic matplotlib graph') > > self.thing1 = myThing() > > self.thing2 = myThing() > > self.starttime = int(time.time()) > > > > > > self.create_menu() > > #self.create_status_bar() > > self.create_main_panel() > > self.redraw_timer = QtCore.QTimer(self) > > QtCore.QObject.connect(self.redraw_timer, > > QtCore.SIGNAL("timeout()"), self.on_redraw_timer) > > self.redraw_timer.start(4000) > > def create_menu(self): > > menu_file = QtGui.QMenu("&File", self) > > #menu_file.addAction(u'&Save plot', self.on_save_plot, > > # QtCore.Qt.CTRL + QtCore.Qt.Key_S) > > menu_file.addSeparator() > > menu_file.addAction(u'E&xit', self.on_exit, > > QtCore.Qt.CTRL + QtCore.Qt.Key_X) > > self.menuBar().addMenu(menu_file) > > def create_main_panel(self): > > self.panel = QtGui.QFrame(self) > > self.setCentralWidget(self.panel) > > self.init_plot() > > self.canvas = FigCanvas(self.fig) > > self.canvas.setMinimumHeight(150) > > #self.toolbar = NavigationToolbar(self.canvas, None) > > self.vbox = QtGui.QVBoxLayout() > > self.vbox.addWidget(self.canvas) > > > > self.panel.setLayout(self.vbox) > > #self.vbox.Fit(self) > > self.unit = 20 > > width, height = self.geometry().width(), > > self.geometry().height() > > self.show() > > def init_plot(self): > > self.dpi = 100 > > self.fig = Figure((5.0, 3.0), dpi=self.dpi) > > self.axes = self.fig.add_subplot(111, navigate=False) > > self.axes.set_axis_bgcolor('black') > > > > self.axes.set_title('Very important random data', size=10) > > self.axes.set_xlabel('Time flies like an arrow',size=10) > > self.axes.set_ylabel('Random is just random',size=10) > > pylab.setp(self.axes.get_xticklabels(), fontsize=8) > > pylab.setp(self.axes.get_yticklabels(), fontsize=8) > > self.plot_data = self.axes.plot( > > self.thing1.getVec(), > > linewidth=0.5, > > color=(1, 1, 0), > > #marker='o', > > label="set1", > > )[0] > > print self.thing1.getVec(), "<<>>" > > self.plot_data2 = self.axes.plot( > > self.thing2.getVec(), > > linewidth=1, > > dashes=[.2, .4], > > color=(0, 1, 1), > > label="set2", > > )[0] > > > > > > def draw_plot(self): > > """ Redraws the plot > > """ > > self.data = self.thing1.getVec() > > self.data2 = self.thing2.getVec() > > def do_cal(urdata): > > newdata = [] > > for x in range(len(urdata)): > > urtime = x + self.starttime > > newdata.append(urtime) > > return newdata > > > > xmax = len(self.data) if len(self.data) > 50 else 50 > > > > xmin = xmax - 50 > > > > min1 = min(self.data) > > min2 = min(self.data2) > > theMin = min(min1, min2) > > > > ymin = round(theMin, 0) - 1 > > > > max1 = max(self.data) > > max2 = max(self.data2) > > theMax = max(max1, max2) > > > > ymax = round(theMax, 0) + 1 > > > > self.axes.set_xbound(lower=xmin, upper=xmax) > > self.axes.set_ybound(lower=ymin, upper=ymax) > > > > self.axes.grid(True, color='gray') > > pylab.setp(self.axes.get_xticklabels(), > > visible=True) > > > > self.plot_data.set_xdata(np.arange(len(self.data))) > > self.plot_data.set_ydata(np.array(self.data)) > > self.plot_data2.set_xdata(np.arange(len(self.data2))) > > #self.plot_data2.set_xdata(np.array(newdata2)) > > self.plot_data2.set_ydata(np.array(self.data2)) > > > > self.canvas.draw() > > def on_redraw_timer(self): > > self.draw_plot() > > def on_exit(self): > > self.close() > > def closeEvent(self, event): > > for thing in (self.thing1, self.thing2): > > thing.theThread.stop() > > thing.theThread.join() > > if __name__ == '__main__': > > app = QtGui.QApplication(sys.argv) > > aw = ApplicationWindow() > > aw.show() > > sys.exit(app.exec_()) > > > > ################################# > > 内嵌图片 1 > > > > > > > > > > > ------------------------------------------------------------------------------ > > HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions > > Find What Matters Most in Your Big Data with HPCC Systems > > Open Source. Fast. Scalable. Simple. Ideal for Dirty Data. > > Leverages Graph Analysis for Fast Processing & Easy Data Exploration > > http://p.sf.net/sfu/hpccsystems > > > > > > > > _______________________________________________ > > Matplotlib-users mailing list > > Mat...@li... > > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > > > > > ------------------------------------------------------------------------------ > HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions > Find What Matters Most in Your Big Data with HPCC Systems > Open Source. Fast. Scalable. Simple. Ideal for Dirty Data. > Leverages Graph Analysis for Fast Processing & Easy Data Exploration > http://p.sf.net/sfu/hpccsystems > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > |
From: Eric F. <ef...@ha...> - 2014-06-21 15:22:27
|
On 2014/06/21, 3:39 PM, 不坏阿峰 wrote: > is there someone can help me ? Posting a *simple*, self-contained example as a starting point would make it more likely that someone would understand your question. Leave out everything that is irrelevant--I suspect all the gui and threading code is in that category. Also, although it is not directly related to your question, please note that you are using a horrible mixture of backend invocations, and even if it works now, it will do you no good in the long run. See the embedding examples: no matplotlib.use, no pylab, one and only one gui toolkit. I also suspect the answer to your question is at least partly in one of the examples of plotting with dates; dates and times are handled together. Here is one such example: http://matplotlib.org/examples/pylab_examples/date_demo1.html Eric > many thanks > > > 2014-06-19 19:36 GMT+07:00 不坏阿峰 <onl...@gm... > <mailto:onl...@gm...>>: > > Dear all > > could some expert can help me. > I have modify from one demo. but i do not how to change the x_lable > to time like H:M:S, and can move it. i have try some way, but failed. > > hope some expert can do me a favor. > thanks a lot > > ###################### > # coding=utf-8 > import os > import pprint > import random, time > import sys > from PyQt4 import QtGui, QtCore > from threading import * > import time > import datetime > > import matplotlib > matplotlib.use('WXAgg') > from matplotlib.figure import Figure > from matplotlib.backends.backend_qt4agg import \ > FigureCanvasQTAgg as FigCanvas, \ > NavigationToolbar2QT as NavigationToolbar > import numpy as np > import pylab > class DataGen(object): > """ A silly class that generates pseudo-random data for > display in the plot. > """ > def __init__(self, init=50): > self.data = self.init = init > def next(self): > self._recalc_data() > return self.data > def _recalc_data(self): > delta = random.uniform(-0.5, 0.5) > r = random.random() > if r > 0.9: > self.data += delta * 15 > elif r > 0.8: > # attraction to the initial value > delta += (0.5 if self.init > self.data else -0.5) > self.data += delta > else: > self.data += delta > > class myThing(): > class myThread(Thread): > def __init__(self): > Thread.__init__(self) > self.running = True > self.vec = [0] > self.dg = DataGen() > > print "Initializing myThread..." > > def run(self): > print "Running myThread..." > while self.running: > time.sleep(1) > self.vec.append(self.dg.next()) > print "Splat" > def getVec(self): > return self.vec > def stop(self): > self.running = False > def __init__(self): > self.theThread = self.myThread() > self.threadRunning = True > print "initializing myThing..." > self.theThread.start() > def __del__(self): > self.theThread.stop() > def getVec(self): > #print self.theThread.vec[:] > return self.theThread.vec[:] > class ApplicationWindow(QtGui.QMainWindow): > """ The main window of the application > """ > def __init__(self): > QtGui.QMainWindow.__init__(self) > self.setAttribute(QtCore.Qt.WA_DeleteOnClose) > self.setWindowTitle('Demo: dynamic matplotlib graph') > self.thing1 = myThing() > self.thing2 = myThing() > self.starttime = int(time.time()) > > > self.create_menu() > #self.create_status_bar() > self.create_main_panel() > self.redraw_timer = QtCore.QTimer(self) > QtCore.QObject.connect(self.redraw_timer, > QtCore.SIGNAL("timeout()"), self.on_redraw_timer) > self.redraw_timer.start(4000) > def create_menu(self): > menu_file = QtGui.QMenu("&File", self) > #menu_file.addAction(u'&Save plot', self.on_save_plot, > # QtCore.Qt.CTRL + QtCore.Qt.Key_S) > menu_file.addSeparator() > menu_file.addAction(u'E&xit', self.on_exit, > QtCore.Qt.CTRL + QtCore.Qt.Key_X) > self.menuBar().addMenu(menu_file) > def create_main_panel(self): > self.panel = QtGui.QFrame(self) > self.setCentralWidget(self.panel) > self.init_plot() > self.canvas = FigCanvas(self.fig) > self.canvas.setMinimumHeight(150) > #self.toolbar = NavigationToolbar(self.canvas, None) > self.vbox = QtGui.QVBoxLayout() > self.vbox.addWidget(self.canvas) > > self.panel.setLayout(self.vbox) > #self.vbox.Fit(self) > self.unit = 20 > width, height = self.geometry().width(), > self.geometry().height() > self.show() > def init_plot(self): > self.dpi = 100 > self.fig = Figure((5.0, 3.0), dpi=self.dpi) > self.axes = self.fig.add_subplot(111, navigate=False) > self.axes.set_axis_bgcolor('black') > > self.axes.set_title('Very important random data', size=10) > self.axes.set_xlabel('Time flies like an arrow',size=10) > self.axes.set_ylabel('Random is just random',size=10) > pylab.setp(self.axes.get_xticklabels(), fontsize=8) > pylab.setp(self.axes.get_yticklabels(), fontsize=8) > self.plot_data = self.axes.plot( > self.thing1.getVec(), > linewidth=0.5, > color=(1, 1, 0), > #marker='o', > label="set1", > )[0] > print self.thing1.getVec(), "<<>>" > self.plot_data2 = self.axes.plot( > self.thing2.getVec(), > linewidth=1, > dashes=[.2, .4], > color=(0, 1, 1), > label="set2", > )[0] > > > def draw_plot(self): > """ Redraws the plot > """ > self.data = self.thing1.getVec() > self.data2 = self.thing2.getVec() > def do_cal(urdata): > newdata = [] > for x in range(len(urdata)): > urtime = x + self.starttime > newdata.append(urtime) > return newdata > > xmax = len(self.data) if len(self.data) > 50 else 50 > > xmin = xmax - 50 > > min1 = min(self.data) > min2 = min(self.data2) > theMin = min(min1, min2) > > ymin = round(theMin, 0) - 1 > > max1 = max(self.data) > max2 = max(self.data2) > theMax = max(max1, max2) > > ymax = round(theMax, 0) + 1 > > self.axes.set_xbound(lower=xmin, upper=xmax) > self.axes.set_ybound(lower=ymin, upper=ymax) > > self.axes.grid(True, color='gray') > pylab.setp(self.axes.get_xticklabels(), > visible=True) > > self.plot_data.set_xdata(np.arange(len(self.data))) > self.plot_data.set_ydata(np.array(self.data)) > self.plot_data2.set_xdata(np.arange(len(self.data2))) > #self.plot_data2.set_xdata(np.array(newdata2)) > self.plot_data2.set_ydata(np.array(self.data2)) > > self.canvas.draw() > def on_redraw_timer(self): > self.draw_plot() > def on_exit(self): > self.close() > def closeEvent(self, event): > for thing in (self.thing1, self.thing2): > thing.theThread.stop() > thing.theThread.join() > if __name__ == '__main__': > app = QtGui.QApplication(sys.argv) > aw = ApplicationWindow() > aw.show() > sys.exit(app.exec_()) > > ################################# > 内嵌图片 1 > > > > > ------------------------------------------------------------------------------ > HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions > Find What Matters Most in Your Big Data with HPCC Systems > Open Source. Fast. Scalable. Simple. Ideal for Dirty Data. > Leverages Graph Analysis for Fast Processing & Easy Data Exploration > http://p.sf.net/sfu/hpccsystems > > > > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > |
From: 不坏阿峰 <onl...@gm...> - 2014-06-21 13:39:15
|
is there someone can help me ? many thanks 2014-06-19 19:36 GMT+07:00 不坏阿峰 <onl...@gm...>: > Dear all > > could some expert can help me. > I have modify from one demo. but i do not how to change the x_lable to > time like H:M:S, and can move it. i have try some way, but failed. > > hope some expert can do me a favor. > thanks a lot > > ###################### > # coding=utf-8 > import os > import pprint > import random, time > import sys > from PyQt4 import QtGui, QtCore > > from threading import * > import time > import datetime > > import matplotlib > matplotlib.use('WXAgg') > from matplotlib.figure import Figure > from matplotlib.backends.backend_qt4agg import \ > FigureCanvasQTAgg as FigCanvas, \ > NavigationToolbar2QT as NavigationToolbar > import numpy as np > import pylab > > > class DataGen(object): > """ A silly class that generates pseudo-random data for > display in the plot. > """ > def __init__(self, init=50): > self.data = self.init = init > > def next(self): > self._recalc_data() > return self.data > > def _recalc_data(self): > delta = random.uniform(-0.5, 0.5) > r = random.random() > > if r > 0.9: > self.data += delta * 15 > elif r > 0.8: > # attraction to the initial value > delta += (0.5 if self.init > self.data else -0.5) > self.data += delta > else: > self.data += delta > > class myThing(): > class myThread(Thread): > def __init__(self): > Thread.__init__(self) > self.running = True > self.vec = [0] > self.dg = DataGen() > > print "Initializing myThread..." > > def run(self): > print "Running myThread..." > while self.running: > time.sleep(1) > self.vec.append(self.dg.next()) > print "Splat" > > def getVec(self): > return self.vec > > def stop(self): > self.running = False > > def __init__(self): > self.theThread = self.myThread() > self.threadRunning = True > print "initializing myThing..." > self.theThread.start() > > def __del__(self): > self.theThread.stop() > > def getVec(self): > #print self.theThread.vec[:] > return self.theThread.vec[:] > > > class ApplicationWindow(QtGui.QMainWindow): > """ The main window of the application > """ > > def __init__(self): > QtGui.QMainWindow.__init__(self) > self.setAttribute(QtCore.Qt.WA_DeleteOnClose) > self.setWindowTitle('Demo: dynamic matplotlib graph') > > self.thing1 = myThing() > self.thing2 = myThing() > self.starttime = int(time.time()) > > > self.create_menu() > #self.create_status_bar() > self.create_main_panel() > > self.redraw_timer = QtCore.QTimer(self) > QtCore.QObject.connect(self.redraw_timer, > QtCore.SIGNAL("timeout()"), self.on_redraw_timer) > self.redraw_timer.start(4000) > > > def create_menu(self): > menu_file = QtGui.QMenu("&File", self) > #menu_file.addAction(u'&Save plot', self.on_save_plot, > # QtCore.Qt.CTRL + QtCore.Qt.Key_S) > menu_file.addSeparator() > menu_file.addAction(u'E&xit', self.on_exit, > QtCore.Qt.CTRL + QtCore.Qt.Key_X) > > self.menuBar().addMenu(menu_file) > > def create_main_panel(self): > self.panel = QtGui.QFrame(self) > self.setCentralWidget(self.panel) > > self.init_plot() > self.canvas = FigCanvas(self.fig) > self.canvas.setMinimumHeight(150) > > #self.toolbar = NavigationToolbar(self.canvas, None) > self.vbox = QtGui.QVBoxLayout() > self.vbox.addWidget(self.canvas) > > self.panel.setLayout(self.vbox) > #self.vbox.Fit(self) > > self.unit = 20 > width, height = self.geometry().width(), self.geometry().height() > self.show() > > def init_plot(self): > self.dpi = 100 > self.fig = Figure((5.0, 3.0), dpi=self.dpi) > > self.axes = self.fig.add_subplot(111, navigate=False) > self.axes.set_axis_bgcolor('black') > > self.axes.set_title('Very important random data', size=10) > self.axes.set_xlabel('Time flies like an arrow',size=10) > self.axes.set_ylabel('Random is just random',size=10) > > pylab.setp(self.axes.get_xticklabels(), fontsize=8) > pylab.setp(self.axes.get_yticklabels(), fontsize=8) > > self.plot_data = self.axes.plot( > self.thing1.getVec(), > linewidth=0.5, > color=(1, 1, 0), > #marker='o', > label="set1", > )[0] > print self.thing1.getVec(), "<<>>" > self.plot_data2 = self.axes.plot( > self.thing2.getVec(), > linewidth=1, > dashes=[.2, .4], > color=(0, 1, 1), > label="set2", > )[0] > > > def draw_plot(self): > """ Redraws the plot > """ > self.data = self.thing1.getVec() > self.data2 = self.thing2.getVec() > def do_cal(urdata): > newdata = [] > for x in range(len(urdata)): > urtime = x + self.starttime > newdata.append(urtime) > return newdata > > xmax = len(self.data) if len(self.data) > 50 else 50 > > xmin = xmax - 50 > > min1 = min(self.data) > min2 = min(self.data2) > theMin = min(min1, min2) > > ymin = round(theMin, 0) - 1 > > max1 = max(self.data) > max2 = max(self.data2) > theMax = max(max1, max2) > > ymax = round(theMax, 0) + 1 > > self.axes.set_xbound(lower=xmin, upper=xmax) > self.axes.set_ybound(lower=ymin, upper=ymax) > > self.axes.grid(True, color='gray') > pylab.setp(self.axes.get_xticklabels(), > visible=True) > > self.plot_data.set_xdata(np.arange(len(self.data))) > self.plot_data.set_ydata(np.array(self.data)) > self.plot_data2.set_xdata(np.arange(len(self.data2))) > #self.plot_data2.set_xdata(np.array(newdata2)) > self.plot_data2.set_ydata(np.array(self.data2)) > > self.canvas.draw() > > > def on_redraw_timer(self): > self.draw_plot() > > def on_exit(self): > self.close() > > def closeEvent(self, event): > for thing in (self.thing1, self.thing2): > thing.theThread.stop() > thing.theThread.join() > > if __name__ == '__main__': > app = QtGui.QApplication(sys.argv) > aw = ApplicationWindow() > aw.show() > sys.exit(app.exec_()) > > ################################# > [image: 内嵌图片 1] > |