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
(9) |
2
(8) |
3
|
4
(6) |
5
|
|
6
|
7
(41) |
8
(18) |
9
(25) |
10
(18) |
11
(10) |
12
(13) |
|
13
(7) |
14
(4) |
15
(12) |
16
(6) |
17
(9) |
18
(7) |
19
(2) |
|
20
(5) |
21
(7) |
22
(2) |
23
(11) |
24
(11) |
25
(14) |
26
(3) |
|
27
(3) |
28
(17) |
29
(7) |
30
(16) |
31
(8) |
|
|
|
From: David K. <da...@da...> - 2011-03-29 19:43:56
|
> I would recommend running the import in the Python profiler to determine > where most of the time is going. When I investigated this a few years > back, it was mainly due to loading the GUI toolkits, which are > understandably quite large. You can avoid most of that by using the Agg > backend. If you're using the Agg backend and still experiencing > slowness, it may be that load-up issues have crept back into matplotlib > since then -- but we need profiling data to figure out where and how. > > Mike Thank you a lot for your answer. I noticed than _matplotlib.pyplot_ is longer to be imported the first time than if it has already been imported previously (maybe things are already loaded in ram memory), and we don't need to fetch it from the hard drive thanks to the kernel. As far I see, the function calls are the same for the two logs I obtained, except than the first took 6s instead of 1.4s. The two logs have been obtained using : <code> python -m cProfile temp.py </code> where temp.py consist of two lines : <code> #!/usr/bin/env python2 import matplotlib.pyplot </code> |
|
From: Paul I. <piv...@gm...> - 2011-03-29 19:01:30
|
Michael Droettboom, on 2011-03-29 10:12, wrote:
> On 03/29/2011 09:08 AM, xyz wrote:
> > Hi,
> > X and Y values are stored in a dict whereas X is the key and Y is the
> > value in the following code:
> >
> > import matplotlib.pyplot as plt
> >
> > data = {4: 3, 5: 4, 6: 5, 7: 4, 8: 5}
> >
> > print data
> > for i in sorted(data.keys()):
> > print i
> >
> > How is possible to use plot with a dict in order to get a similar
> > picture like this
> > http://matplotlib.sourceforge.net/_images/invert_axes.png .
> In this case, you should be able to use:
>
> plt.plot(data.items())
For me, that line produces two lines with the abscissa going from
0 to 4. In other words, plt.plot(data.items()) ends up being
equivalent to plt.plot(data.values());plt.plot(data.keys())
I think what xyz wants is this:
x,y = zip(*sorted(data.items()))
plt.plot(x,y)
I think of the * in front of arguments to zip as being the pull
tab or slider of the zipper (since it's at the top, you'll be
pulling it down, or unzipping): see
http://docs.python.org/library/functions.html#zip
best,
--
Paul Ivanov
314 address only used for lists, off-list direct email at:
http://pirsquared.org | GPG/PGP key id: 0x0F3E28F7
|
|
From: Michael D. <md...@st...> - 2011-03-29 14:15:16
|
In this case, you should be able to use:
plt.plot(data.items())
Mike
On 03/29/2011 09:08 AM, xyz wrote:
> Hi,
> X and Y values are stored in a dict whereas X is the key and Y is the
> value in the following code:
>
> import matplotlib.pyplot as plt
>
> data = {4: 3, 5: 4, 6: 5, 7: 4, 8: 5}
>
> print data
> for i in sorted(data.keys()):
> print i
>
> How is possible to use plot with a dict in order to get a similar
> picture like this
> http://matplotlib.sourceforge.net/_images/invert_axes.png .
>
> Thank you in advance.
>
>
>
> ------------------------------------------------------------------------------
> Enable your software for Intel(R) Active Management Technology to meet the
> growing manageability and security demands of your customers. Businesses
> are taking advantage of Intel(R) vPro (TM) technology - will your software
> be a part of the solution? Download the Intel(R) Manageability Checker
> today! http://p.sf.net/sfu/intel-dev2devmar
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
--
Michael Droettboom
Science Software Branch
Space Telescope Science Institute
Baltimore, Maryland, USA
|
|
From: Andreas R. <and...@tu...> - 2011-03-29 13:50:07
|
Hi! I would like to save a pyplot object as it is, including axes, lines, text, etc. into a file. When opening it again, I want to be able to add additional axes, lines and so on. Unfortunately pickle does not handle the pyplot object and gives me an error. Anyone knows a solution? All the best Aki |
|
From: xyz <mi...@op...> - 2011-03-29 13:11:12
|
Hi,
X and Y values are stored in a dict whereas X is the key and Y is the
value in the following code:
import matplotlib.pyplot as plt
data = {4: 3, 5: 4, 6: 5, 7: 4, 8: 5}
print data
for i in sorted(data.keys()):
print i
How is possible to use plot with a dict in order to get a similar
picture like this
http://matplotlib.sourceforge.net/_images/invert_axes.png .
Thank you in advance.
|
|
From: Jonas B. <jon...@st...> - 2011-03-29 12:56:59
|
Dear all,
when trying to contourf data from a netCDF file in North-Polar
Stereographic projection, I encounter the problem that the map is not
filled completely but there is a gap between 0E and some -2E where the
map stays blank (see attached plot).
I am reading the grid (lon,lat) from the respective netCDF file
variables. When plotting with other software, e.g. Ferret or Panoply,
the problem does not occur. The essential code:
import numpy as np
from netCDF4 import Dataset
from mpl_toolkits.basemap import Basemap
import matplotlib.pyplot as plt
import matplotlib.spines
# what to plot
anom='Arctic07-Clim'
var='slp'
varclevs={ # contour levels for the given variable
'slp': np.arange(-200,101,25),
'temp2': np.arange(-3,3.5,.5)}
varlabel={ # variable labels
'slp': 'sea level pressure anomaly [Pa]',
'temp2': '2m air temperature anomaly [K]'}
varcmap={ # color map to use for variable
'slp': plt.cm.RdYlBu_r,
'temp2': plt.cm.Spectral}
# paths
dataDir = '...'
plotDir = '...'
# Open file and read data
fname = dataDir + anom+'_ensmean.JASmean.'+var+'.nc'
ncf = Dataset(fname)
vardata = ncf.variables[var][:]
lons = ncf.variables['lon'][:]
lats = ncf.variables['lat'][:]
ncf.close()
# Map projection
m = Basemap(projection='npstere',boundinglat=60,lon_0=-30,resolution='l')
# make coordinate grid for contour plot
xx,yy = m(*np.meshgrid(lons,lats))
# Plot stuff
# set plot
f = plt.figure()
ax = plt.gca()
# draw coast lines etc
m.drawcoastlines(zorder=7)
#m.fillcontinents(zorder=7)
# draw parallels and meridians.
m.drawparallels(np.arange(50,81,10),zorder=8)
m.drawmeridians(np.arange(-30,330,30),zorder=8,latmax=80)
m.drawmeridians(np.arange(-30,330,90),zorder=8,latmax=40,labels=[1,0,1,1])
# label parallels manually
latvals=np.array([70,80])
lonvals=np.ones(len(latvals))*(-15)
for l in range(len(latvals)):
latval = latvals[l]
lonval = lonvals[l]
x,y = m(lonval,latval)
latlab = '{0} N'.format(latval)
ax.text(x,y,latlab,zorder=10,va='center')
# plt.xlabel('longitude')
# plt.ylabel('latitude')
# Contour data
datacntr = m.contourf(xx,yy,vardata[0,:,:],
levels=varclevs[var],
cmap=varcmap[var],
extend='both',zorder=5)
# draw color bar
datacb = plt.colorbar(datacntr,orientation='vertical',shrink=1.)
datacb.set_label(varlabel[var])
I am using the Entought Python Distribution 7.0 on Mac OS X 10.5.
Thanks for your kind help!
Jonas B., GFI, Bergen, Norway
|
|
From: C M <cmp...@gm...> - 2011-03-29 02:41:22
|
On Mon, Mar 28, 2011 at 1:44 PM, C M <cmp...@gm...> wrote: > I need to get the bboxes for time-range bars (matplotlib.patches.Rectangle > objects) on a bar plot for a custom autoscaling function. > > Right now, I get them like this, where rectObj = a bar and bboxes = a list > of bboxes: > > bboxes.append(rectObj.get_path().get_extents()) > print 'bboxes is: ', bboxes > OK, I have it... Because I was using the above to get the bbox for a Line2D object, I didn't realize there was already a method to get the bbox (in data coordinates) from a Rectangle: rectObj.get_bbox() -Che |