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
(1) |
3
(9) |
4
(2) |
5
|
6
(6) |
7
(3) |
8
(1) |
9
(6) |
10
(1) |
11
|
12
|
13
(2) |
14
(8) |
15
(2) |
16
|
17
(11) |
18
(5) |
19
(2) |
20
(2) |
21
(4) |
22
(2) |
23
(5) |
24
(6) |
25
|
26
|
27
(2) |
28
(9) |
|
From: Stephen G. <ste...@op...> - 2014-02-23 23:48:46
|
Hi, I was wanting to use dual scales on my plot and was just running the example code from http://matplotlib.org/examples/api/fahrenheit_celsius_scales.html I subsequently changed the function Tc to read def Tc(Tf): return Tf Fully expecting the two scales to track each other perfectly. I found after zooming the scales did not track each other. So my question is: Am I misunderstanding what my change should have done, or is there some error in the example code? I tried this on win7 64 with: python 2.7 numpy 1.8.0 matplotlib 1.3.1 Any suggestion welcome. Thanks Steve |
From: Alex G. <ale...@co...> - 2014-02-23 17:56:02
|
Hi Fadzil, All you actually need to do is use numpy.average(), which is numpy's implementation of the weighted average. It can be shown geometrically that using the cosine of the latitude as the weights in the weighted average would give you approximately the area average, though if your SST data has a grid cell area attribute in the netcdf file, that would be the most suitable choice to use as your weights. Otherwise, you could determine the area weighted average as follows: # numpy is imported as np, lat are the latitudes extracted from the netcdf file # First we need to convert the latitudes to radians latr = np.deg2rad(lat) # Use the cosine of the converted latitudes as weights for the average weights = np.cos(latr) # Assuming the shape of your data array is (nTimes, nLats, nLons) # First find the zonal mean SST by averaging along the latitude circles sst = sstv[:] sst_ave_zonal = sst.mean(axis=2) # Then take the weighted average of those using the weights we calculated earlier sst_ave = np.average(sst_ave_zonal, axis=1, weights=weights) This should give a time series of global mean SST. Is this what you wanted? Thanks, Alex On Sun, Feb 23, 2014 at 10:28 AM, Fadzil Mnor <fad...@gm...>wrote: > Hi, > I just started using Python for the last few weeks, and previously been > using GrADS for around 4 years. > I have trouble looking for a simplest way to calculate area average, let > say I need to calculate a SST over a region of 20S-10N and 130E-170E. > I know how to get one point values of SST vs Time, as in: > > ******************************************************************** > ... > ... > f = nc.Dataset('d:/data/sst.mon.mean.nc', 'r') > sstv = f.variables['sst'] > timev = f.variables['time'] > sst = sstv[:, 35, 100] > plt.plot(timev,sst) > plt.show() > ... > ... > *********************************************************************** > but I couldn't figure out how to get an area average value (...and didn't > get the right reference in the internet either) > Something missing, probably because I don't understand enough about > slicing or something else. > Can anyone give me a hint ? > > Thanks. > > Fadzil. > > > > > > ------------------------------------------------------------------------------ > Managing the Performance of Cloud-Based Applications > Take advantage of what the Cloud has to offer - Avoid Common Pitfalls. > Read the Whitepaper. > > http://pubads.g.doubleclick.net/gampad/clk?id=121054471&iu=/4140/ostg.clktrk > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > -- Alex Goodman Graduate Research Assistant Department of Atmospheric Science Colorado State University |
From: Fadzil M. <fad...@gm...> - 2014-02-23 17:28:30
|
Hi, I just started using Python for the last few weeks, and previously been using GrADS for around 4 years. I have trouble looking for a simplest way to calculate area average, let say I need to calculate a SST over a region of 20S-10N and 130E-170E. I know how to get one point values of SST vs Time, as in: ******************************************************************** ... ... f = nc.Dataset('d:/data/sst.mon.mean.nc', 'r') sstv = f.variables['sst'] timev = f.variables['time'] sst = sstv[:, 35, 100] plt.plot(timev,sst) plt.show() ... ... *********************************************************************** but I couldn't figure out how to get an area average value (...and didn't get the right reference in the internet either) Something missing, probably because I don't understand enough about slicing or something else. Can anyone give me a hint ? Thanks. Fadzil. |
From: Timothy D. <tim...@gm...> - 2014-02-23 01:36:54
|
Alex, Thanks for the information. I think python.org's version did this for me: $ cat ~/.bash_profile ... # Setting PATH for Python 2.7 # The orginal version is saved in .bash_profile.pysave PATH="/Library/Frameworks/Python.framework/Versions/2.7/bin:${PATH}" export PATH ... It turns out, my problem actually was in ipython / numpy. I reinstalled numpy to 1.8.0 and ipython was not recognizing it (similar to the matplotlib problem). I reinstalled ipython with "sudo pip install numpy" but it still recognized Apple's numpy. The solution was to install ipython via "easy_install ipython"-- then it was able to recognize the correct numpy, and correspondingly when I installed the latest version of matplotlib, ipython recognized the version I wanted. Thanks, Tim On Fri, Feb 21, 2014 at 6:12 PM, Alex Goodman <ale...@co...>wrote: > Hi Tim, > > Whenever you have two python versions installed to one machine, it is > generally a good practice to set your PATH environment variable to the > directory where the python executable you want to use currently lies, and > make it permanent by adding it to your ~/.bash_profile file (on MacOSX). > Say your python.org version of python was installed in /something/bin. > Then add the following line to your ~/.bash_profile: > > export PATH=/something/bin:$PATH > > Then run these commands: > source ~/.bash_profile > which python > which pip > > If the output is /something/bin, then you are good to go; pip should then > install matplotlib in the correct place. Hope that helps. > > Thanks, > Alex > > > On Fri, Feb 21, 2014 at 4:58 PM, Timothy Duly <tim...@gm...> wrote: > >> Paul, >> >> Do you know how to to get pip install on python.org's version? >> >> Thanks, >> Tim >> >> >> On Fri, Feb 21, 2014 at 5:53 PM, Paul Hobson <pmh...@gm...> wrote: >> >>> It appears that you have two different version of python installed >>> (Apple's 2.7.3 and python.org's 2.7.5). You have to install all >>> third-party packages to the correct one. It appears pip in acting on >>> Apple's python. >>> >>> >>> On Fri, Feb 21, 2014 at 2:08 PM, Timothy Duly <tim...@gm...>wrote: >>> >>>> Hello, >>>> >>>> I recently upgraded matplotlib, which was relatively simple: >>>> >>>> sudo pip install matplotlib --upgrade >>>> >>>> I checked to make sure I did indeed upgrade: >>>> >>>> [~]$ python >>>> Python 2.7.3 (v2.7.3:70274d53c1dd, Apr 9 2012, 20:52:43) >>>> [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin >>>> Type "help", "copyright", "credits" or "license" for more information. >>>> >>> import matplotlib; matplotlib.__version__ >>>> '1.3.1' >>>> >>>> Success. However, when I do the same in IPython, I get the old version: >>>> >>>> [~]$ ipython --pylab >>>> Python 2.7.5 (default, Aug 25 2013, 00:04:04) >>>> Type "copyright", "credits" or "license" for more information. >>>> IPython 1.2.0 -- An enhanced Interactive Python. >>>> ? -> Introduction and overview of IPython's features. >>>> %quickref -> Quick reference. >>>> help -> Python's own help system. >>>> object? -> Details about 'object', use 'object??' for extra details. >>>> Using matplotlib backend: MacOSX >>>> In [1]: import matplotlib; matplotlib.__version__ >>>> Out[1]: '1.1.1' >>>> >>>> Anyone know why this is the case? How do I point IPython to the newest >>>> version of matplotlib? >>>> >>>> I tried googling, but wasn't sure how to zero in on the answer with a >>>> search. Also, I'm not sure if this question is best suited for IPython >>>> people. >>>> >>>> Thanks, >>>> Tim >>>> >>>> >>>> ------------------------------------------------------------------------------ >>>> Managing the Performance of Cloud-Based Applications >>>> Take advantage of what the Cloud has to offer - Avoid Common Pitfalls. >>>> Read the Whitepaper. >>>> >>>> http://pubads.g.doubleclick.net/gampad/clk?id=121054471&iu=/4140/ostg.clktrk >>>> _______________________________________________ >>>> Matplotlib-users mailing list >>>> Mat...@li... >>>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users >>>> >>>> >>> >> >> >> -- >> ------------------------------------------------- >> Timothy M. Duly >> Graduate Research Assistant >> Remote Sensing & Space Sciences Group >> Department of Electrical and Computer Engineering >> University of Illinois at Urbana-Champaign >> airglow.csl.illinois.edu >> ------------------------------------------------- >> >> >> ------------------------------------------------------------------------------ >> Managing the Performance of Cloud-Based Applications >> Take advantage of what the Cloud has to offer - Avoid Common Pitfalls. >> Read the Whitepaper. >> >> http://pubads.g.doubleclick.net/gampad/clk?id=121054471&iu=/4140/ostg.clktrk >> _______________________________________________ >> Matplotlib-users mailing list >> Mat...@li... >> https://lists.sourceforge.net/lists/listinfo/matplotlib-users >> >> > > > -- > Alex Goodman > Graduate Research Assistant > Department of Atmospheric Science > Colorado State University > -- ------------------------------------------------- Timothy M. Duly Graduate Research Assistant Remote Sensing & Space Sciences Group Department of Electrical and Computer Engineering University of Illinois at Urbana-Champaign airglow.csl.illinois.edu ------------------------------------------------- |
From: Gabriele B. <gb....@gm...> - 2014-02-23 01:28:22
|
Hi, I'm trying to follow this example to make a grid of subplot: http://matplotlib.org/examples/pylab_examples/line_styles.html but my code plot the two rows in two different figures (i attach them but I don't know if they are useful). Does anyone understand why? this is an extract of my code: alphas = [45, 75] numalp = len(alphas) angles = np.linspace(pi/12, pi/2, num=10) numobs = len(angles) axisNum = 0 for a in alphas: #[some operations] for obsangl in angles: #[some operations] axisNum += 1 axii = plt.subplot(numalp, numobs, axisNum) plt.errorbar(g, Pgamma, yerr = ePgamma, color = 'green', fmt = '.') axii1 = axii.twinx() plt.plot(g, lightcurva, 'b-') axii.set_yticklabels([]) axii.set_xticklabels([]) axii1.set_yticklabels([]) axii1.set_xticklabels([]) |