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
(2) |
2
(32) |
3
(26) |
4
(29) |
5
(41) |
6
(2) |
|
7
(1) |
8
(13) |
9
(15) |
10
(23) |
11
(23) |
12
(16) |
13
(6) |
|
14
(15) |
15
(4) |
16
(18) |
17
(28) |
18
(17) |
19
(11) |
20
(6) |
|
21
(2) |
22
(4) |
23
(1) |
24
|
25
|
26
(1) |
27
(2) |
|
28
(2) |
29
(3) |
30
(10) |
31
(2) |
|
|
|
|
From: Nikolaus R. <Nik...@ra...> - 2012-10-09 22:41:41
|
Damon McDougall <dam...@pu...> writes:
> On Tue, Oct 9, 2012 at 10:56 PM, Damon McDougall
> <dam...@pu...> wrote:
>> On Tue, Oct 9, 2012 at 10:32 PM, Nikolaus Rath <Nik...@pu...> wrote:
>>> Hello,
>>>
>>> For some reason, my matplotlib isn't able to print percent signs ('%')
>>> properly:
>>>
>>> [1] inspiron:~/tmp# cat mplbug.py
>>>
>>> import matplotlib
>>> import matplotlib.pyplot as plt
>>> import numpy as np
>>>
>>> print matplotlib.__version__
>>> plt.plot(np.arange(10), np.arange(10)**2)
>>> plt.xlabel('Percent [%]')
>>> plt.savefig('mplbug.pdf')
>>>
>>> [0] inspiron:~/tmp# python mplbug.py
>>> 1.1.1rc2
>>>
>>> I have attached the resulting PDF. For some reason, the slash in the
>>> percent sign becomes a triangle that partially covers the upper left
>>> circle.
>>>
>>> Known bug? Any workarounds that don't require upgrading (I'd like to
>>> stick with the Debian package)?
>>
>> I'm using the AGG backend and saving to a png file without any
>> problems, but I'm using the current git master branch. I'll try to see
>> if I can recreate on 1.1.1rc2. Watch this space.
>
> No dice. I still can't recreate your problem on OS X 10.7.4 with
> matplotlib version 1.1.1-rc2.
>
> What are your font/tex specifications in the matplotlib.rcParams dictionary?
For me the problem occurs with PDF files, not PNG files. Or was that
just a typo?
Font specifications are all default.
# python -c 'import matplotlib; import pprint;
# pprint.pprint(matplotlib.rcParams)' | egrep 'tex'
'legend.handletextpad': 0.8,
'mathtext.bf': 'serif:bold',
'mathtext.cal': 'cursive',
'mathtext.default': 'it',
'mathtext.fallback_to_cm': True,
'mathtext.fontset': 'cm',
'mathtext.it': 'serif:italic',
'mathtext.rm': 'serif',
'mathtext.sf': 'sans\\-serif',
'mathtext.tt': 'monospace',
'text.antialiased': True,
'text.color': 'k',
'text.dvipnghack': None,
'text.hinting': True,
'text.latex.preamble': [''],
'text.latex.preview': False,
'text.latex.unicode': False,
'text.usetex': False,
Best,
-Nikolaus
--
»Time flies like an arrow, fruit flies like a Banana.«
PGP fingerprint: 5B93 61F8 4EA2 E279 ABF6 02CF A9AD B7F8 AE4E 425C
|
|
From: Damon M. <dam...@gm...> - 2012-10-09 21:02:04
|
On Tue, Oct 9, 2012 at 10:56 PM, Damon McDougall
<dam...@gm...> wrote:
> On Tue, Oct 9, 2012 at 10:32 PM, Nikolaus Rath <Nik...@ra...> wrote:
>> Hello,
>>
>> For some reason, my matplotlib isn't able to print percent signs ('%')
>> properly:
>>
>> [1] inspiron:~/tmp# cat mplbug.py
>>
>> import matplotlib
>> import matplotlib.pyplot as plt
>> import numpy as np
>>
>> print matplotlib.__version__
>> plt.plot(np.arange(10), np.arange(10)**2)
>> plt.xlabel('Percent [%]')
>> plt.savefig('mplbug.pdf')
>>
>> [0] inspiron:~/tmp# python mplbug.py
>> 1.1.1rc2
>>
>> I have attached the resulting PDF. For some reason, the slash in the
>> percent sign becomes a triangle that partially covers the upper left
>> circle.
>>
>> Known bug? Any workarounds that don't require upgrading (I'd like to
>> stick with the Debian package)?
>>
>>
>> Thanks,
>>
>> -Nikolaus
>>
>> --
>> »Time flies like an arrow, fruit flies like a Banana.«
>>
>> PGP fingerprint: 5B93 61F8 4EA2 E279 ABF6 02CF A9AD B7F8 AE4E 425C
>
> I'm using the AGG backend and saving to a png file without any
> problems, but I'm using the current git master branch. I'll try to see
> if I can recreate on 1.1.1rc2. Watch this space.
No dice. I still can't recreate your problem on OS X 10.7.4 with
matplotlib version 1.1.1-rc2.
What are your font/tex specifications in the matplotlib.rcParams dictionary?
--
Damon McDougall
http://www.damon-is-a-geek.com
B2.39
Mathematics Institute
University of Warwick
Coventry
West Midlands
CV4 7AL
United Kingdom
|
|
From: Damon M. <dam...@gm...> - 2012-10-09 20:56:36
|
On Tue, Oct 9, 2012 at 10:32 PM, Nikolaus Rath <Nik...@ra...> wrote:
> Hello,
>
> For some reason, my matplotlib isn't able to print percent signs ('%')
> properly:
>
> [1] inspiron:~/tmp# cat mplbug.py
>
> import matplotlib
> import matplotlib.pyplot as plt
> import numpy as np
>
> print matplotlib.__version__
> plt.plot(np.arange(10), np.arange(10)**2)
> plt.xlabel('Percent [%]')
> plt.savefig('mplbug.pdf')
>
> [0] inspiron:~/tmp# python mplbug.py
> 1.1.1rc2
>
> I have attached the resulting PDF. For some reason, the slash in the
> percent sign becomes a triangle that partially covers the upper left
> circle.
>
> Known bug? Any workarounds that don't require upgrading (I'd like to
> stick with the Debian package)?
>
>
> Thanks,
>
> -Nikolaus
>
> --
> »Time flies like an arrow, fruit flies like a Banana.«
>
> PGP fingerprint: 5B93 61F8 4EA2 E279 ABF6 02CF A9AD B7F8 AE4E 425C
I'm using the AGG backend and saving to a png file without any
problems, but I'm using the current git master branch. I'll try to see
if I can recreate on 1.1.1rc2. Watch this space.
--
Damon McDougall
http://www.damon-is-a-geek.com
B2.39
Mathematics Institute
University of Warwick
Coventry
West Midlands
CV4 7AL
United Kingdom
|
|
From: Daπid <dav...@gm...> - 2012-10-09 20:52:08
|
On Windows it works just fine. Just a wild guess, can you try to make
it a raw string?
plt.xlabel(r'Percent [%]')
On Tue, Oct 9, 2012 at 10:45 PM, Francesco Montesano
<fra...@gm...> wrote:
> Hi
>
> 2012/10/9 Nikolaus Rath <Nik...@ra...>
>>
>> Hello,
>>
>> For some reason, my matplotlib isn't able to print percent signs ('%')
>> properly:
>>
>> [1] inspiron:~/tmp# cat mplbug.py
>>
>> import matplotlib
>> import matplotlib.pyplot as plt
>> import numpy as np
>>
>> print matplotlib.__version__
>> plt.plot(np.arange(10), np.arange(10)**2)
>> plt.xlabel('Percent [%]')
>> plt.savefig('mplbug.pdf')
>>
>> [0] inspiron:~/tmp# python mplbug.py
>> 1.1.1rc2
>>
>> I have attached the resulting PDF. For some reason, the slash in the
>> percent sign becomes a triangle that partially covers the upper left
>> circle.
>>
>> Known bug? Any workarounds that don't require upgrading (I'd like to
>> stick with the Debian package)?
>
>
> confirmed for pdf and eps figures. For jpg and png, as well as the
> matplotlib window with TkAgg the percentage looks fine.
> matplotlib version: 1.1.1 shipped with kubuntu 12.10
>
> Francesco
>
>>
>>
>>
>> Thanks,
>>
>> -Nikolaus
>>
>> --
>> »Time flies like an arrow, fruit flies like a Banana.«
>>
>> PGP fingerprint: 5B93 61F8 4EA2 E279 ABF6 02CF A9AD B7F8 AE4E 425C
>>
>>
>> ------------------------------------------------------------------------------
>> Don't let slow site performance ruin your business. Deploy New Relic APM
>> Deploy New Relic app performance management and know exactly
>> what is happening inside your Ruby, Python, PHP, Java, and .NET app
>> Try New Relic at no cost today and get our sweet Data Nerd shirt too!
>> http://p.sf.net/sfu/newrelic-dev2dev
>> _______________________________________________
>> Matplotlib-users mailing list
>> Mat...@li...
>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>>
>
>
> ------------------------------------------------------------------------------
> Don't let slow site performance ruin your business. Deploy New Relic APM
> Deploy New Relic app performance management and know exactly
> what is happening inside your Ruby, Python, PHP, Java, and .NET app
> Try New Relic at no cost today and get our sweet Data Nerd shirt too!
> http://p.sf.net/sfu/newrelic-dev2dev
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
|
|
From: Francesco M. <fra...@gm...> - 2012-10-09 20:46:25
|
Hi
2012/10/9 Nikolaus Rath <Nik...@ra...>
> Hello,
>
> For some reason, my matplotlib isn't able to print percent signs ('%')
> properly:
>
> [1] inspiron:~/tmp# cat mplbug.py
>
> import matplotlib
> import matplotlib.pyplot as plt
> import numpy as np
>
> print matplotlib.__version__
> plt.plot(np.arange(10), np.arange(10)**2)
> plt.xlabel('Percent [%]')
> plt.savefig('mplbug.pdf')
>
> [0] inspiron:~/tmp# python mplbug.py
> 1.1.1rc2
>
> I have attached the resulting PDF. For some reason, the slash in the
> percent sign becomes a triangle that partially covers the upper left
> circle.
>
> Known bug? Any workarounds that don't require upgrading (I'd like to
> stick with the Debian package)?
>
confirmed for pdf and eps figures. For jpg and png, as well as the
matplotlib window with TkAgg the percentage looks fine.
matplotlib version: 1.1.1 shipped with kubuntu 12.10
Francesco
>
>
> Thanks,
>
> -Nikolaus
>
> --
> »Time flies like an arrow, fruit flies like a Banana.«
>
> PGP fingerprint: 5B93 61F8 4EA2 E279 ABF6 02CF A9AD B7F8 AE4E 425C
>
>
> ------------------------------------------------------------------------------
> Don't let slow site performance ruin your business. Deploy New Relic APM
> Deploy New Relic app performance management and know exactly
> what is happening inside your Ruby, Python, PHP, Java, and .NET app
> Try New Relic at no cost today and get our sweet Data Nerd shirt too!
> http://p.sf.net/sfu/newrelic-dev2dev
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
>
|
|
From: Rich S. <rsi...@us...> - 2012-10-09 20:38:21
|
Matplotlib folks, Probably the two most common web map services are the OGC-standard WMS service and ESRI's non-standard custom REST service. I was looking for how to do WMS request in basemap and found "testarcgisimage.py" which uses the "arcgisimage" method. It look like there was a "wmsimage" method in Basemap that was folded into a "arcgisimage" method? I think users might find that confusing (at least I did). Should these methods be different? Also for the WMS request, we want to make sure that it's possible to specify ELEVATION and TIME as parameters, since these are necessary to require WMS from > 2D datasets (e.g. time series of remote sensing data, 4D atmospheric and oceanic models, etc). 1. Example of ArcGIS REST request: http://server.arcgisonline.com/ArcGIS/rest/services/NatGeo_World_Map/MapServer/export?bbox=-1,0,-1,0&bboxSR=4326&imageSR=4326&size=600,800&dpi=96&format=png32&f=image 2. Example of OGC-compliant WMS request, here requesting from temperature data from NAM at 2 m above ground (ELEVATION=2) and for a specified time (TIME=2012-10-09T00%3A00%3A00.000Z). Motherlode only keeps data around for a week or so, so if the URL below stops working, try a date that is more current. http://motherlode.ucar.edu:8080/thredds/wms/fmrc/NCEP/NAM/CONUS_12km/NCEP-NAM-CONUS_12km-noaaport_best.ncd?LAYERS=Temperature_height_above_ground&ELEVATION=2&TIME=2012-10-09T00%3A00%3A00.000Z&TRANSPARENT=true&STYLES=boxfill%2Frainbow&CRS=EPSG%3A4326&COLORSCALERANGE=271.2%2C308&NUMCOLORBANDS=20&LOGSCALE=false&SERVICE=WMS&VERSION=1.3.0&REQUEST=GetMap&EXCEPTIONS=XML&FORMAT=image%2Fpng&BBOX=-118.82657218194,22.15128433311,-108.63100087893,32.34685563612&WIDTH=256&HEIGHT=256 Thanks, Rich -- Dr. Richard P. Signell USGS, 384 Woods Hole Rd. Woods Hole, MA 02543-1598 |
|
From: Nikolaus R. <Nik...@ra...> - 2012-10-09 20:32:25
|
Hello,
For some reason, my matplotlib isn't able to print percent signs ('%')
properly:
[1] inspiron:~/tmp# cat mplbug.py
import matplotlib
import matplotlib.pyplot as plt
import numpy as np
print matplotlib.__version__
plt.plot(np.arange(10), np.arange(10)**2)
plt.xlabel('Percent [%]')
plt.savefig('mplbug.pdf')
[0] inspiron:~/tmp# python mplbug.py
1.1.1rc2
I have attached the resulting PDF. For some reason, the slash in the
percent sign becomes a triangle that partially covers the upper left
circle.
Known bug? Any workarounds that don't require upgrading (I'd like to
stick with the Debian package)?
Thanks,
-Nikolaus
--
»Time flies like an arrow, fruit flies like a Banana.«
PGP fingerprint: 5B93 61F8 4EA2 E279 ABF6 02CF A9AD B7F8 AE4E 425C
|
|
From: Pierre H. <pie...@cr...> - 2012-10-09 15:17:35
|
Hi, Le 09/10/2012 16:37, Warren Weckesser a écrit : > > That's strange. `imshow(img, interpolation='nearest')` works for me. > I'm not sure I understand well the subtle difference between 'nearest' and 'none' interpolations, but I found in this commit https://github.com/jkseppan/matplotlib/commit/6923c7f04fbafa23766250d710cc6b37373c816f a PDF file (interp_nearest_vs_none.pdf) which compares the output of imshow with these two different settings. It seems there is a difference in where the boundaries of pixels are... Maybe somebody familiar with this 'nearest' and 'none' topic could edit the interpolation example ? (http://matplotlib.org/examples/pylab_examples/image_interp.html) Best, Pierre |
|
From: Warren W. <war...@en...> - 2012-10-09 15:01:30
|
On Tue, Oct 9, 2012 at 10:11 AM, Anand Sivaramakrishnan <an...@st...>wrote:
> I ask having trouble getting imshow to plot e.g. a detector image
> showing pixels as little rectangular or square uniform color blocks -
> imshow seems to want to interpolate or smooth the image.
> Using imshow("nearest") still produces a 'soft' image.
>
That's strange. `imshow(img, interpolation='nearest')` works for me.
Warren
>
> I have solved this problem earlier using figimage(), but that was a lot
> of work (I had to create a pixel-by-pixel array with all greyscale values
> set myself, and then I was working in pixel coordinates rather than my data
> coordinates). Has anyone figured out how to get imshow to stop smoothing
> the image? Using imshow(… interpolation='none'…) or imshow(…
> interpolation=None…) raise exceptions.
>
> I found NonUniformImage too hard to figure out from the documentation.
>
>
> ------------------------------------------------------------------------------
> Don't let slow site performance ruin your business. Deploy New Relic APM
> Deploy New Relic app performance management and know exactly
> what is happening inside your Ruby, Python, PHP, Java, and .NET app
> Try New Relic at no cost today and get our sweet Data Nerd shirt too!
> http://p.sf.net/sfu/newrelic-dev2dev
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
>
|
|
From: Benjamin R. <ben...@ou...> - 2012-10-09 14:26:10
|
On Tue, Oct 9, 2012 at 10:11 AM, Anand Sivaramakrishnan <an...@st...>wrote:
> I ask having trouble getting imshow to plot e.g. a detector image
> showing pixels as little rectangular or square uniform color blocks -
> imshow seems to want to interpolate or smooth the image.
> Using imshow("nearest") still produces a 'soft' image.
>
> I have solved this problem earlier using figimage(), but that was a lot
> of work (I had to create a pixel-by-pixel array with all greyscale values
> set myself, and then I was working in pixel coordinates rather than my data
> coordinates). Has anyone figured out how to get imshow to stop smoothing
> the image? Using imshow(… interpolation='none'…) or imshow(…
> interpolation=None…) raise exceptions.
>
> I found NonUniformImage too hard to figure out from the documentation.
>
>
If you are using mpl v1.1.x or greater, try interpolation='none'. Note,
that is the string 'none', not the python None.
Ben Root
|
|
From: Anand S. <an...@st...> - 2012-10-09 14:11:30
|
I ask having trouble getting imshow to plot e.g. a detector image showing pixels as little rectangular or square uniform color blocks - imshow seems to want to interpolate or smooth the image.
Using imshow("nearest") still produces a 'soft' image.
I have solved this problem earlier using figimage(), but that was a lot of work (I had to create a pixel-by-pixel array with all greyscale values set myself, and then I was working in pixel coordinates rather than my data coordinates). Has anyone figured out how to get imshow to stop smoothing the image? Using imshow(… interpolation='none'…) or imshow(… interpolation=None…) raise exceptions.
I found NonUniformImage too hard to figure out from the documentation.
|
|
From: Eric F. <ef...@ha...> - 2012-10-09 06:10:34
|
On 2012/10/08 6:21 PM, Jody Klymak wrote:
> Hi Eric,
>
> Not sure if this is exactly what Jinbao is referring to, but:
>
> ax=gca()
> X = randn(300,300)
> pcolor(X)
> ax.set_yscale('log')
> ylim(1,100)
>
> Brings my computer to a standstill for over a minute. Removing the "set_yscale" command speeds things up a lot.
>
> Same thing takes about 2 s in Matlab.
That's why I wanted to see an example of the problem. If you change
"pcolor" above to "pcolormesh" you will see a big speedup. (0.008 s for
the three plotting commands on my machine.)
pcolor is fundamentally slow, as you discovered, and should be used only
for small arrays and/or when, for some reason, one really needs the
Collection that it returns. The pcolormesh docstring notes that it is
much faster than pcolor; the pcolor docstring probably should refer
people to pcolormesh, since matlab users are likely to go straight to
pcolor without realizing that they should be using pcolormesh. (For
linear axes, the pcolorfast axes method can be even faster, but it does
not support log axes at present.)
Eric
>
> Cheers, Jody
>
>
> On Oct 8, 2012, at 11:29 AM, Eric Firing <ef...@ha...> wrote:
>
>> On 2012/10/08 7:55 AM, Jianbao Tao wrote:
>>> Hi all,
>>>
>>> A little background: I am from the space physics field where a lot of
>>> people watch/analyze satellite data for a living. This is a field
>>> currently dominated by IDL in terms of visualization/analysis software.
>>> I was a happy IDL user until I saw those very, very, I mean, seriously,
>>> very, very pretty matplotlib plots a couple of weeks ago. Although I was
>>> happy with IDL most of the time, I always hated the feel of IDL plots on
>>> screen.
>>>
>>> So, I decided to make my move from IDL to python + numpy + scipy +
>>> matplotlib. However, this is not a trivial move. One major thing that
>>> makes me stick to IDL in the first place is the Tplot package (bundled
>>> into THEMIS Data Analysis Software, a.k.a.,TDAS
>>> <http://themis.ssl.berkeley.edu/software.shtml>) developed at my own
>>> lab, the Space Sciences Lab at UC Berkeley. I must have something
>>> equivalent to Tplot to work efficiently on the python platform. In order
>>> to do that, there are two problems to solve. First, a utility module is
>>> required to load data that are in NASA CDF format. Second, a 2D plotting
>>> application is required with the following features: 1) Able to handle
>>> large amount vector data, 2) able to display spectrogram with log scale
>>> axis quickly, and 3) convenient toolbar to navigate the data.
>>>
>>> I have written a module that can quickly load data in CDF files in
>>> cython, with help from the cython and the numpy communities. I have also
>>> gotten the third plotting feature working with a customized navigation
>>> toolbar, thanks to the help I received in this mailing list. However, I
>>> haven't figured out how to get the first two plotting features.
>>> Matplotlib is known for its slow speed when it comes to large data sets.
>>> However, it seems some other packages can plot large data sets very
>>> fast, although not as pretty as matplotlib. So, I am wondering what
>>> makes matplotlib so slow. Is it because the anti-aliasing engine? If so,
>>> is it possible to turn it on or off flexibly to compromise between
>>> performance and quality? Also, is it possible to convert the bottle-neck
>>> bit of the code into cython to speed up matplotlib? As for spectrograms
>>> with log scale axis, I found a working solution fromStack Overflow
>>> <http://stackoverflow.com/questions/10812189/creating-a-log-frequency-axis-spectrogram-using-specgram-in-matplotlib>,
>>> but it is simply too slow. So, again, why is it so slow?
>>>
>>> So, for my purposes, my real problem now is the slow speed of
>>> matplotlib. I tried other packages, such as pyqtgraph, pyqwt, and
>>> Chaco/Traits. They seem to be faster, but they have serious problems
>>> too. Pyqtgraph seems very promising, but it seems to be in an infant
>>> stage for now with serious bugs. For example, I can't get it working
>>> together with matplotlib. PyQwt/guiqwt is reasonably robust, but it has
>>> too many dependencies in my opinion, and doesn't seem to have a wide
>>> user base. Chaco/Traits seems another viable possibility, especially
>>> considering the fact that it is actually supported by a company, but I
>>> didn't get a chance to see their performance and quality because I can't
>>> install Enable, a necessary bit for Chaco, on my mac. (But the fact that
>>> Chaco/Traits is supported by a real company is a real plus to me. If I
>>> can't eventually speed up matplotlib, I will probably give it another shot.)
>>>
>>> I have one idea to speed up line plots in matplotlib on screen, which is
>>> basically down-sampling the data before plotting. Basically, my idea is
>>> to down-sample the data into a level that one pixel only corresponds to
>>> one data point. Apparently, one must have enough information to
>>> determine the mapping between the data and the pixels on screen.
>>> However, such an overhead is just to maintain some house-keeping
>>> information, which I suppose is minimal.
>>>
>>> I have no idea how to speed up the log-scale spectrogram plot at the
>>> moment. :-(
>>
>> For each type of plot, I suggest you provide a very minimal script,
>> generating its own fake data, that illustrates the problem and that can
>> serve as a benchmark and test jig for speed-ups. Without these
>> examples, it is somewhere between difficult and impossible for anyone to
>> make useful suggestions.
>>
>> Eric
>>
>>>
>>> So, the bottom line: What are the options to speed up matplotlib? Your
>>> comments and insights are very much appreciated. :-)
>>>
>>> Thank you for reading.
>>>
>>> Cheers,
>>> Jianbao
>>>
>>>
>>> ------------------------------------------------------------------------------
>>> Don't let slow site performance ruin your business. Deploy New Relic APM
>>> Deploy New Relic app performance management and know exactly
>>> what is happening inside your Ruby, Python, PHP, Java, and .NET app
>>> Try New Relic at no cost today and get our sweet Data Nerd shirt too!
>>> http://p.sf.net/sfu/newrelic-dev2dev
>>>
>>>
>>>
>>> _______________________________________________
>>> Matplotlib-users mailing list
>>> Mat...@li...
>>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>>>
>>
>>
>> ------------------------------------------------------------------------------
>> Don't let slow site performance ruin your business. Deploy New Relic APM
>> Deploy New Relic app performance management and know exactly
>> what is happening inside your Ruby, Python, PHP, Java, and .NET app
>> Try New Relic at no cost today and get our sweet Data Nerd shirt too!
>> http://p.sf.net/sfu/newrelic-dev2dev
>> _______________________________________________
>> Matplotlib-users mailing list
>> Mat...@li...
>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
> --
> Jody Klymak
> http://web.uvic.ca/~jklymak/
>
>
>
>
>
> ------------------------------------------------------------------------------
> Don't let slow site performance ruin your business. Deploy New Relic APM
> Deploy New Relic app performance management and know exactly
> what is happening inside your Ruby, Python, PHP, Java, and .NET app
> Try New Relic at no cost today and get our sweet Data Nerd shirt too!
> http://p.sf.net/sfu/newrelic-dev2dev
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
|
|
From: Jody K. <jk...@uv...> - 2012-10-09 04:22:02
|
Hi Eric,
Not sure if this is exactly what Jinbao is referring to, but:
ax=gca()
X = randn(300,300)
pcolor(X)
ax.set_yscale('log')
ylim(1,100)
Brings my computer to a standstill for over a minute. Removing the "set_yscale" command speeds things up a lot.
Same thing takes about 2 s in Matlab.
Cheers, Jody
On Oct 8, 2012, at 11:29 AM, Eric Firing <ef...@ha...> wrote:
> On 2012/10/08 7:55 AM, Jianbao Tao wrote:
>> Hi all,
>>
>> A little background: I am from the space physics field where a lot of
>> people watch/analyze satellite data for a living. This is a field
>> currently dominated by IDL in terms of visualization/analysis software.
>> I was a happy IDL user until I saw those very, very, I mean, seriously,
>> very, very pretty matplotlib plots a couple of weeks ago. Although I was
>> happy with IDL most of the time, I always hated the feel of IDL plots on
>> screen.
>>
>> So, I decided to make my move from IDL to python + numpy + scipy +
>> matplotlib. However, this is not a trivial move. One major thing that
>> makes me stick to IDL in the first place is the Tplot package (bundled
>> into THEMIS Data Analysis Software, a.k.a.,TDAS
>> <http://themis.ssl.berkeley.edu/software.shtml>) developed at my own
>> lab, the Space Sciences Lab at UC Berkeley. I must have something
>> equivalent to Tplot to work efficiently on the python platform. In order
>> to do that, there are two problems to solve. First, a utility module is
>> required to load data that are in NASA CDF format. Second, a 2D plotting
>> application is required with the following features: 1) Able to handle
>> large amount vector data, 2) able to display spectrogram with log scale
>> axis quickly, and 3) convenient toolbar to navigate the data.
>>
>> I have written a module that can quickly load data in CDF files in
>> cython, with help from the cython and the numpy communities. I have also
>> gotten the third plotting feature working with a customized navigation
>> toolbar, thanks to the help I received in this mailing list. However, I
>> haven't figured out how to get the first two plotting features.
>> Matplotlib is known for its slow speed when it comes to large data sets.
>> However, it seems some other packages can plot large data sets very
>> fast, although not as pretty as matplotlib. So, I am wondering what
>> makes matplotlib so slow. Is it because the anti-aliasing engine? If so,
>> is it possible to turn it on or off flexibly to compromise between
>> performance and quality? Also, is it possible to convert the bottle-neck
>> bit of the code into cython to speed up matplotlib? As for spectrograms
>> with log scale axis, I found a working solution fromStack Overflow
>> <http://stackoverflow.com/questions/10812189/creating-a-log-frequency-axis-spectrogram-using-specgram-in-matplotlib>,
>> but it is simply too slow. So, again, why is it so slow?
>>
>> So, for my purposes, my real problem now is the slow speed of
>> matplotlib. I tried other packages, such as pyqtgraph, pyqwt, and
>> Chaco/Traits. They seem to be faster, but they have serious problems
>> too. Pyqtgraph seems very promising, but it seems to be in an infant
>> stage for now with serious bugs. For example, I can't get it working
>> together with matplotlib. PyQwt/guiqwt is reasonably robust, but it has
>> too many dependencies in my opinion, and doesn't seem to have a wide
>> user base. Chaco/Traits seems another viable possibility, especially
>> considering the fact that it is actually supported by a company, but I
>> didn't get a chance to see their performance and quality because I can't
>> install Enable, a necessary bit for Chaco, on my mac. (But the fact that
>> Chaco/Traits is supported by a real company is a real plus to me. If I
>> can't eventually speed up matplotlib, I will probably give it another shot.)
>>
>> I have one idea to speed up line plots in matplotlib on screen, which is
>> basically down-sampling the data before plotting. Basically, my idea is
>> to down-sample the data into a level that one pixel only corresponds to
>> one data point. Apparently, one must have enough information to
>> determine the mapping between the data and the pixels on screen.
>> However, such an overhead is just to maintain some house-keeping
>> information, which I suppose is minimal.
>>
>> I have no idea how to speed up the log-scale spectrogram plot at the
>> moment. :-(
>
> For each type of plot, I suggest you provide a very minimal script,
> generating its own fake data, that illustrates the problem and that can
> serve as a benchmark and test jig for speed-ups. Without these
> examples, it is somewhere between difficult and impossible for anyone to
> make useful suggestions.
>
> Eric
>
>>
>> So, the bottom line: What are the options to speed up matplotlib? Your
>> comments and insights are very much appreciated. :-)
>>
>> Thank you for reading.
>>
>> Cheers,
>> Jianbao
>>
>>
>> ------------------------------------------------------------------------------
>> Don't let slow site performance ruin your business. Deploy New Relic APM
>> Deploy New Relic app performance management and know exactly
>> what is happening inside your Ruby, Python, PHP, Java, and .NET app
>> Try New Relic at no cost today and get our sweet Data Nerd shirt too!
>> http://p.sf.net/sfu/newrelic-dev2dev
>>
>>
>>
>> _______________________________________________
>> Matplotlib-users mailing list
>> Mat...@li...
>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>>
>
>
> ------------------------------------------------------------------------------
> Don't let slow site performance ruin your business. Deploy New Relic APM
> Deploy New Relic app performance management and know exactly
> what is happening inside your Ruby, Python, PHP, Java, and .NET app
> Try New Relic at no cost today and get our sweet Data Nerd shirt too!
> http://p.sf.net/sfu/newrelic-dev2dev
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
--
Jody Klymak
http://web.uvic.ca/~jklymak/
|
|
From: Mike K. <mc...@gm...> - 2012-10-09 03:46:05
|
On 10/8/12 11:03 PM, Paul Tremblay wrote: > I often have to make graphs with time series, with each point being the > start of a week. Below is the result I wish: > > However, in order to make the secondary x axis the the month labels, I > need something like 40 lines of code. My strategy consists in first > drawing the rates in the normal way and using matplotlib's dateFormatter > to set the week numbers. That part is easy. > > In order to draw the x axis below to show when the weeks occur, I draw > two more lines, and makes these lines invisible. The first line has as > the x points the start of each month, and the y values as the > corresponding rate. The second line has as its x value the middle of > each month, with the corresponding y value. > > Below is my code. I have to use such a graph quite often--so often, in > fact, that if I don't find an easier way to make the secondary x axis, I > will store the code in my own library for re-use. Does anyone know of a > simpler, more elegant way? > Don't have time to prove that I can reproduce what you want, but try parasite axes with axes_grid1: the example is for one on the right-hand side, but I think it'll do what you want. http://matplotlib.org/mpl_toolkits/axes_grid/users/overview.html#axisartist-with-parasiteaxes M |
|
From: Paul T. <pau...@gm...> - 2012-10-09 03:03:49
|
I often have to make graphs with time series, with each point being the
start of a week. Below is the result I wish:
However, in order to make the secondary x axis the the month labels, I
need something like 40 lines of code. My strategy consists in first
drawing the rates in the normal way and using matplotlib's dateFormatter
to set the week numbers. That part is easy.
In order to draw the x axis below to show when the weeks occur, I draw
two more lines, and makes these lines invisible. The first line has as
the x points the start of each month, and the y values as the
corresponding rate. The second line has as its x value the middle of
each month, with the corresponding y value.
Below is my code. I have to use such a graph quite often--so often, in
fact, that if I don't find an easier way to make the secondary x axis, I
will store the code in my own library for re-use. Does anyone know of a
simpler, more elegant way?
Thanks!
Paul
import matplotlib
import matplotlib.pyplot as plt
import numpy as np
import matplotlib.dates
from datetime import datetime
from datetime import timedelta
def unique_months(dates, rates):
"""
returns two lists, one of the first time a month occurs, the
second, the
rates representing that month
"""
y = [rates[0]]
temp = dates[0] - timedelta(days=dates[0].day)
months = [temp]
found = [dates[0].month]
counter = 0
for d in dates:
month = d.month
if month not in found:
new_date = d - timedelta(days=d.day)
months.append(new_date)
y.append(rates[counter])
found.append(month)
counter += 1
return (months, y)
def half_months(dates, defects):
"""
returns two lists, one the middle of the month occurs, the second, the
rates representing that month
"""
months, y = unique_months(dates, defects)
new_months =[]
new_y = []
counter = 0
for m in months:
new_date = m - timedelta(days=m.day) + timedelta(days=15)
if new_date <= months[-1]:
new_months.append(new_date)
new_y.append(y[counter])
counter += 1
return new_months, new_y
dates = [datetime(2012,8,19), datetime(2012,8,26),datetime(2012, 9, 3),
datetime(2012,9,10), datetime(2012,9,17), datetime(2012,9,24),
datetime(2012,10,1), datetime(2012,10,8)]
rates = [2,3,4,2,5,3,7,2]
fig = plt.figure()
fig.set_size_inches(3,3)
x1, y1 = unique_months(dates, rates)
ax = fig.add_subplot(1,1,1)
ax.yaxis.grid(True, linestyle='-', which='major', color='lightgrey',
alpha=0.5)
ax.set_axisbelow(True)
fig.subplots_adjust(bottom=0.2, right=0.85, wspace=.8, hspace=.8)
# plot dates and rates
ax.plot(dates, rates)
ax.xaxis.set_major_formatter(matplotlib.dates.DateFormatter('%W'))
# start with bottom axis
x2, y2 = half_months(dates, rates)
# add tick marks for start of month
# x1 starts at first of each mont; y1 doesn't matter
newax = fig.add_axes(ax.get_position())
newax.spines['bottom'].set_position(('outward', 25))
newax.patch.set_visible(False)
newax.yaxis.set_visible(False)
newax.plot_date(x1, y1, visible=False)
newax.xaxis.set_major_locator( matplotlib.dates.MonthLocator())
newax.set_xticklabels([])
# set labels for months, inbetween tick marsk
# x2 is 15th of each month
axmlab = fig.add_axes(ax.get_position())
axmlab.spines['bottom'].set_position(('outward', 25))
axmlab.patch.set_visible(False)
axmlab.yaxis.set_visible(False)
axmlab.plot_date(x2, y2, visible=False)
axmlab.xaxis.set_major_formatter( matplotlib.dates.DateFormatter('%b'))
axmlab.xaxis.set_major_locator(matplotlib.dates.DayLocator(bymonthday=1))
# get rid of tick marks for this axis
for i, line in enumerate(axmlab.get_xticklines() + newax.get_yticklines()):
line.set_visible(False)
axmlab.plot_date(x2, y2, visible=False)
axmlab.xaxis.set_major_locator( matplotlib.dates.MonthLocator())
plt.xlabel('Week in Year')
ax.set_ylabel('Rates')
plt.savefig('temp.png', dpi=100)
|