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
|
|
From: Jody K. <jk...@uv...> - 2012-10-10 02:03:56
|
Hi Eric, > 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. I'd agree with this. pcolormesh is not even in the "See Also", and there is no warning about the effciency of pcolor. I'd even go so far as to suggest that pcolor be deprecated so new users are more likely to find pcolormesh. Anyway, thanks for the pointer! Cheers, Jody -- Jody Klymak http://web.uvic.ca/~jklymak/ |
|
From: Gökhan S. <gok...@gm...> - 2012-10-10 01:36:38
|
Hello, With a fresh git clone git://github.com/matplotlib/matplotlib.git sudo python setupegg.py develop Starting ipython --pylab I get this error: .../matplotlib/lib/matplotlib/dates.py in <module>() 120 import matplotlib.ticker as ticker 121 --> 122 from dateutil.rrule import rrule, MO, TU, WE, TH, FR, SA, SU, YEARLY, \ 123 MONTHLY, WEEKLY, DAILY, HOURLY, MINUTELY, SECONDLY 124 from dateutil.relativedelta import relativedelta ImportError: No module named dateutil.rrule Installing dateutil 1.5 fixes this. mpl install log shows the following: OPTIONAL DATE/TIMEZONE DEPENDENCIES dateutil: matplotlib will provide pytz: matplotlib will provide Will dateutil be shipped with mpl or this line needs to be updated? Thanks. -- Gökhan |
|
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)
|
|
From: Andre' Walker-L. <wal...@gm...> - 2012-10-08 18:51:40
|
Hi Jianbao, I used to try and install my python suite from src code on my own. Somewhere between the Mac OS 10.5, 10.6, migrating accounts, my python installation broke, and I never could get it all working again. Something related to 10.6 didn't have full backwards compatibility because of the switch to 64 bit architecture, so my binaries stopped working... many long frustrating days trying to figure it out. I eventually went to a friend of mine who does computing support for an astrophysics group, to get help solving my installation problems. He said, "Do you know about the Enthought python distribution?" So that changed my philosophy. If my computer-wiz-friend uses Enthought, I have no excuse not to. I have been happier ever since :) Also - I have recently come to love HDF5 (Hierarchical Data Format (Version) 5), which is a smart binary database with smart metadata mapping (maybe good for your research). Eg. on the big machines at NERSC, Livermore, Argonne, etc (meaning next generation super computers) HDF5 is one of the pieces of software they use to benchmark the performance of their file systems, and make sure this code scales to work with these new architectures. HDF5 is also professionally maintained. And the Enthought distribution comes with HDF5 and two python interfaces to it. From your description, I thought maybe you guys already use this. And if not, maybe it is worth looking into. Cheers, Andre On Oct 8, 2012, at 11:32 AM, Jianbao Tao wrote: > Hi Andre, > > Thanks for your message. I like it. :-) > > I do have a .edu email. I didn't try to install Chaco with EPD because I tend to be skeptical when it comes to a bundled package with a lot of stuff. I like it to be as simple as possible. But it seems that I am probably better off to install EPD as a whole. > > Cheers, > Jianbao > > On Mon, Oct 8, 2012 at 11:17 AM, Andre' Walker-Loud <wal...@gm...> wrote: > Hi Jianbao, > > One option for getting Chaco is to install the Enthought python disctribution > > http://www.enthought.com/ > > you can see from their package index, they install Chaco (and all needed libraries to make it work) > > http://www.enthought.com/products/epdlibraries.php > > If you have an email ending in ".edu" you can automatically get their academic version (fully functioning version - you just have to verify you are doing academic research). Since you mentioned you were at UC Berkeley, I assume you have .edu. > Their python installation works nicely, and installs itself in /Library/Frameworks/Python.framework/ so it plays nicely with the Mac GUI environment. Also, it will not overwrite any other installation you have - it makes its own install dir. > > UNFORTUNATELY - at the moment, it appears they are writing their new academic software licenses, so you can not download it right now. But there message promises it will soon be available again. > > I have found the Enthought installation to be MUCH more reliable than FINK or MacPorts (Enthought is also a private company - hence the quality installers etc, and they like to support academic work). > > > Cheers, > > Andre > > > > > > > On Oct 8, 2012, at 10: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) 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 from Stack Overflow, 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. :-( > > > > 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 > > |
|
From: Damon M. <dam...@gm...> - 2012-10-08 18:47:42
|
On Mon, Oct 8, 2012 at 4:37 PM, Jianbao Tao <jia...@gm...> wrote: > Problem: The autodatelocator and autodateformatter don't seem to work > properly. One, the formatter doesn't seem to work immediately after being > applied to an axis. A manual call to the locator seems necessary. Two, the > autodatelocator doesn't seem to be able to handle view intervals less than 1 > second, i.e., the tick labels don't show digits beyond second. You can see > this by zooming the example figure from the code below to a level shorter > than one second. > > 1. Operating system: OS X 10.8.2 > 2. matplotlib version: 1.2.0rc2 > 3. I installed matplotlib via: > > pip install > git+https://github.com/matplotlib/matplotlib.git#egg=matplotlib-dev > > 4. Backend: TkAgg, but I don't think the problem depends on the backend. > 5. Code: > #--------------------------------- code > ----------------------------------------------------- > # Running in ipython --pylab mode. > fig = figure() > tsta = num2epoch(date2num(datetime.datetime.now())) > tarr = tsta + arange(0, 60*30., 0.01) # half hour, dt = 0.01 sec > x = np.array(num2date(epoch2num(tarr))) > nt = len(tarr) > y = randn(nt) > > ax = fig.add_subplot(111) > ax.plot(x, y) > fig.canvas.draw() # Show an overall view of the data > > > locator = mpl.dates.AutoDateLocator() > formatter = mpl.dates.AutoDateFormatter(locator) > > formatter.scaled = { > 365.0 : '%Y', > 30. : '%b %Y', > 1.0 : '%b %d', > 1./24. : '%H:%M', > 1./24./60. : '%M:%S', > 1./24./60./60. : '%S', > } > ax.get_xaxis().set_major_formatter(formatter) # Won't work immediately. > locator.set_axis(ax.xaxis) # Have to manually make this call and the one > below. > locator.refresh() # Another manual call. > fig.canvas.draw() > #------------------------------------ end of code > -------------------------------------------------------- I put it on github: https://github.com/matplotlib/matplotlib/issues/1343 -- Damon McDougall http://www.damon-is-a-geek.com B2.39 Mathematics Institute University of Warwick Coventry West Midlands CV4 7AL United Kingdom |
|
From: Jianbao T. <jia...@gm...> - 2012-10-08 18:32:23
|
Hi Andre, Thanks for your message. I like it. :-) I do have a .edu email. I didn't try to install Chaco with EPD because I tend to be skeptical when it comes to a bundled package with a lot of stuff. I like it to be as simple as possible. But it seems that I am probably better off to install EPD as a whole. Cheers, Jianbao On Mon, Oct 8, 2012 at 11:17 AM, Andre' Walker-Loud <wal...@gm...>wrote: > Hi Jianbao, > > One option for getting Chaco is to install the Enthought python > disctribution > > http://www.enthought.com/ > > you can see from their package index, they install Chaco (and all needed > libraries to make it work) > > http://www.enthought.com/products/epdlibraries.php > > If you have an email ending in ".edu" you can automatically get their > academic version (fully functioning version - you just have to verify you > are doing academic research). Since you mentioned you were at UC Berkeley, > I assume you have .edu. > Their python installation works nicely, and installs itself in > /Library/Frameworks/Python.framework/ so it plays nicely with the Mac GUI > environment. Also, it will not overwrite any other installation you have - > it makes its own install dir. > > UNFORTUNATELY - at the moment, it appears they are writing their new > academic software licenses, so you can not download it right now. But > there message promises it will soon be available again. > > I have found the Enthought installation to be MUCH more reliable than FINK > or MacPorts (Enthought is also a private company - hence the quality > installers etc, and they like to support academic work). > > > Cheers, > > Andre > > > > > > > On Oct 8, 2012, at 10: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) 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 from Stack Overflow, 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. :-( > > > > 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 > > |
|
From: Eric F. <ef...@ha...> - 2012-10-08 18:29:20
|
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 > |
|
From: Andre' Walker-L. <wal...@gm...> - 2012-10-08 18:17:26
|
Hi Jianbao, One option for getting Chaco is to install the Enthought python disctribution http://www.enthought.com/ you can see from their package index, they install Chaco (and all needed libraries to make it work) http://www.enthought.com/products/epdlibraries.php If you have an email ending in ".edu" you can automatically get their academic version (fully functioning version - you just have to verify you are doing academic research). Since you mentioned you were at UC Berkeley, I assume you have .edu. Their python installation works nicely, and installs itself in /Library/Frameworks/Python.framework/ so it plays nicely with the Mac GUI environment. Also, it will not overwrite any other installation you have - it makes its own install dir. UNFORTUNATELY - at the moment, it appears they are writing their new academic software licenses, so you can not download it right now. But there message promises it will soon be available again. I have found the Enthought installation to be MUCH more reliable than FINK or MacPorts (Enthought is also a private company - hence the quality installers etc, and they like to support academic work). Cheers, Andre On Oct 8, 2012, at 10: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) 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 from Stack Overflow, 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. :-( > > 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 |
|
From: Jianbao T. <jia...@gm...> - 2012-10-08 17:55:47
|
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 from Stack 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. :-( 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 |
|
From: Andreas H. <li...@hi...> - 2012-10-08 17:18:31
|
> Hello, > > Is there any collection of articles that shows academic articles using > matplotlib produced plots? I have come across a few recent articles in my > field with plots produced by matplotlib. Though, the mpl page shows some > nice examples of publication quality plots, it would be nice to have a > discipline specific collection of academic paper citations/links > (hopefully > mostly open-access titles) to raise awareness of mpl usage in academia by > attracting other language users. > > What do you think? I like that idea. Probably, a wiki page at github would be best for this? |
|
From: Jianbao T. <jia...@gm...> - 2012-10-08 16:39:24
|
Bug to the bug report: In the subject, it should be 'Bug report', rather than 'But report'. Oops :-( Jianbao On Mon, Oct 8, 2012 at 9:37 AM, Jianbao Tao <jia...@gm...> wrote: > Problem: The autodatelocator and autodateformatter don't seem to work > properly. One, the formatter doesn't seem to work immediately after being > applied to an axis. A manual call to the locator seems necessary. Two, the > autodatelocator doesn't seem to be able to handle view intervals less than > 1 second, i.e., the tick labels don't show digits beyond second. You can > see this by zooming the example figure from the code below to a level > shorter than one second. > > 1. Operating system: OS X 10.8.2 > 2. matplotlib version: 1.2.0rc2 > 3. I installed matplotlib via: > > pip install git+https://github.com/matplotlib/matplotlib.git#egg=matplotlib-dev > > 4. Backend: TkAgg, but I don't think the problem depends on the backend. > 5. Code: > #--------------------------------- code > ----------------------------------------------------- > # Running in ipython --pylab mode. > fig = figure() > tsta = num2epoch(date2num(datetime.datetime.now())) > tarr = tsta + arange(0, 60*30., 0.01) # half hour, dt = 0.01 sec > x = np.array(num2date(epoch2num(tarr))) > nt = len(tarr) > y = randn(nt) > > ax = fig.add_subplot(111) > ax.plot(x, y) > fig.canvas.draw() # Show an overall view of the data > > > locator = mpl.dates.AutoDateLocator() > formatter = mpl.dates.AutoDateFormatter(locator) > > formatter.scaled = { > 365.0 : '%Y', > 30. : '%b %Y', > 1.0 : '%b %d', > 1./24. : '%H:%M', > 1./24./60. : '%M:%S', > 1./24./60./60. : '%S', > } > ax.get_xaxis().set_major_formatter(formatter) # Won't work immediately. > locator.set_axis(ax.xaxis) # Have to manually make this call and the one > below. > locator.refresh() # Another manual call. > fig.canvas.draw() > #------------------------------------ end of code > -------------------------------------------------------- > > |