SourceForge logo
SourceForge logo
Menu

matplotlib-users — Discussion related to using matplotlib

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
(5)
3
(8)
4
(6)
5
(9)
6
(7)
7
(6)
8
(10)
9
(27)
10
(7)
11
(22)
12
(13)
13
(7)
14
(4)
15
(12)
16
(32)
17
(26)
18
(14)
19
(1)
20
(11)
21
(6)
22
(11)
23
(17)
24
(18)
25
(28)
26
(11)
27
(6)
28
(1)
29
(10)
30
(12)




Showing results of 346

<< < 1 2 3 4 5 6 .. 14 > >> (Page 4 of 14)
From: Michael D. <md...@st...> - 2008年09月24日 13:02:12
de_DE@euro is perfectly valid and works fine with Python 2.5.2 on my 
machine, so it would appear it's not a Python shortcoming.
I suspect this is related to these lines:
Saber Mbarek wrote:
> locale: Cannot set LC_CTYPE to default locale: No such file or directory
> locale: Cannot set LC_MESSAGES to default locale: No such file or 
> directory
> locale: Cannot set LC_ALL to default locale: No such file or directory
This (usually) indicates that the definitions for the locale you've 
specified are not installed.
If you do
"locale -a"
is de_DE@euro listed?
If not, it's possible you're missing a package. But this is looking 
like a system configuration error, not a matplotlib one.
You may also get some clues from this Python bug:
http://bugs.python.org/issue1443504
Hope that at least helps. Sorry I can't suggest anything else -- I've 
never actually seen this myself, but then I work in a little 
English-speaking, U.S.-centric ignorance bubble ;)
Mike
> ------------------------------------------------------------------------
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
> Build the coolest Linux based applications with Moblin SDK & win great prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> ------------------------------------------------------------------------
>
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
> 
-- 
Michael Droettboom
Science Software Branch
Operations and Engineering Division
Space Telescope Science Institute
Operated by AURA for NASA
From: John H. <jd...@gm...> - 2008年09月24日 12:45:37
On Wed, Sep 24, 2008 at 6:05 AM, Saju Pillai <saj...@gm...> wrote:
> Hi,
>
> Just started playing with matplotlib and it is very impressive.
>
> I have a question on controlling the x-axis values being plotted.
> Say I am recording a stock price every hour from say 10am to 3pm on a
> daily basis. I am trying to plot a multi-day chart such that after the
> data for 3pm on Day 1 is plotted, the next data should be for 10am on
> Day 2. Currently matplotlib is automatically adding all the hours from
> 3pm on Day 1 till 10pm on Day 2 even if I am only supplying the x-axis
> values that I want to be plotted.
Take a look at the date_index_formatter.py example -- this uses daily
data and skips the weekends but it is conceptually similar to your
problem
 http://matplotlib.sourceforge.net/examples/pylab_examples/date_index_formatter.py
The approach is to plot evently spaced indices for the xaxis, and then
use your date vector as a lookup table for formatting the x
locations. The same approach could be used for a date index locator,
to put the ticks where you want them. See the chapter on tick
locating and formatting in the user's guide for background, and let me
know if you get stuck.
From: Saber M. <ms...@go...> - 2008年09月24日 12:26:01
hier is the output of locale:
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
LANG=de_DE@euro
LANGUAGE=de_DE:de:en_GB:en
LC_CTYPE="de_DE@euro"
LC_NUMERIC="de_DE@euro"
LC_TIME="de_DE@euro"
LC_COLLATE="de_DE@euro"
LC_MONETARY="de_DE@euro"
LC_MESSAGES="de_DE@euro"
LC_PAPER="de_DE@euro"
LC_NAME="de_DE@euro"
LC_ADDRESS="de_DE@euro"
LC_TELEPHONE="de_DE@euro"
LC_MEASUREMENT="de_DE@euro"
LC_IDENTIFICATION="de_DE@euro"
LC_ALL=
Saber
From: Michael D. <md...@st...> - 2008年09月24日 12:19:41
It seems you have your locale set to something that Python doesn't support.
Can you send the output of "locale" to this list?
For example, I have:
 > locale
LANG=en_US.UTF-8
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=
Saber Mbarek wrote:
> Hi,
>
> I installed scipy a few days ago on my laptop (with os linux debian), 
> but while importing the pylab module from the python-matplotlib 
> (version 0.98.1-1) I got the following error:
>
> -------------------------------------------------------------------------------------------------------------
> Python 2.5.2 (r252:60911, Aug 8 2008, 09:22:44)
> [GCC 4.3.1] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
> >>> import scipy
> >>> import numpy
> >>> import pylab
> Traceback (most recent call last):
> File "<stdin>", line 1, in <module>
> File "/usr/lib/python2.5/site-packages/pylab.py", line 1, in <module>
> from matplotlib.pylab import *
> File "/usr/lib/python2.5/site-packages/matplotlib/__init__.py", line 
> 128, in <module>
> from rcsetup import defaultParams, validate_backend, validate_toolbar
> File "/usr/lib/python2.5/site-packages/matplotlib/rcsetup.py", line 
> 18, in <module>
> from matplotlib.colors import is_color_like
> File "/usr/lib/python2.5/site-packages/matplotlib/colors.py", line 
> 39, in <module>
> import matplotlib.cbook as cbook
> File "/usr/lib/python2.5/site-packages/matplotlib/cbook.py", line 
> 14, in <module>
> preferredencoding = locale.getpreferredencoding()
> File "/usr/lib/python2.5/locale.py", line 514, in getpreferredencoding
> setlocale(LC_CTYPE, "")
> File "/usr/lib/python2.5/locale.py", line 478, in setlocale
> return _setlocale(category, locale)
> locale.Error: unsupported locale setting
> ------------------------------------------------------------------------------------------------------------
>
> Could you please help me ?
>
> Best regards,
> Saber
>
> ------------------------------------------------------------------------
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
> Build the coolest Linux based applications with Moblin SDK & win great prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> ------------------------------------------------------------------------
>
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
> 
-- 
Michael Droettboom
Science Software Branch
Operations and Engineering Division
Space Telescope Science Institute
Operated by AURA for NASA
From: Saber M. <ms...@go...> - 2008年09月24日 12:11:45
Hi,
I installed scipy a few days ago on my laptop (with os linux debian), but
while importing the pylab module from the python-matplotlib (version
0.98.1-1) I got the following error:
-------------------------------------------------------------------------------------------------------------
Python 2.5.2 (r252:60911, Aug 8 2008, 09:22:44)
[GCC 4.3.1] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import scipy
>>> import numpy
>>> import pylab
Traceback (most recent call last):
 File "<stdin>", line 1, in <module>
 File "/usr/lib/python2.5/site-packages/pylab.py", line 1, in <module>
 from matplotlib.pylab import *
 File "/usr/lib/python2.5/site-packages/matplotlib/__init__.py", line 128,
in <module>
 from rcsetup import defaultParams, validate_backend, validate_toolbar
 File "/usr/lib/python2.5/site-packages/matplotlib/rcsetup.py", line 18, in
<module>
 from matplotlib.colors import is_color_like
 File "/usr/lib/python2.5/site-packages/matplotlib/colors.py", line 39, in
<module>
 import matplotlib.cbook as cbook
 File "/usr/lib/python2.5/site-packages/matplotlib/cbook.py", line 14, in
<module>
 preferredencoding = locale.getpreferredencoding()
 File "/usr/lib/python2.5/locale.py", line 514, in getpreferredencoding
 setlocale(LC_CTYPE, "")
 File "/usr/lib/python2.5/locale.py", line 478, in setlocale
 return _setlocale(category, locale)
locale.Error: unsupported locale setting
------------------------------------------------------------------------------------------------------------
Could you please help me ?
Best regards,
Saber
From: Saju P. <saj...@gm...> - 2008年09月24日 11:06:05
Hi,
 Just started playing with matplotlib and it is very impressive.
 I have a question on controlling the x-axis values being plotted. 
Say I am recording a stock price every hour from say 10am to 3pm on a 
daily basis. I am trying to plot a multi-day chart such that after the 
data for 3pm on Day 1 is plotted, the next data should be for 10am on 
Day 2. Currently matplotlib is automatically adding all the hours from 
3pm on Day 1 till 10pm on Day 2 even if I am only supplying the x-axis 
values that I want to be plotted.
I am doing something like ..
dates = [2008年9月18日 10:00, 2008年9月18日 11:00, ...., 2008年9月18日 15:00, 
2008年9月19日 10:00, 2008年9月19日 11:00,...] # all dates are datetime objs
prices = [1.0, 1.1, ...........]
plot_date(dates, prices)
# plot(dates, prices) -- this doesn't work either
Is it possible to force matplotlib to plot only the data points that I 
supply instead of it extrapolating the date data.
-srp
From: Thomas G. <hv...@tb...> - 2008年09月24日 08:53:50
Hi,
the FAQ solution to "How do I make vertical xticklabels?" does not work:
Python 2.5.1 (r251:54863, Jan 10 2008, 18:00:49)
[GCC 4.2.1 (SUSE Linux)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
 >>> from pylab import *
 >>> plot([1,2,3,4], [1,4,9,16])
[<matplotlib.lines.Line2D object at 0x1bcc250>]
 >>> set(gca(), 'xticks', [1,2,3,4])
Traceback (most recent call last):
 File "<stdin>", line 1, in <module>
TypeError: set expected at most 1 arguments, got 3
Since Python 2.4 set() is a built-in 
(http://docs.python.org/lib/types-set.html).
The method set() is used in several places in the FAQ. Please update it.
Here are some other things:
- Some code examples are indented with spaces. It would be better if there
were not. This would make copy+paste to the python shell easier.
- The FAQ says it can be used with mod_python. That's true, but it would 
be better
to use mod_wsgi since it is faster, easier to debug, more flexible, ...
Please CC to me, I am not on the list.
 Thomas Güttler
-- 
Thomas Guettler, http://www.thomas-guettler.de/
E-Mail: guettli (*) thomas-guettler + de
From: De P. A. <and...@ul...> - 2008年09月24日 08:35:24
Jeff,
Thanks for your help, I now know that it's a missing data problem
However, I need to make, for example, orthographic maps of ozone centered on
the polar region, and there is no possibility to cut the unaesthetic regions
of the plot in that case
I'll try to plot a data grid containing the weaker value for all points
before the actual data I'm plotting, to see if I can set the background
color and avoid these gaps
If you know of any method to do that instead of plotting a whole grid before
anything else, please tell
I have to thank you for your help and I wonder how you find the time
required to work on that mailing list
Have a nice day,
Antoine De Pauw
Collaborateur de recherches, Informatique - Research collaborator, IT
Laboratoire de chimie quantique et photophysique - Quantum chemistry and
photophysics laboratory
Université Libre de Bruxelles - ULB
-----Original Message-----
From: Jeff Whitaker [mailto:js...@fa...] 
Sent: mardi 23 septembre 2008 20:38
To: De Pauw Antoine
Cc: 'John Hunter'; 'Matplotlib Users'
Subject: Re: [Matplotlib-users] Information request
De Pauw Antoine wrote:
> Jeff,
>
> I still don't know how to either remove this artifact or fill my arrays
with
> values to remove empty regions, and I'll make a last attempt to resolve it
>
> I uploaded a data file here: http://scqp.ulb.ac.be/20080821.b56
>
> The actual code snippet is here:
> http://snipplr.com/view/8307/map-plotting-python-code-temporary/
>
> I hope you'll be able to reproduce it, I set the cmap to winter for you to
> see the gap... setting it to hot will make the grayish border visible in
> high resolution by zooming it... I think the border (not the empty zone)
> could be an artifact with the hot colormap
>
>
> Antoine De Pauw
> Collaborateur de recherches, Informatique - Research collaborator, IT
> Laboratoire de chimie quantique et photophysique - Quantum chemistry and
> photophysics laboratory
> Université Libre de Bruxelles - ULB
>
> 
Antoine: Here is a version that just plots the pixels directly, without 
interpolating to a grid. I personally like this better, since you can 
easily see where you actually have data.
HTH,
-Jeff
from mpl_toolkits.basemap import Basemap
import matplotlib.pyplot as plt
import matplotlib.mlab as mlab
import numpy as np
import os
fileName = '20080821.b56'
titre='SO2'
legende='Delta Brightness Temperature (K)'
nbreligne=long(os.stat(fileName)[6])/(8*int(fileName[-2:]))
rawfile=np.fromfile(open(fileName,'rb'),'<d',-1)
Lat=rawfile[0:nbreligne]
Lon=rawfile[nbreligne:nbreligne*2]
Val=rawfile[nbreligne*21:nbreligne*22]
map=Basemap(projection='mill',llcrnrlat=-90,urcrnrlat=90,\
 urcrnrlon=180,llcrnrlon=-180,resolution='l')
x, y = map(Lon, Lat)
plt.scatter(x,y,s=25,c=Val,marker='s',edgecolor="None",cmap=plt.cm.winter,vm
in=-5,vmax=-1.2, 
alpha=0.5)
cb=plt.colorbar(shrink=0.6)
cb.ax.set_ylabel(legende,fontsize=11)
for t in cb.ax.get_yticklabels():
 t.set_fontsize(7)
meridians = np.arange(-180,180,60)
parallels = np.arange(-90,90,30)
map.drawparallels(parallels,labels=[1,0,0,0],fontsize=7,linewidth=0.25)
map.drawmeridians(meridians,labels=[0,0,0,1],fontsize=7,linewidth=0.25)
map.drawcoastlines(0.25,antialiased=1)
plt.title(titre)
plt.show()
> -----Original Message-----
> From: Jeff Whitaker [mailto:js...@fa...] 
> Sent: lundi 22 septembre 2008 13:59
> To: De Pauw Antoine
> Cc: 'John Hunter'; 'Matplotlib Users'
> Subject: Re: [Matplotlib-users] Information request
>
> De Pauw Antoine wrote:
> 
>> Jeff,
>>
>> I included here a figure where you'll see the border problem for imshow
in
>> my case
>>
>> http://img217.imageshack.us/img217/5240/testfigzp3.png
>>
>> The border wraps at -180 and 180 to form the white line
>>
>> PS: it is atmospheric ice and not SO2, I just omitted to change the title
>> 
> ^^
> 
>> Antoine De Pauw
>> Collaborateur de recherches, Informatique - Research collaborator, IT
>> Laboratoire de chimie quantique et photophysique - Quantum chemistry and
>> photophysics laboratory
>> Université Libre de Bruxelles - ULB
>> 
>> 
>
> Antoine: I hate to keep repeating myself - but we can't do much if you 
> don't provide a self-contained script, that I can run, which reproduces 
> the problem. My guess is that the line along the dateline, and the 
> point at the South Pole are missing values (which griddata set to 
> missing because they are outside the extent of the data) - but that's 
> just a guess until I can reproduce it.
>
> -Jeff
> 
>> -----Original Message-----
>> From: Antoine De Pauw [mailto:and...@ul...] 
>> Sent: jeudi 18 septembre 2008 17:23
>> To: Jeff Whitaker; and...@ul...
>> Cc: 'John Hunter'; 'Matplotlib Users'
>> Subject: re:Re: [Matplotlib-users] Information request
>>
>> Jeff,
>>
>> No the example doesn't show that line
>>
>> If I reduce the amount of data, the border will be on every side of the
>> 
> plot
> 
>> I'll show you an orthographic plot with no maskinf tomorrow and you will
>> 
> see
> 
>> the problem easily, it wraps in a white line along the 0° meridian and a
>> white circle in the pole
>>
>> I think it's the imshow layer that is not totally transparent on the map
>> background.. I tried every trick I could for example to put some
>> 
> zero-valued
> 
>> points on each corner to make imshow interpolate correctly the sides, but
>> that doesn't make any difference
>>
>> 
>> 
>>> De Pauw Antoine wrote:
>>> 
>>> 
>>>> Jeff,
>>>>
>>>> Yes they disappear, and they fluctuate with the interpolation method
>>>> 
> used
> 
>>>> For example, nearest interpolation don't show the line
>>>>
>>>> Also, if I reduce the grid resolution, the line is thicker, and if I
use
>>>> 
>>>> 
>> a
>> 
>> 
>>>> masked array to get rid of undesired values, the border shows really
>>>> strongly
>>>>
>>>> Here's an example everyone will see:
>>>>
>>>> http://img225.imageshack.us/img225/2671/testfigep2.png
>>>>
>>>> (everything except the clouds is noise)
>>>>
>>>> Antoine De Pauw
>>>> Collaborateur de recherches, Informatique - Research collaborator, IT
>>>> Laboratoire de chimie quantique et photophysique - Quantum chemistry
and
>>>> photophysics laboratory
>>>> Université Libre de Bruxelles - ULB
>>>> 
>>>> 
>>>> 
>>> Antoine: Sorry to seem dense, but I don't see anything wrong with that 
>>> plot. I see a white border along the north and south pole, but I 
>>> intrepret that to be missing values. However, my eyes are notoriously 
>>> bad. I'd like to be to run a script that generates the artifacts 
>>> myself, so I can zoom in and see the problem myself. Does the 
>>> griddata_demo.py script show the same problem for you?
>>>
>>> -Jeff
>>> 
>>> 
>>>> -----Original Message-----
>>>> From: Jeff Whitaker [mailto:js...@fa...] 
>>>> Sent: mercredi 17 septembre 2008 19:05
>>>> To: John Hunter
>>>> Cc: De Pauw Antoine; Matplotlib Users
>>>> Subject: Re: [Matplotlib-users] Information request
>>>>
>>>> John Hunter wrote:
>>>> 
>>>> 
>>>> 
>>>>> On Wed, Sep 17, 2008 at 11:54 AM, John Hunter <jd...@gm...>
>>>>> 
> wrote:
> 
>>>>> 
>>>>> 
>>>>> 
>>>>> 
>>>>>> Attached is a screenshot (zoom.png) from the gimp, zoomed in near the
>>>>>> axes border. The black horizontal line is the top axes border, the
>>>>>> horizontal grey line is the artifact, the vertical dashed line is a
>>>>>> grid line. I don't know if this offers a clue, but if you look at a
>>>>>> zoom in the upper right corner, the grey line seems to break up and
>>>>>> curve down and to the right (corner.png)
>>>>>> 
>>>>>> 
>>>>>> 
>>>>>> 
>>>>> Sorry, screwed up corner.png (I attached the original and not the
>>>>> screenshot). The correct screenshot is attached
>>>>> 
>>>>>
>>>>>
>>>>> 
>>>>> 
>>>>> 
>>>> John: OK, now I finally see it. Antoine: Do these artifacts 
>>>> disappear if you comment out the imshow call?
>>>>
>>>> -Jeff
>>>>
>>>> 
>>>> 
>>>> 
>>> -- 
>>> Jeffrey S. Whitaker Phone : (303)497-6313
>>> Meteorologist FAX : (303)497-6449
>>> NOAA/OAR/PSD R/PSD1 Email : Jef...@no...
>>> 325 Broadway Office : Skaggs Research Cntr 1D-113
>>> Boulder, CO, USA 80303-3328 Web : http://tinyurl.com/5telg
>>>
>>>
>>>
>>> 
>>> 
>> 
>> 
>
>
> 
-- 
Jeffrey S. Whitaker Phone : (303)497-6313
Meteorologist FAX : (303)497-6449
NOAA/OAR/PSD R/PSD1 Email : Jef...@no...
325 Broadway Office : Skaggs Research Cntr 1D-113
Boulder, CO, USA 80303-3328 Web : http://tinyurl.com/5telg
From: Friedrich H. <fri...@gm...> - 2008年09月24日 06:10:51
On Wed, Sep 24, 2008 at 02:29:28PM +0900, Yong-Duk Jin wrote:
> Dear matplotlib users.
> 
> I'm using matplotlib 0.98.3 from the packman repository on opensuse 11.0.
> I tried to adjust the 'markerscale option to enlarge a marker size in a
> legend.
> However, it simply did not work even in a simple code like following.
> 
> from pylab import *
> x = [1,2,3]; y = [1,2,3]
> plot(x,y,ls='',marker='o',ms=1,label='test')
> legend(markerscale=5)
> show()
> 
> I could only get a legend marker in a same size with the plot marker.
> 
> I tried to reinstall all the packages related with python, including
> matplotlib,
> the legend marker size, however, does not change.
> 
> Please help me here to change the legend marker size.
> 
> Thanks.
> 
> --
> Yong-Duk Jin
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
> Build the coolest Linux based applications with Moblin SDK & win great prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
From: Yong-Duk J. <ne...@gm...> - 2008年09月24日 05:29:38
Dear matplotlib users.
I'm using matplotlib 0.98.3 from the packman repository on opensuse 11.0.
I tried to adjust the 'markerscale option to enlarge a marker size in a
legend.
However, it simply did not work even in a simple code like following.
from pylab import *
x = [1,2,3]; y = [1,2,3]
plot(x,y,ls='',marker='o',ms=1,label='test')
legend(markerscale=5)
show()
I could only get a legend marker in a same size with the plot marker.
I tried to reinstall all the packages related with python, including
matplotlib,
the legend marker size, however, does not change.
Please help me here to change the legend marker size.
Thanks.
-- 
Yong-Duk Jin
From: Anthony F. <ant...@gm...> - 2008年09月23日 23:22:47
On Tue, Sep 23, 2008 at 3:28 PM, C M <cmp...@gm...> wrote:
> I'm hoping to get help from matplotlib wxPython backend users...
>
> I'm struggling to get what is described in the subject line to work correctly.
> There was a sort of similar thread from 2006 here:
>
> http://www.mail-archive.com/mat...@li.../msg00945.html
>
> I want to pick a point on a plot and use the x,y of that point to
> place a wxPopupWindow
> right near that point on the graph. I am doing this in wxPython as an embedded
> graph). I have it working *somewhat* but there is still a major
> problem with it.
> I tried to base this off the wxPython demos wxPopupWindow code, but somehow
> it is not working right.
Warning: the following is based on MPL 0.90.1 (yeah, I know, but it
works. We have a branch that works with 0.98 but it hasn't been merge
back in. Your mileage may vary.)
Our popup code does:
(note that in the bit below, self is a subclassed object based on
FigureCanvasWxAgg)
mouseLocation = wx.GetMousePosition()
pos = self.ScreenToClient(mouseLocation)
height = self.figure.bbox.height()
x = pos.x
y = height - pos.y
(pickType, pickDetails) = self._pick(x,y) # NB: This is a custom pick
routine written before the new pick code
....
self.popup = ProbePopupWindow(self, wx.SIMPLE_BORDER,
series.getName(), mouseLocation)
where ProbePopupWindow is a subclass of wx.PopupWindow, and the
positioning bit in the __init__ is:
self.Position(mouseLocation, (10,10))
HTH,
Anthony.
From: C M <cmp...@gm...> - 2008年09月23日 22:28:17
I'm hoping to get help from matplotlib wxPython backend users...
I'm struggling to get what is described in the subject line to work correctly.
There was a sort of similar thread from 2006 here:
http://www.mail-archive.com/mat...@li.../msg00945.html
I want to pick a point on a plot and use the x,y of that point to
place a wxPopupWindow
right near that point on the graph. I am doing this in wxPython as an embedded
graph). I have it working *somewhat* but there is still a major
problem with it.
I tried to base this off the wxPython demos wxPopupWindow code, but somehow
it is not working right.
Before I post any code or if I can get a runnable sample going, does anyone
have a pointer to a simple solution? I can get x and y in pixel space on the
graph from event.mouseevent.x and event.mouseevent.y, but then when I try
to sort of add those to the position of the frame which contains the panel
(which contains the graph), I get some really weird behavior when I move that
frame to the left: the location of the popupwindow jumps to the far right side
of the screen.
Any help is appreciated--Thanks!
From: Jeff W. <js...@fa...> - 2008年09月23日 18:40:39
De Pauw Antoine wrote:
> Jeff,
>
> I still don't know how to either remove this artifact or fill my arrays with
> values to remove empty regions, and I'll make a last attempt to resolve it
>
> I uploaded a data file here: http://scqp.ulb.ac.be/20080821.b56
>
> The actual code snippet is here:
> http://snipplr.com/view/8307/map-plotting-python-code-temporary/
>
> I hope you'll be able to reproduce it, I set the cmap to winter for you to
> see the gap... setting it to hot will make the grayish border visible in
> high resolution by zooming it... I think the border (not the empty zone)
> could be an artifact with the hot colormap
>
>
> Antoine De Pauw
> Collaborateur de recherches, Informatique - Research collaborator, IT
> Laboratoire de chimie quantique et photophysique - Quantum chemistry and
> photophysics laboratory
> Université Libre de Bruxelles - ULB
>
> 
Antoine: Here is a version that just plots the pixels directly, without 
interpolating to a grid. I personally like this better, since you can 
easily see where you actually have data.
HTH,
-Jeff
from mpl_toolkits.basemap import Basemap
import matplotlib.pyplot as plt
import matplotlib.mlab as mlab
import numpy as np
import os
fileName = '20080821.b56'
titre='SO2'
legende='Delta Brightness Temperature (K)'
nbreligne=long(os.stat(fileName)[6])/(8*int(fileName[-2:]))
rawfile=np.fromfile(open(fileName,'rb'),'<d',-1)
Lat=rawfile[0:nbreligne]
Lon=rawfile[nbreligne:nbreligne*2]
Val=rawfile[nbreligne*21:nbreligne*22]
map=Basemap(projection='mill',llcrnrlat=-90,urcrnrlat=90,\
 urcrnrlon=180,llcrnrlon=-180,resolution='l')
x, y = map(Lon, Lat)
plt.scatter(x,y,s=25,c=Val,marker='s',edgecolor="None",cmap=plt.cm.winter,vmin=-5,vmax=-1.2, 
alpha=0.5)
cb=plt.colorbar(shrink=0.6)
cb.ax.set_ylabel(legende,fontsize=11)
for t in cb.ax.get_yticklabels():
 t.set_fontsize(7)
meridians = np.arange(-180,180,60)
parallels = np.arange(-90,90,30)
map.drawparallels(parallels,labels=[1,0,0,0],fontsize=7,linewidth=0.25)
map.drawmeridians(meridians,labels=[0,0,0,1],fontsize=7,linewidth=0.25)
map.drawcoastlines(0.25,antialiased=1)
plt.title(titre)
plt.show()
> -----Original Message-----
> From: Jeff Whitaker [mailto:js...@fa...] 
> Sent: lundi 22 septembre 2008 13:59
> To: De Pauw Antoine
> Cc: 'John Hunter'; 'Matplotlib Users'
> Subject: Re: [Matplotlib-users] Information request
>
> De Pauw Antoine wrote:
> 
>> Jeff,
>>
>> I included here a figure where you'll see the border problem for imshow in
>> my case
>>
>> http://img217.imageshack.us/img217/5240/testfigzp3.png
>>
>> The border wraps at -180 and 180 to form the white line
>>
>> PS: it is atmospheric ice and not SO2, I just omitted to change the title
>> 
> ^^
> 
>> Antoine De Pauw
>> Collaborateur de recherches, Informatique - Research collaborator, IT
>> Laboratoire de chimie quantique et photophysique - Quantum chemistry and
>> photophysics laboratory
>> Université Libre de Bruxelles - ULB
>> 
>> 
>
> Antoine: I hate to keep repeating myself - but we can't do much if you 
> don't provide a self-contained script, that I can run, which reproduces 
> the problem. My guess is that the line along the dateline, and the 
> point at the South Pole are missing values (which griddata set to 
> missing because they are outside the extent of the data) - but that's 
> just a guess until I can reproduce it.
>
> -Jeff
> 
>> -----Original Message-----
>> From: Antoine De Pauw [mailto:and...@ul...] 
>> Sent: jeudi 18 septembre 2008 17:23
>> To: Jeff Whitaker; and...@ul...
>> Cc: 'John Hunter'; 'Matplotlib Users'
>> Subject: re:Re: [Matplotlib-users] Information request
>>
>> Jeff,
>>
>> No the example doesn't show that line
>>
>> If I reduce the amount of data, the border will be on every side of the
>> 
> plot
> 
>> I'll show you an orthographic plot with no maskinf tomorrow and you will
>> 
> see
> 
>> the problem easily, it wraps in a white line along the 0° meridian and a
>> white circle in the pole
>>
>> I think it's the imshow layer that is not totally transparent on the map
>> background.. I tried every trick I could for example to put some
>> 
> zero-valued
> 
>> points on each corner to make imshow interpolate correctly the sides, but
>> that doesn't make any difference
>>
>> 
>> 
>>> De Pauw Antoine wrote:
>>> 
>>> 
>>>> Jeff,
>>>>
>>>> Yes they disappear, and they fluctuate with the interpolation method
>>>> 
> used
> 
>>>> For example, nearest interpolation don't show the line
>>>>
>>>> Also, if I reduce the grid resolution, the line is thicker, and if I use
>>>> 
>>>> 
>> a
>> 
>> 
>>>> masked array to get rid of undesired values, the border shows really
>>>> strongly
>>>>
>>>> Here's an example everyone will see:
>>>>
>>>> http://img225.imageshack.us/img225/2671/testfigep2.png
>>>>
>>>> (everything except the clouds is noise)
>>>>
>>>> Antoine De Pauw
>>>> Collaborateur de recherches, Informatique - Research collaborator, IT
>>>> Laboratoire de chimie quantique et photophysique - Quantum chemistry and
>>>> photophysics laboratory
>>>> Université Libre de Bruxelles - ULB
>>>> 
>>>> 
>>>> 
>>> Antoine: Sorry to seem dense, but I don't see anything wrong with that 
>>> plot. I see a white border along the north and south pole, but I 
>>> intrepret that to be missing values. However, my eyes are notoriously 
>>> bad. I'd like to be to run a script that generates the artifacts 
>>> myself, so I can zoom in and see the problem myself. Does the 
>>> griddata_demo.py script show the same problem for you?
>>>
>>> -Jeff
>>> 
>>> 
>>>> -----Original Message-----
>>>> From: Jeff Whitaker [mailto:js...@fa...] 
>>>> Sent: mercredi 17 septembre 2008 19:05
>>>> To: John Hunter
>>>> Cc: De Pauw Antoine; Matplotlib Users
>>>> Subject: Re: [Matplotlib-users] Information request
>>>>
>>>> John Hunter wrote:
>>>> 
>>>> 
>>>> 
>>>>> On Wed, Sep 17, 2008 at 11:54 AM, John Hunter <jd...@gm...>
>>>>> 
> wrote:
> 
>>>>> 
>>>>> 
>>>>> 
>>>>> 
>>>>>> Attached is a screenshot (zoom.png) from the gimp, zoomed in near the
>>>>>> axes border. The black horizontal line is the top axes border, the
>>>>>> horizontal grey line is the artifact, the vertical dashed line is a
>>>>>> grid line. I don't know if this offers a clue, but if you look at a
>>>>>> zoom in the upper right corner, the grey line seems to break up and
>>>>>> curve down and to the right (corner.png)
>>>>>> 
>>>>>> 
>>>>>> 
>>>>>> 
>>>>> Sorry, screwed up corner.png (I attached the original and not the
>>>>> screenshot). The correct screenshot is attached
>>>>> 
>>>>>
>>>>>
>>>>> 
>>>>> 
>>>>> 
>>>> John: OK, now I finally see it. Antoine: Do these artifacts 
>>>> disappear if you comment out the imshow call?
>>>>
>>>> -Jeff
>>>>
>>>> 
>>>> 
>>>> 
>>> -- 
>>> Jeffrey S. Whitaker Phone : (303)497-6313
>>> Meteorologist FAX : (303)497-6449
>>> NOAA/OAR/PSD R/PSD1 Email : Jef...@no...
>>> 325 Broadway Office : Skaggs Research Cntr 1D-113
>>> Boulder, CO, USA 80303-3328 Web : http://tinyurl.com/5telg
>>>
>>>
>>>
>>> 
>>> 
>> 
>> 
>
>
> 
-- 
Jeffrey S. Whitaker Phone : (303)497-6313
Meteorologist FAX : (303)497-6449
NOAA/OAR/PSD R/PSD1 Email : Jef...@no...
325 Broadway Office : Skaggs Research Cntr 1D-113
Boulder, CO, USA 80303-3328 Web : http://tinyurl.com/5telg
From: Roland H. <rh...@ya...> - 2008年09月23日 18:02:04
It looks like those examples suspend operation while waiting for a click, after going to mainloop().
On a related note, after I use pylab.plot() to draw the screen, the toolbar is inaccessible unless I also use show(), which then halts the program until I close the window. 
 
From: Jeff W. <js...@fa...> - 2008年09月23日 17:49:01
De Pauw Antoine wrote:
> Jeff,
>
> I still don't know how to either remove this artifact or fill my arrays with
> values to remove empty regions, and I'll make a last attempt to resolve it
>
> I uploaded a data file here: http://scqp.ulb.ac.be/20080821.b56
>
> The actual code snippet is here:
> http://snipplr.com/view/8307/map-plotting-python-code-temporary/
>
> I hope you'll be able to reproduce it, I set the cmap to winter for you to
> see the gap... setting it to hot will make the grayish border visible in
> high resolution by zooming it... I think the border (not the empty zone)
> could be an artifact with the hot colormap
>
>
> Antoine De Pauw
> Collaborateur de recherches, Informatique - Research collaborator, IT
> Laboratoire de chimie quantique et photophysique - Quantum chemistry and
> photophysics laboratory
> Université Libre de Bruxelles - ULB
>
>
> 
Antoine: As I suspected, that gap around the edges of the plot is a 
consequence of the gridding procedure. griddata doesn't do 
extrapolation, so there are missing values on the grid outside the 
convex hull of the input observations. You can either just live with 
it, or set the plotting region so that it fits entirely within the 
convex hull of the data. This is what I've done in the modified version 
of your script below. I've also eliminated the transform_scalar call by 
gridding directly on the projection grid (instead of gridding to a 
lat/lon grid, then interpolating to the projection grid). Hope this helps.
-Jeff
from mpl_toolkits.basemap import Basemap
import matplotlib.pyplot as plt
import matplotlib.mlab as mlab
import numpy as np
import os
fileName = '20080821.b56'
nx = 360; ny = 180
titre='SO2'
legende='Delta Brightness Temperature (K)'
nbreligne=long(os.stat(fileName)[6])/(8*int(fileName[-2:]))
rawfile=np.fromfile(open(fileName,'rb'),'<d',-1)
Lat=rawfile[0:nbreligne]
Lon=rawfile[nbreligne:nbreligne*2]
Val=rawfile[nbreligne*21:nbreligne*22]
map=Basemap(projection='mill',llcrnrlat=-89,urcrnrlat=89,\
 urcrnrlon=179,llcrnrlon=-179,resolution='l')
xi=np.linspace(map.xmin,map.xmax,nx)
yi=np.linspace(map.ymin,map.ymax,ny)
x, y = map(Lon, Lat)
zi=mlab.griddata(x,y,Val,xi,yi)
map.imshow(zi,plt.cm.winter,vmin=-5,vmax=-1.2)
cb=plt.colorbar(shrink=0.6)
cb.ax.set_ylabel(legende,fontsize=11)
for t in cb.ax.get_yticklabels():
 t.set_fontsize(7)
meridians = np.arange(-180,180,60)
parallels = np.arange(-90,90,30)
map.drawparallels(parallels,labels=[1,0,0,0],fontsize=7,linewidth=0.25)
map.drawmeridians(meridians,labels=[0,0,0,1],fontsize=7,linewidth=0.25)
map.drawcoastlines(0.25,antialiased=1)
plt.title(titre)
plt.show()
> -----Original Message-----
> From: Jeff Whitaker [mailto:js...@fa...] 
> Sent: lundi 22 septembre 2008 13:59
> To: De Pauw Antoine
> Cc: 'John Hunter'; 'Matplotlib Users'
> Subject: Re: [Matplotlib-users] Information request
>
> De Pauw Antoine wrote:
> 
>> Jeff,
>>
>> I included here a figure where you'll see the border problem for imshow in
>> my case
>>
>> http://img217.imageshack.us/img217/5240/testfigzp3.png
>>
>> The border wraps at -180 and 180 to form the white line
>>
>> PS: it is atmospheric ice and not SO2, I just omitted to change the title
>> 
> ^^
> 
>> Antoine De Pauw
>> Collaborateur de recherches, Informatique - Research collaborator, IT
>> Laboratoire de chimie quantique et photophysique - Quantum chemistry and
>> photophysics laboratory
>> Université Libre de Bruxelles - ULB
>> 
>> 
>
> Antoine: I hate to keep repeating myself - but we can't do much if you 
> don't provide a self-contained script, that I can run, which reproduces 
> the problem. My guess is that the line along the dateline, and the 
> point at the South Pole are missing values (which griddata set to 
> missing because they are outside the extent of the data) - but that's 
> just a guess until I can reproduce it.
>
> -Jeff
> 
>> -----Original Message-----
>> From: Antoine De Pauw [mailto:and...@ul...] 
>> Sent: jeudi 18 septembre 2008 17:23
>> To: Jeff Whitaker; and...@ul...
>> Cc: 'John Hunter'; 'Matplotlib Users'
>> Subject: re:Re: [Matplotlib-users] Information request
>>
>> Jeff,
>>
>> No the example doesn't show that line
>>
>> If I reduce the amount of data, the border will be on every side of the
>> 
> plot
> 
>> I'll show you an orthographic plot with no maskinf tomorrow and you will
>> 
> see
> 
>> the problem easily, it wraps in a white line along the 0° meridian and a
>> white circle in the pole
>>
>> I think it's the imshow layer that is not totally transparent on the map
>> background.. I tried every trick I could for example to put some
>> 
> zero-valued
> 
>> points on each corner to make imshow interpolate correctly the sides, but
>> that doesn't make any difference
>>
>> 
>> 
>>> De Pauw Antoine wrote:
>>> 
>>> 
>>>> Jeff,
>>>>
>>>> Yes they disappear, and they fluctuate with the interpolation method
>>>> 
> used
> 
>>>> For example, nearest interpolation don't show the line
>>>>
>>>> Also, if I reduce the grid resolution, the line is thicker, and if I use
>>>> 
>>>> 
>> a
>> 
>> 
>>>> masked array to get rid of undesired values, the border shows really
>>>> strongly
>>>>
>>>> Here's an example everyone will see:
>>>>
>>>> http://img225.imageshack.us/img225/2671/testfigep2.png
>>>>
>>>> (everything except the clouds is noise)
>>>>
>>>> Antoine De Pauw
>>>> Collaborateur de recherches, Informatique - Research collaborator, IT
>>>> Laboratoire de chimie quantique et photophysique - Quantum chemistry and
>>>> photophysics laboratory
>>>> Université Libre de Bruxelles - ULB
>>>> 
>>>> 
>>>> 
>>> Antoine: Sorry to seem dense, but I don't see anything wrong with that 
>>> plot. I see a white border along the north and south pole, but I 
>>> intrepret that to be missing values. However, my eyes are notoriously 
>>> bad. I'd like to be to run a script that generates the artifacts 
>>> myself, so I can zoom in and see the problem myself. Does the 
>>> griddata_demo.py script show the same problem for you?
>>>
>>> -Jeff
>>> 
>>> 
>>>> -----Original Message-----
>>>> From: Jeff Whitaker [mailto:js...@fa...] 
>>>> Sent: mercredi 17 septembre 2008 19:05
>>>> To: John Hunter
>>>> Cc: De Pauw Antoine; Matplotlib Users
>>>> Subject: Re: [Matplotlib-users] Information request
>>>>
>>>> John Hunter wrote:
>>>> 
>>>> 
>>>> 
>>>>> On Wed, Sep 17, 2008 at 11:54 AM, John Hunter <jd...@gm...>
>>>>> 
> wrote:
> 
>>>>> 
>>>>> 
>>>>> 
>>>>> 
>>>>>> Attached is a screenshot (zoom.png) from the gimp, zoomed in near the
>>>>>> axes border. The black horizontal line is the top axes border, the
>>>>>> horizontal grey line is the artifact, the vertical dashed line is a
>>>>>> grid line. I don't know if this offers a clue, but if you look at a
>>>>>> zoom in the upper right corner, the grey line seems to break up and
>>>>>> curve down and to the right (corner.png)
>>>>>> 
>>>>>> 
>>>>>> 
>>>>>> 
>>>>> Sorry, screwed up corner.png (I attached the original and not the
>>>>> screenshot). The correct screenshot is attached
>>>>> 
>>>>>
>>>>>
>>>>> 
>>>>> 
>>>>> 
>>>> John: OK, now I finally see it. Antoine: Do these artifacts 
>>>> disappear if you comment out the imshow call?
>>>>
>>>> -Jeff
>>>>
>>>> 
>>>> 
>>>> 
>>> -- 
>>> Jeffrey S. Whitaker Phone : (303)497-6313
>>> Meteorologist FAX : (303)497-6449
>>> NOAA/OAR/PSD R/PSD1 Email : Jef...@no...
>>> 325 Broadway Office : Skaggs Research Cntr 1D-113
>>> Boulder, CO, USA 80303-3328 Web : http://tinyurl.com/5telg
>>>
>>>
>>>
>>> 
>>> 
>> 
>> 
>
>
> 
-- 
Jeffrey S. Whitaker Phone : (303)497-6313
Meteorologist FAX : (303)497-6449
NOAA/OAR/PSD R/PSD1 Email : Jef...@no...
325 Broadway Office : Skaggs Research Cntr 1D-113
Boulder, CO, USA 80303-3328 Web : http://tinyurl.com/5telg
From: charles r. <cha...@gm...> - 2008年09月23日 17:32:26
I don't think my message made it to the mailing list... See below.
Charles
==========
The 2nd Law of Thermodynamics... If you think things are a mess now, JUST
WAIT!
---------- Forwarded message ----------
From: charles reid <cha...@gm...>
Date: Fri, Sep 19, 2008 at 5:46 PM
Subject: Re: [Matplotlib-users] installation
To: Robert Fenwick <rob...@ir...>
Cc: mat...@li...
The pre-installed version of python is NOT rubbish, it's used by the system
to do various tasks. If you delete it, it will likely mess things up. I
highly recommend you leave it alone. I would recommend you do a simple web
search, since there are a whole slew of guides to doing this. Try this one:
http://www.mtheory.co.uk/support/index.php?title=Installing_Python_-_iPython%2C_Numpy%2C_Scipy_and_Matplotlib_on_OS_X
There is a list of links at the bottom with at least 5 more guides to
installing "python for science" on Mac OS X 10.5 ("python for science" being
the suite of iPython, SciPy, NumPy, and matplotlib). Also try this handy
"SciPy Superpack" script:
http://macinscience.org/?page_id=6
It atuomatically downloads & installs the python for science programs from
the svn source (so you don't have to worry about updating, you just re-run
the script).
Good luck.
Charles
==========
The 2nd Law of Thermodynamics... If you think things are a mess now, JUST
WAIT!
On Fri, Sep 19, 2008 at 2:29 AM, Robert Fenwick <
rob...@ir...> wrote:
> Hi,
>
> I would really like to use matplot lib, however I am having big
> problems as I try to do this on OSX 10.5. if there is someone how
> could give a detailed explination of how to get rid of the
> preinstalled python that is apparently rubbish and then how to install
> a new python version that would really help me. I am completely lost
> in a world of eggs etc.
>
> Bryn
>
> P.S. here is my particular compilation problem. Is there a simple
> solution so that I can code my first graph today?
>
> salvatella02:Downloads rbf$ sudo easy_install
> matplotlib-0.98.3-py2.5-macosx-10.3.egg
> Password:
> Processing matplotlib-0.98.3-py2.5-macosx-10.3.egg
> removing
> '/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib-0.98.3-py2.5-macosx-10.3.egg'
> (and everything under it)
> creating
> /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib-0.98.3-py2.5-macosx-10.3.egg
> Extracting matplotlib-0.98.3-py2.5-macosx-10.3.egg to
>
> /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages
> Adding matplotlib 0.98.3 to easy-install.pth file
>
> Installed
> /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib-0.98.3-py2.5-macosx-10.3.egg
> Processing dependencies for matplotlib==0.98.3
> Searching for matplotlib==0.98.3
> Reading http://pypi.python.org/simple/matplotlib/
> Reading http://matplotlib.sourceforge.net
> Reading
> https://sourceforge.net/project/showfiles.php?group_id=80706&package_id=278194
> Reading
> https://sourceforge.net/project/showfiles.php?group_id=80706&package_id=82474
> Reading
> http://sourceforge.net/project/showfiles.php?group_id=80706&package_id=82474
> Reading http://sourceforge.net/project/showfiles.php?group_id=80706
> Best match: matplotlib 0.98.3
> Downloading
> http://downloads.sourceforge.net/matplotlib/matplotlib-0.98.3.tar.gz?modtime=1217773039&big_mirror=0
> Processing matplotlib-0.98.3.tar.gz
> Running matplotlib-0.98.3/setup.py -q bdist_egg --dist-dir
> /tmp/easy_install-JGl_1Z/matplotlib-0.98.3/egg-dist-tmp-T6PVvy
>
> ============================================================================
> BUILDING MATPLOTLIB
> matplotlib: 0.98.3
> python: 2.5.2 (r252:60911, Feb 22 2008, 07:57:53) [GCC
> 4.0.1 (Apple Computer, Inc. build 5363)]
> platform: darwin
>
> REQUIRED DEPENDENCIES
> numpy: 1.1.1
> freetype2: found, but unknown version (no pkg-config)
>
> OPTIONAL BACKEND DEPENDENCIES
> libpng: found, but unknown version (no pkg-config)
> Tkinter: Tkinter: 50704, Tk: 8.4, Tcl: 8.4
> wxPython: no
> * wxPython not found
> Gtk+: no
> * Building for Gtk+ requires pygtk; you must be able
> * to "import gtk" in your build/install environment
> Qt: no
> Qt4: no
> Cairo: no
>
> OPTIONAL DATE/TIMEZONE DEPENDENCIES
> datetime: present, version unknown
> dateutil: matplotlib will provide
> pytz: matplotlib will provide
>
> OPTIONAL USETEX DEPENDENCIES
> dvipng: 1.9
> ghostscript: 8.57
> latex: 3.141592
>
> EXPERIMENTAL CONFIG PACKAGE DEPENDENCIES
> configobj: matplotlib will provide
> enthought.traits: no
>
> [Edit setup.cfg to suppress the above messages]
>
> ============================================================================
> warning: no files found matching 'NUMARRAY_ISSUES'
> warning: no files found matching 'MANIFEST'
> warning: no files found matching 'matplotlibrc'
> warning: no files found matching 'makeswig.py'
> warning: no files found matching 'examples/data/*'
> warning: no files found matching 'lib/mpl_toolkits'
> warning: no files found matching '*' under directory 'examples'
> warning: no files found matching '*' under directory 'swig'
> gcc: unrecognized option '-no-cpp-precomp'
> cc1plus: error: unrecognized command line option "-arch"
> cc1plus: error: unrecognized command line option "-arch"
> cc1plus: warning: unrecognized command line option "-Wno-long-double"
> error: Setup script exited with error: command 'gcc' failed with exit
> status 1
> Exception exceptions.OSError: (2, 'No such file or directory',
> 'src/image.cpp') in <bound method CleanUpFile.__del__ of
> <setupext.CleanUpFile instance at 0x1bb48a0>> ignored
> Exception exceptions.OSError: (2, 'No such file or directory',
> 'src/path.cpp') in <bound method CleanUpFile.__del__ of
> <setupext.CleanUpFile instance at 0x1bb4080>> ignored
> Exception exceptions.OSError: (2, 'No such file or directory',
> 'src/backend_agg.cpp') in <bound method CleanUpFile.__del__ of
> <setupext.CleanUpFile instance at 0x1bb43c8>> ignored
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's
> challenge
> Build the coolest Linux based applications with Moblin SDK & win great
> prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
From: Michael H. <mh...@us...> - 2008年09月23日 15:56:43
No. Interestingly, I didn't get the same errors this morning as I did 
last night - I got build errors regarding ftbuild (or something like 
that). I had just installed Tcl/Tk from source, so perhaps the first 
time my shell hadn't figured out where they were (??). After I 
installed freetype-devel, the build errors went away. The Tk errors 
vanished on their own.
I don't know why I have so much trouble building and installing software...
Thanks,
Mike Hearne
John Hunter wrote:
> On Tue, Sep 23, 2008 at 10:28 AM, Michael Hearne <mh...@us...> wrote:
> 
>> I installed the freetype-devel libraries and this problem went away.
>>
>> 
>
> Any chance you also installed tk-devel or tcl-devel? I can't see how
> the addition of the freetype headers would fix a tk problem.
>
> JDH
> 
-- 
------------------------------------------------------
Michael Hearne
mh...@us...
(303) 273-8620
USGS National Earthquake Information Center
1711 Illinois St. Golden CO 80401
Senior Software Engineer
Synergetics, Inc.
------------------------------------------------------
From: John H. <jd...@gm...> - 2008年09月23日 15:53:14
On Tue, Sep 23, 2008 at 5:56 AM, rfwatson <rfw...@gm...> wrote:
> Hello,
>
> I am using matplotlib in combination with QT4 as part of an audio
> application I am building. Part of this involves plotting an
> oscilloscope-style display (time vs intensity) for sets of raw audio data,
> which I have through necessity converted to arrays of floating point data.
>
> The problem I have is that Pylab/QT slow down an unacceptable amount once
> the amount of audio is more than a few seconds long. This is not too
> surprising - typically a minute of stereo audio data will have 44100 * 60 *
> 2 = 5292000 points. I need to deal with, at minimum, 15 minute clips
> efficiently
Do you typically plot a large number of points, only a subset of which
are in your viewport? If so, the "clipped line" demo may be useful to
you:
http://matplotlib.sourceforge.net/examples/pylab_examples/clippedline.py
If you are trying to plot a large number of dense points all in the
same viewport, then you will need to decimate the data before
plotting.
JDH
From: John H. <jd...@gm...> - 2008年09月23日 15:50:12
On Tue, Sep 23, 2008 at 9:46 AM, Roland Hauff <rh...@ya...> wrote:
> I'm reading a serial port and plotting the acquired data using TKagg with the plot() command. This gives me a nice graphical screen that updates as the data arrives. What I would like to do is be able to pause the entire program occasionally as I need to make changes on the system that the RS232 is reading, then begin plotting again. Is there a way to get a pause button the TKAgg toolbar?
Yes, take a look at the embedding_in_tk*.py examples at
http://matplotlib.sourceforge.net/examples/user_interfaces/
From: John H. <jd...@gm...> - 2008年09月23日 15:48:51
On Tue, Sep 23, 2008 at 10:28 AM, Michael Hearne <mh...@us...> wrote:
> I installed the freetype-devel libraries and this problem went away.
>
Any chance you also installed tk-devel or tcl-devel? I can't see how
the addition of the freetype headers would fix a tk problem.
JDH
From: Michael H. <mh...@us...> - 2008年09月23日 15:29:01
I installed the freetype-devel libraries and this problem went away.
--Mike
Michael Hearne wrote:
> All: I am trying to build matplotlib 0.98.3 on a Red Hat Enterprise 5 
> linux box. I have Tkinter support compiled into my 
> /usr/local/bin/python installation (at least "import Tkinter" raises 
> no exceptions). However, when I try to build matplotlib using 
> "/usr/local/bin/python setup.py build", I get the output below. Any 
> hints? Is this my fault, or a bug in setup.py?
>
> Thanks,
>
> Mike
>
> ============================================================================ 
>
> BUILDING MATPLOTLIB
> matplotlib: 0.98.3
> python: 2.5.2 (r252:60911, Sep 15 2008, 16:18:30) [GCC
> 4.1.2 20071124 (Red Hat 4.1.2-42)]
> platform: linux2
>
> REQUIRED DEPENDENCIES
> numpy: 1.1.0
> freetype2: found, but unknown version (no pkg-config)
> * WARNING: Could not find 'freetype2' headers 
> in any
> * of '/usr/local/include', '/usr/include', '.',
> * '/usr/local/include/freetype2',
> * '/usr/include/freetype2', './freetype2'.
>
> OPTIONAL BACKEND DEPENDENCIES
> libpng: 1.2.10
> Traceback (most recent call last):
> File "setup.py", line 125, in <module>
> if check_for_tk() or (options['build_tkagg'] is True):
> File "/home/mhearne/build/matplotlib-0.98.3/setupext.py", line 841, 
> in check_for_tk
> explanation = add_tk_flags(module)
> File "/home/mhearne/build/matplotlib-0.98.3/setupext.py", line 1101, 
> in add_tk_flags
> module.libraries.extend(['tk' + tk_ver, 'tcl' + tk_ver])
> UnboundLocalError: local variable 'tk_ver' referenced before assignment
>
-- 
------------------------------------------------------
Michael Hearne
mh...@us...
(303) 273-8620
USGS National Earthquake Information Center
1711 Illinois St. Golden CO 80401
Senior Software Engineer
Synergetics, Inc.
------------------------------------------------------
From: Roland H. <rh...@ya...> - 2008年09月23日 15:12:49
I'm reading a serial port and plotting the acquired data using TKagg with the plot() command. This gives me a nice graphical screen that updates as the data arrives. What I would like to do is be able to pause the entire program occasionally as I need to make changes on the system that the RS232 is reading, then begin plotting again. Is there a way to get a pause button the TKAgg toolbar?
Thanks!
 
From: Roland H. <rh...@ya...> - 2008年09月23日 14:58:59
I'm reading a serial port and plotting the acquired data using TKagg with the plot() command. This gives me a nice graphical screen that updates as the data arrives. What I would like to do is be able to pause the entire program occasionally as I need to make changes on the system that the RS232 is reading, then begin plotting again. Is there a way to get a pause button the TKAgg toolbar?
Thanks!
 
From: Michael D. <md...@st...> - 2008年09月23日 14:32:05
rfwatson wrote:
> Hello,
>
> I am using matplotlib in combination with QT4 as part of an audio 
> application I am building. Part of this involves plotting an 
> oscilloscope-style display (time vs intensity) for sets of raw audio 
> data, which I have through necessity converted to arrays of floating 
> point data.
>
> The problem I have is that Pylab/QT slow down an unacceptable amount 
> once the amount of audio is more than a few seconds long. This is not 
> too surprising - typically a minute of stereo audio data will have 
> 44100 * 60 * 2 = 5292000 points. I need to deal with, at minimum, 15 
> minute clips efficiently
>
> I have tried downsampling the audio dramatically and although this 
> helps a little, it is not enough for really large data sets. 
> Downsampling also reduces the accuracy of any editing of the audio, so 
> it's not the ideal solution.
Numpy slicing will let you create a subsampled (without interpolation) 
view on the data that you could send to matplotlib, and still maintain 
the original data for editing/listening purposes.
For example: audio[::64] will create a view that skips every 64 data 
points.
I don't know if skipping will produce adequate results for you vs. 
proper downsampling, however, but it's worth a try.
I remember SoundForge (at least a few years ago), used to downsample the 
data for display purposes and cache that to a file alongside the 
high-resolution audio. That suggests to me that any sort of 
downsampling on-the-fly may just be inherently too slow.
Remember, also, that matplotlib is drawing *actual* lines for its plots, 
which implies "stroking" (generating a polygon from moving an imaginary 
pen along the ideal line so that it can be filled). I suspect many 
audio editors take a much simpler approach, by drawing vertical 1-pixel 
wide strokes whose height is determined based on the average of the data 
within that pixel. That would be much more efficient for high-sample 
rate data than what matplotlib currently does. This is something to 
think about including in matplotlib for the future, but not something it 
currently does.
>
> I've read about 'data clipping' functionality in matplotlib, but can't 
> seem to get it working - has it been removed?
It should work with any of the Agg backends in 0.98.3 and additionally 
PDF, PS and SVG in SVN trunk. It should increase the speed, but on the 
other hand, large data is large data and the system still needs to 
iterate through all of it to determine which points to ignore.
Hope that helps in some way,
Mike
-- 
Michael Droettboom
Science Software Branch
Operations and Engineering Division
Space Telescope Science Institute
Operated by AURA for NASA
From: Matthias M. <Mat...@gm...> - 2008年09月23日 12:53:54
Hi,
I'm not an expert, but I got the attached script to do what you need ( at 
least as I understand it). It isn't quite nice, because I need interactive 
mode turned on for proper value in the xtick labels in order to modify them. 
Maybe it is a kind of beginning for a good solution or maybe a proper 
solution is out there.
regards Matthias
On Thursday 11 September 2008 22:59:31 johnny_c wrote:
> Hi,
>
> I have a contour plot with a log scale on the x and y axes and I would
> like it to read "10^1 10^2 10^3 10^4". How would I go about doing this?
>
> Here's how I'm currently making the plot..
>
> contour( log10(x), log10(y), z )
>
> This only displays something like "0 1 2 3 4".
>
> Any suggestions?
>
> If there is a really obvious solution to this, then I apologize, but I
> can't seem to figure it out.
> Thanks
3 messages has been excluded from this view by a project administrator.

Showing results of 346

<< < 1 2 3 4 5 6 .. 14 > >> (Page 4 of 14)
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.
Thanks for helping keep SourceForge clean.
X





Briefly describe the problem (required):
Upload screenshot of ad (required):
Select a file, or drag & drop file here.
Screenshot instructions:

Click URL instructions:
Right-click on the ad, choose "Copy Link", then paste here →
(This may not be possible with some types of ads)

More information about our ad policies

Ad destination/click URL:

AltStyle によって変換されたページ (->オリジナル) /