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
(12) |
2
(13) |
|
3
(4) |
4
(34) |
5
(14) |
6
(23) |
7
(26) |
8
(12) |
9
(7) |
|
10
(7) |
11
(9) |
12
(12) |
13
(20) |
14
(14) |
15
(13) |
16
(5) |
|
17
(4) |
18
(22) |
19
(29) |
20
(13) |
21
(9) |
22
(22) |
23
(3) |
|
24
(3) |
25
(29) |
26
(9) |
27
(10) |
28
(16) |
29
(16) |
30
(16) |
|
31
(9) |
|
|
|
|
|
|
|
From: Friedrich R. <fri...@gm...> - 2010-10-18 10:46:37
|
2010/10/18 脑关(BrainGateway)生命科学仪器 <bra...@gm...>:
> On Mon, Oct 18, 2010 at 12:54 AM, Benjamin Root <ben...@ou...> wrote:
>> On Sun, Oct 17, 2010 at 5:35 PM, braingateway <bra...@gm...>
>> wrote:
>>> I tried all possible colormaps and found out: gist_rainbow, terrain,
>>> bwr, brg, and seismic will generate the same error, all other colormaps
>>> are OK. I wonder is this a bug or expected behavior?
> Hi Ben,
> Thanks a lot for answering my question! I am a newbie to matplotlib,
> so please forgive me, if the question is stupid ;p
Questions are never stupid ...
> In my program I wanna know the exact RGBA value of a data point in the
> figure, in order to plot a corresponding line with the same color in
> another figure. That is why I need to call a(z) to get RGBA value of a
> point at (x,y,z) (z is represented by color). If I understood it
> correctly, you said I do not need to specify the 'lut' in
> cm.get_cmap(name,lut)? I thought the colormap object is actually a
> lookup table with a length specified by lut.
Kind of, but it's initialised from a linear segmentation dictionary,
so you can get cmaps with a precision you want.
> It turns out I do not
> need to specify anything here.
Default param is 256.
> But if I do not specify anything the
> colormap.N is always 256. What will happen then, if I need more color
> steps?
cm = get_cmap('...', 1024)
> I do notice a(2) and a(2.2) returns different values. So I am
> very confused about the principle how the RGBA value is generated by
> the colormaps.
It's the "magic" to distinguish between integer (in the LUT range) and
float (in [0.0, 1.0]). 2 gives the LUT entry 2, 2.0 will give the
upper value since it's > 1, as will 2.2 do. Try 0.5, and 0.6, or 0.0
and 0.1.
Actually I cannot reproduce your error on a recently (some weeks ago)
checked-out GitHub repo version of mpl 1.0.0. Please provide
mpl.__version__ so that we check if that's the reason - as simple as
it might be.
MacBook-Pro-Friedrich:Report Friedrich$ python
Python 2.6.5 (r265:79063, Jul 18 2010, 12:14:53)
[GCC 4.2.1 (Apple Inc. build 5659)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import matplotlib.cm
>>> cm = matplotlib.cm.get_cmap('gist_rainbow')
>>> cm(range(256))
array([[ 1. , 0. , 0.16 , 1. ],
[ 1. , 0. , 0.13908497, 1. ],
[ 1. , 0. , 0.11816993, 1. ],
...,
[ 1. , 0. , 0.79262575, 1. ],
[ 1. , 0. , 0.77131287, 1. ],
[ 1. , 0. , 0.75 , 1. ]])
>>> print matplotlib.__version__
1.0.0
The attribute of the cm where the error occurs on your machine is set
to a valid value for me. I also cannot find any code path leading to
a wrong initialisation of the attribute. Might be that the data the
cm is init'ed from changed. There is a code path initialising the cm
from a tuple (your attribute was a tuple used like a dict), but this
works too: (terrain is such an example):
>>> cm = matplotlib.cm.get_cmap('terrain')
>>> cm(range(256))
array([[ 0.2 , 0.2 , 0.6 , 1. ],
[ 0.19477124, 0.21045752, 0.61045752, 1. ],
[ 0.18954248, 0.22091503, 0.62091503, 1. ],
...,
[ 0.98431373, 0.97992157, 0.97898039, 1. ],
[ 0.99215686, 0.98996078, 0.9894902 , 1. ],
[ 1. , 1. , 1. , 1. ]])
Might be that there was 'red' misspelled in gist_rainbow in you mpl
version, this may explain the behaviour if we track it down. Can you
do the following to verify this:
import matplotlib._cm
print matplotlib._cm._gist_stern_data
? Thx,
Friedrich
|
|
From: Radek M. <rad...@gm...> - 2010-10-18 10:44:52
|
Hi guys, I made a class which create a special plot in the parent figure (matplotlib.pyplot.figure) given as a argument to the __init__ method. To show more than one instance of this class in the matrix I make a grid (mpl_toolkits.axes_grid.AxesGrid) and initialize the class with proper element of this grid instead of the figure class instance. Naturely this does not work, because this grid element (mpl_toolkits.axes_grid1.axes_divider.LocatableAxes) is not inherent from the matplotlib.pyplot.figure class, so the methods are different. Problematic part of my code is line: axe2D = self.figure.add_axes(rect), where self.figure represents the 'parent area'. Do you have any idea, howto solve this incompatibility? Radek |
|
From: mfabulous <mx...@gm...> - 2010-10-18 09:54:07
|
Hi, I encountered this particular problem quite often now. If you use matplotlib in a directory that contains a large number of files, things become extremely slow after calling pylab.show(). I suspect the interface internally lists all files in that directory? I often have to plot from directories with huge amounts of data, is there a way to change that behavior? Regards, Maximilian -- View this message in context: http://old.nabble.com/plotting-slow-in-directories-with-many-files-tp29988783p29988783.html Sent from the matplotlib - users mailing list archive at Nabble.com. |
|
From: 脑关(BrainGateway)生命科学仪器 <bra...@gm...> - 2010-10-18 09:28:07
|
On Mon, Oct 18, 2010 at 12:54 AM, Benjamin Root <ben...@ou...> wrote:
> On Sun, Oct 17, 2010 at 5:35 PM, braingateway <bra...@gm...>
> wrote:
>>
>> Hi Everyone,
>>
>> I am trying the matplotlib. I have to say this is a powerful package for
>> scientific 2-D plotting. However, I encountered some problems when try
>> to generate several colormaps.
>>
>> for example:
>> a=cm.get_cmap('gist_rainbow',256)(range(256))
>> will give a error:
>> Traceback (most recent call last):
>> File "<pyshell#82>", line 1, in <module>
>> a=cm.get_cmap('gist_rainbow',256)(range(256))
>> File "...\site-packages\matplotlib\colors.py", line 498, in __call__
>> if not self._isinit: self._init()
>> File "...\site-packages\matplotlib\colors.py", line 649, in _init
>> self._segmentdata['red'], self._gamma)
>> TypeError: tuple indices must be integers, not str
>>
>> but other colormaps can actually work:
>> a=cm.get_cmap('gist_stern',256)(range(256))
>> >>> a
>> array([[ 0. , 0. , 0. , 1. ],
>> [ 0.0716923 , 0.00392157, 0.00784314, 1. ],
>> [ 0.14338459, 0.00784314, 0.01568627, 1. ],
>> ...,
>> [ 0.99215686, 0.99215686, 0.97040326, 1. ],
>> [ 0.99607843, 0.99607843, 0.98520163, 1. ],
>> [ 1. , 1. , 1. , 1. ]])
>>
>> I tried all possible colormaps and found out: gist_rainbow, terrain,
>> bwr, brg, and seismic will generate the same error, all other colormaps
>> are OK. I wonder is this a bug or expected behavior?
>> ###############################
>> ##matplotlib verison : '1.0.svn'
>> >>> maps=[m for m in cm.datad if not m.endswith("_r")]
>> >>> for i in maps:
>> try:
>> a=cm.get_cmap(i,256)(range(256))
>> except:
>> (type, value, traceback) = sys.exc_info()
>> print "Problems to create %s" % (i,)
>> print "The error was --> %s: %s" % (type, value)
>>
>>
>> Problems to create gist_rainbow
>> The error was --> <type 'exceptions.TypeError'>: tuple indices must be
>> integers, not str
>> Problems to create terrain
>> The error was --> <type 'exceptions.TypeError'>: tuple indices must be
>> integers, not str
>> Problems to create bwr
>> The error was --> <type 'exceptions.TypeError'>: tuple indices must be
>> integers, not str
>> Problems to create brg
>> The error was --> <type 'exceptions.TypeError'>: tuple indices must be
>> integers, not str
>> Problems to create seismic
>> The error was --> <type 'exceptions.TypeError'>: tuple indices must be
>> integers, not str
>> ##################################################################
>>
>
> Is there any particular reason why you are doing the "(range(256))"? Keep
> in mind that a colormap in matplotlib works differently than a colormap in
> Matlab. In Matlab, the colormap is a 2-D array of rgb values, while in
> matplotlib, it is an object that is used by the backends for
> color-rendering.
>
> Often times, you will not need to do anything more than specify which
> colormap you want by name e.g., pcolor(X, Y, Z, cmap='gist_rainbow'), or by
> passing in a customized or self-made colormap object to the 'cmap' keyword
> argument.
>
> What is happening in your code when you call '(range(256))' is that the
> colormap is being called for an array of values ranging from 0 to 255 and
> is determining what the color will be for each of those values. What seems
> to be happening with those few colormaps is that the call is being made
> before those maps are properly self-initialized. So, there might be some
> sort of flaw here that you have exposed, but I would suggest taking another
> look at what you are trying to accomplish to see if there is a better way.
>
> Thanks for giving matplotlib a try and I hope you continue to use it for
> your work!
>
> Ben Root
>
>
Hi Ben,
Thanks a lot for answering my question! I am a newbie to matplotlib,
so please forgive me, if the question is stupid ;p
In my program I wanna know the exact RGBA value of a data point in the
figure, in order to plot a corresponding line with the same color in
another figure. That is why I need to call a(z) to get RGBA value of a
point at (x,y,z) (z is represented by color). If I understood it
correctly, you said I do not need to specify the 'lut' in
cm.get_cmap(name,lut)? I thought the colormap object is actually a
lookup table with a length specified by lut. It turns out I do not
need to specify anything here. But if I do not specify anything the
colormap.N is always 256. What will happen then, if I need more color
steps? I do notice a(2) and a(2.2) returns different values. So I am
very confused about the principle how the RGBA value is generated by
the colormaps.
LittleBigBrain
|
|
From: Alan G I. <ala...@gm...> - 2010-10-18 03:21:28
|
On 10/15/2010 9:40 AM, John Hunter wrote: > http://carlfk.blip.tv/file/2557425 > > The dolphins story [...] starts around 39:30 Good story. |
|
From: Benjamin R. <ben...@ou...> - 2010-10-17 22:55:21
|
On Sun, Oct 17, 2010 at 5:35 PM, braingateway <bra...@gm...>wrote:
> Hi Everyone,
>
> I am trying the matplotlib. I have to say this is a powerful package for
> scientific 2-D plotting. However, I encountered some problems when try
> to generate several colormaps.
>
> for example:
> a=cm.get_cmap('gist_rainbow',256)(range(256))
> will give a error:
> Traceback (most recent call last):
> File "<pyshell#82>", line 1, in <module>
> a=cm.get_cmap('gist_rainbow',256)(range(256))
> File "...\site-packages\matplotlib\colors.py", line 498, in __call__
> if not self._isinit: self._init()
> File "...\site-packages\matplotlib\colors.py", line 649, in _init
> self._segmentdata['red'], self._gamma)
> TypeError: tuple indices must be integers, not str
>
> but other colormaps can actually work:
> a=cm.get_cmap('gist_stern',256)(range(256))
> >>> a
> array([[ 0. , 0. , 0. , 1. ],
> [ 0.0716923 , 0.00392157, 0.00784314, 1. ],
> [ 0.14338459, 0.00784314, 0.01568627, 1. ],
> ...,
> [ 0.99215686, 0.99215686, 0.97040326, 1. ],
> [ 0.99607843, 0.99607843, 0.98520163, 1. ],
> [ 1. , 1. , 1. , 1. ]])
>
> I tried all possible colormaps and found out: gist_rainbow, terrain,
> bwr, brg, and seismic will generate the same error, all other colormaps
> are OK. I wonder is this a bug or expected behavior?
> ###############################
> ##matplotlib verison : '1.0.svn'
> >>> maps=[m for m in cm.datad if not m.endswith("_r")]
> >>> for i in maps:
> try:
> a=cm.get_cmap(i,256)(range(256))
> except:
> (type, value, traceback) = sys.exc_info()
> print "Problems to create %s" % (i,)
> print "The error was --> %s: %s" % (type, value)
>
>
> Problems to create gist_rainbow
> The error was --> <type 'exceptions.TypeError'>: tuple indices must be
> integers, not str
> Problems to create terrain
> The error was --> <type 'exceptions.TypeError'>: tuple indices must be
> integers, not str
> Problems to create bwr
> The error was --> <type 'exceptions.TypeError'>: tuple indices must be
> integers, not str
> Problems to create brg
> The error was --> <type 'exceptions.TypeError'>: tuple indices must be
> integers, not str
> Problems to create seismic
> The error was --> <type 'exceptions.TypeError'>: tuple indices must be
> integers, not str
> ##################################################################
>
>
Is there any particular reason why you are doing the "(range(256))"? Keep
in mind that a colormap in matplotlib works differently than a colormap in
Matlab. In Matlab, the colormap is a 2-D array of rgb values, while in
matplotlib, it is an object that is used by the backends for
color-rendering.
Often times, you will not need to do anything more than specify which
colormap you want by name e.g., pcolor(X, Y, Z, cmap='gist_rainbow'), or by
passing in a customized or self-made colormap object to the 'cmap' keyword
argument.
What is happening in your code when you call '(range(256))' is that the
colormap is being called for an array of values ranging from 0 to 255 and
is determining what the color will be for each of those values. What seems
to be happening with those few colormaps is that the call is being made
before those maps are properly self-initialized. So, there might be some
sort of flaw here that you have exposed, but I would suggest taking another
look at what you are trying to accomplish to see if there is a better way.
Thanks for giving matplotlib a try and I hope you continue to use it for
your work!
Ben Root
|
|
From: braingateway <bra...@gm...> - 2010-10-17 22:35:17
|
Hi Everyone,
I am trying the matplotlib. I have to say this is a powerful package for
scientific 2-D plotting. However, I encountered some problems when try
to generate several colormaps.
for example:
a=cm.get_cmap('gist_rainbow',256)(range(256))
will give a error:
Traceback (most recent call last):
File "<pyshell#82>", line 1, in <module>
a=cm.get_cmap('gist_rainbow',256)(range(256))
File "...\site-packages\matplotlib\colors.py", line 498, in __call__
if not self._isinit: self._init()
File "...\site-packages\matplotlib\colors.py", line 649, in _init
self._segmentdata['red'], self._gamma)
TypeError: tuple indices must be integers, not str
but other colormaps can actually work:
a=cm.get_cmap('gist_stern',256)(range(256))
>>> a
array([[ 0. , 0. , 0. , 1. ],
[ 0.0716923 , 0.00392157, 0.00784314, 1. ],
[ 0.14338459, 0.00784314, 0.01568627, 1. ],
...,
[ 0.99215686, 0.99215686, 0.97040326, 1. ],
[ 0.99607843, 0.99607843, 0.98520163, 1. ],
[ 1. , 1. , 1. , 1. ]])
I tried all possible colormaps and found out: gist_rainbow, terrain,
bwr, brg, and seismic will generate the same error, all other colormaps
are OK. I wonder is this a bug or expected behavior?
###############################
##matplotlib verison : '1.0.svn'
>>> maps=[m for m in cm.datad if not m.endswith("_r")]
>>> for i in maps:
try:
a=cm.get_cmap(i,256)(range(256))
except:
(type, value, traceback) = sys.exc_info()
print "Problems to create %s" % (i,)
print "The error was --> %s: %s" % (type, value)
Problems to create gist_rainbow
The error was --> <type 'exceptions.TypeError'>: tuple indices must be
integers, not str
Problems to create terrain
The error was --> <type 'exceptions.TypeError'>: tuple indices must be
integers, not str
Problems to create bwr
The error was --> <type 'exceptions.TypeError'>: tuple indices must be
integers, not str
Problems to create brg
The error was --> <type 'exceptions.TypeError'>: tuple indices must be
integers, not str
Problems to create seismic
The error was --> <type 'exceptions.TypeError'>: tuple indices must be
integers, not str
##################################################################
|
|
From: Marco T. <mar...@gm...> - 2010-10-17 20:40:46
|
Il 17/10/2010 22:35, Keith Jones ha scritto: > Hi, > I am also a first-time user and not a matplotlib expert. > > The matplotlib font manager caches a file of font information on your machine when it is first used. In windows XP it is located in C:\Documents and Settings\'your user name'\.matplotlib\fontList.cache. > > My experience was that this file is not automatically updated. I suggest that you try renaming the existing fontlist.cache and I expect matplotlib will then create a new one with the correct python paths. It did the trick! Thank you very much for your answer. Marco |
|
From: Marco T. <mar...@gm...> - 2010-10-17 20:10:38
|
Hello,
this is the first time I write here. I'm using Python + PyQt4 +
matplotlib on Windows 7.
First, I installed Python 2.7 and the other packages. After some time I
decided to go back to 2.6.
I removed any packages (with the uninstaller) and also any PATH entry.
Finally, I installed Python 2.6 and matplotlib.
Now when I execute a script that contain a matplotlib object I run into
this error:
Traceback (most recent call last):
File "C:\Users\Femtotech\Documents\Femtotech\Airlight\Photodiode
array\Software\Photodiode Array Monitor\main.py", line 12, in <module>
from matplotlib.backends.backend_qtagg import FigureCanvasQTAgg as
FigureCanvas
File
"C:\Development\Python26\lib\site-packages\matplotlib\backends\backend_qtagg.py",
line 12, in <module>
from backend_qt import qt, FigureManagerQT, FigureCanvasQT,\
File
"C:\Development\Python26\lib\site-packages\matplotlib\backends\backend_qt.py",
line 19, in <module>
raise ImportError("Qt backend requires pyqt to be installed.")
ImportError: Qt backend requires pyqt to be installed.
>>>
*** Remote Interpreter Reinitialized ***
>>>
Traceback (most recent call last):
File
"C:\Development\Python26\lib\site-packages\matplotlib\backends\backend_qt4.py",
line 215, in resizeEvent
self.draw()
File
"C:\Development\Python26\lib\site-packages\matplotlib\backends\backend_qt4agg.py",
line 130, in draw
FigureCanvasAgg.draw(self)
File
"C:\Development\Python26\lib\site-packages\matplotlib\backends\backend_agg.py",
line 394, in draw
self.figure.draw(self.renderer)
File
"C:\Development\Python26\lib\site-packages\matplotlib\artist.py", line
55, in draw_wrapper
draw(artist, renderer, *args, **kwargs)
File
"C:\Development\Python26\lib\site-packages\matplotlib\figure.py", line
798, in draw
func(*args)
File
"C:\Development\Python26\lib\site-packages\matplotlib\artist.py", line
55, in draw_wrapper
draw(artist, renderer, *args, **kwargs)
File "C:\Development\Python26\lib\site-packages\matplotlib\axes.py",
line 1934, in draw
a.draw(renderer)
File
"C:\Development\Python26\lib\site-packages\matplotlib\artist.py", line
55, in draw_wrapper
draw(artist, renderer, *args, **kwargs)
File "C:\Development\Python26\lib\site-packages\matplotlib\axis.py",
line 1017, in draw
tick.draw(renderer)
File
"C:\Development\Python26\lib\site-packages\matplotlib\artist.py", line
55, in draw_wrapper
draw(artist, renderer, *args, **kwargs)
File "C:\Development\Python26\lib\site-packages\matplotlib\axis.py",
line 234, in draw
self.label1.draw(renderer)
File
"C:\Development\Python26\lib\site-packages\matplotlib\artist.py", line
55, in draw_wrapper
draw(artist, renderer, *args, **kwargs)
File "C:\Development\Python26\lib\site-packages\matplotlib\text.py",
line 524, in draw
bbox, info = self._get_layout(renderer)
File "C:\Development\Python26\lib\site-packages\matplotlib\text.py",
line 298, in _get_layout
ismath=False)
File
"C:\Development\Python26\lib\site-packages\matplotlib\backends\backend_agg.py",
line 180, in get_text_width_height_descent
font = self._get_agg_font(prop)
File
"C:\Development\Python26\lib\site-packages\matplotlib\backends\backend_agg.py",
line 221, in _get_agg_font
font = FT2Font(str(fname))
RuntimeError: Could not open facefile C:\Program Files
(x86)\Python27\lib\site-packages\matplotlib\mpl-data\fonts\ttf\Vera.ttf;
Cannot_Open_Resource
Traceback (most recent call last):
File
"C:\Development\Python26\lib\site-packages\matplotlib\backends\backend_qt4agg.py",
line 83, in paintEvent
FigureCanvasAgg.draw(self)
File
"C:\Development\Python26\lib\site-packages\matplotlib\backends\backend_agg.py",
line 394, in draw
self.figure.draw(self.renderer)
[cut]
File "C:\Development\Python26\lib\site-packages\matplotlib\text.py",
line 524, in draw
bbox, info = self._get_layout(renderer)
File "C:\Development\Python26\lib\site-packages\matplotlib\text.py",
line 298, in _get_layout
ismath=False)
File
"C:\Development\Python26\lib\site-packages\matplotlib\backends\backend_agg.py",
line 180, in get_text_width_height_descent
font = self._get_agg_font(prop)
File
"C:\Development\Python26\lib\site-packages\matplotlib\backends\backend_agg.py",
line 221, in _get_agg_font
font = FT2Font(str(fname))
RuntimeError: Could not open facefile C:\Program Files
(x86)\Python27\lib\site-packages\matplotlib\mpl-data\fonts\ttf\Vera.ttf;
Cannot_Open_Resource
You see, "C:\Development\Python26" is the correct folder of the new
installation but "C:\Program Files (x86)\Python27" was the older (and
deleted) one.
I don't know how it still search in the old path. There are no entry of
that folder in the PATH variable.
What should I do to fix the issue? I can't run any program that uses
matplotlib anymore!
Thank in advance!
Marco
|
|
From: Benjamin R. <ben...@ou...> - 2010-10-16 17:22:38
|
On Sat, Oct 16, 2010 at 7:04 AM, Nils Wagner <nw...@ia...>wrote: > Hi all, > > Does anyone know how I can convert my matplotlib 3D images > into U3D files ? > > > I found some hints for Matlab users ... > > Any pointer would be appreciated. > > Thanks in advance. > > Nils > > http://en.wikipedia.org/wiki/Universal_3D > > http://www.mathworks.de/matlabcentral/newsreader/view_thread/157025 > > http://www.nada.kth.se/~asa/Ray/matlabobj.html<http://www.nada.kth.se/%7Easa/Ray/matlabobj.html> > > http://meshlab.sourceforge.net/ > > Nils, I don't believe that this is currently possible in mplot3d. The way the ".savefig()" function works is by getting all of the object data down to one of the backends, which operate on 2D data only. As a matter of fact, a lot of code in mplot3d is spent on producing 2D projections of 3D data. While such a feature would be neat (and maybe it could be shoehorned into the pdf writer?) I would not expect it anytime soon. I would greatly encourage you to file a feature request and include those links as well. http://sourceforge.net/tracker/?group_id=80706 Thanks for the idea! Ben Root |
|
From: Nils W. <nw...@ia...> - 2010-10-16 12:04:20
|
Hi all, Does anyone know how I can convert my matplotlib 3D images into U3D files ? I found some hints for Matlab users ... Any pointer would be appreciated. Thanks in advance. Nils http://en.wikipedia.org/wiki/Universal_3D http://www.mathworks.de/matlabcentral/newsreader/view_thread/157025 http://www.nada.kth.se/~asa/Ray/matlabobj.html http://meshlab.sourceforge.net/ |
|
From: Gerrit K. <gku...@st...> - 2010-10-16 04:32:18
|
Dear Daniel, to give the corners of an array, some "matplotlib" plotting functions have the "extent" keyword, e.g. "contour" and "imshow". You can use this to put your data on the map. However, the functions of the "Basemap" class do not support this functionality. "Basemap.imshow" overwrites the "extent" keyword (see docstring). A workaround is to call "matplotlib.pyplot.imshow" instead, to draw on your "Basemap" map: >>> map = Basemap(projection='...', ...) >>> map.drawcoastlines() >>> extent = reduce(lambda x,y: x+y, map([lon0,lon1],[lat0,lat1]) >>> matplotlib.pyplot.imshow(data, extent=extent) You can also create an axes instance first, to have more control over your plot. To your second question: Since the real globe is a 3d sphere with longitude and latitude and your image is a 2d map with x,y coordinates, you need some rule how to transform longitude and latitude to your x,y system. This rules are the different projections. The main idea of "basemap" is to help you with this projection by calling "x,y = map(lons, lats)". So, I guess your are using "basemap" wrong, if you have to change the coordinates *by hand*. If you need more help, you should give a small example where your problem occurs. Best Regards, Gerrit ----- Original Message ----- From: Daniel Fulger <dan...@we...> Date: Friday, October 15, 2010 6:20 pm Subject: [Matplotlib-users] basemap toolkit: project graphics file given in lon-lat To: mat...@li... > Dear all, > > I would like to project a graphics file of some colour coded geo data > > that is already given in lat-lon with corners > specified in lat-lon onto a map. The projection of the result should > > be flexible. In the end the resulting > plot shows a section of the earth, either from a satallite > perspective (ortho) or some convenient projection. > > All examples I found seem to be doing different things or special > cases that I have trouble to generalize or modify. > These examples transform the data from some (often unpecified) system > > to a coordinate system that > suites the chosen projection. > But the fact that the geo data file is given in lat-lon with corners > > must simplify everything and should make the chosen > projection arbitrary. The resolution of the data file must also be > arbitrary and should not appear in the code. > I do not see why the final projection should require beforehand a > change of the geo-data coordinate > system *by hand* i.e. typing in the transform formulas and extracting > > pixel sizes. > I would have thought that to avoid this is the whole point of using > map toolkits. > > I imagine a function that takes the parameters > - datafile, alternatively an array with a colour value or RGB for > each lon-lat coordinate > - its lon-lat corners, > - a basemap map-object i want the data projected onto > - and the projection specifier (possibly with desired corners if > different from the maps corners) > that determines how i want to see the the resulting piece of the > globe. > > > Could someone explain to me (a python newbie) what the sequence of > steps/functions would have to be or which > predefined methods are doing this. > > Regards > Daniel > > > > ------------------------------------------------------------------------------ > Download new Adobe(R) Flash(R) Builder(TM) 4 > The new Adobe(R) Flex(R) 4 and Flash(R) Builder(TM) 4 (formerly > Flex(R) Builder(TM)) enable the development of rich applications that > run > across multiple browsers and platforms. Download your free trials today! > http://p.sf.net/sfu/adobe-dev2dev > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users |
|
From: Chris B. <Chr...@no...> - 2010-10-16 00:35:34
|
On 10/15/10 5:16 PM, Paul Ivanov wrote:
> I want to do something like this:
>
> import matplotlib.pyplot as plt
> def onclick(event):
> if event.button==1:
> plt.close()
> fig = plt.gcf()
> cid = fig.canvas.mpl_connect('button_press_event', onclick)
> plt.show()
>
> I've tried several variations on this theme, but all of them cause
> crashes. Am I missing something?
>
> I'm using 1.0.0 with WXAgg
>
> thanks,
>
I don't know if MPL events do anything like this, but since you are
using wx, you could probably use wx.CallAfter() (or wx.CallLater(), call
one of those in your callback,a nd tehn have the function called close
the figure.
-Chris
|
|
From: Paul I. <piv...@gm...> - 2010-10-16 00:16:57
|
I want to do something like this:
import matplotlib.pyplot as plt
def onclick(event):
if event.button==1:
plt.close()
fig = plt.gcf()
cid = fig.canvas.mpl_connect('button_press_event', onclick)
plt.show()
I've tried several variations on this theme, but all of them cause
crashes. Am I missing something?
I'm using 1.0.0 with WXAgg
thanks,
--
Paul Ivanov
314 address only used for lists, off-list direct email at:
http://pirsquared.org | GPG/PGP key id: 0x0F3E28F7
|
|
From: Christopher B. <Chr...@no...> - 2010-10-15 15:50:10
|
On 10/14/10 9:52 PM, Alessio Civ wrote: > Let' put things this way: if you have to work with many records, it is > better if you have a database. pyTables is worth a look, too" http://www.pytables.org/moin -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/OR&R (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception Chr...@no... |
|
From: Daniel H. <dh...@gm...> - 2010-10-15 15:31:05
|
Right, there is only a subset of marker styles supported in the scatter function, both 2D and 3D. This is because, behind the scenes, it's drawing all of the symbols as patches. See http://matplotlib.sourceforge.net/api/pyplot_api.html#matplotlib.pyplot.scatter On Fri, Oct 15, 2010 at 10:43 AM, R. Bryn Fenwick < rob...@ir...> wrote: > > Marker types in 3d plots > > Hi, > > A few problems with marker types in 3D plots. I can use "o" and "^" > and "+". However I can not use "." or "," it seems a bit odd to me > however I get the below error. It should be possible to repeat this > with the following input > > Traceback (most recent call last): > File "test.py", line 16, in <module> > ax.scatter(xs, ys, zs, c=c, marker=m) > File "/Library/Frameworks/Python.framework/Versions/2.6/lib/ > python2.6/site-packages/mpl_toolkits/mplot3d/axes3d.py", line 1019, in > scatter > patches = Axes.scatter(self, xs, ys, *args, **kwargs) > File "/Library/Frameworks/Python.framework/Versions/2.6/lib/ > python2.6/site-packages/matplotlib/axes.py", line 5719, in scatter > raise ValueError('Unknown marker symbol to scatter') > ValueError: Unknown marker symbol to scatter > > ---- > import numpy as np > from mpl_toolkits.mplot3d import axes3d > import matplotlib.pyplot as plt > > def randrange(n, vmin, vmax): > return (vmax-vmin)*np.random.rand(n) + vmin > > fig = plt.figure() > ax = fig.add_subplot(111, projection='3d') > n = 100 > #for c, m, zl, zh in [('r', '+', -50, -25), ('b', '^', -30, -5)]: > for c, m, zl, zh in [('r', '+', -50, -25), ('b', '.', -30, -5)]: > xs = randrange(n, 23, 32) > ys = randrange(n, 0, 100) > zs = randrange(n, zl, zh) > ax.scatter(xs, ys, zs, c=c, marker=m) > > ax.set_xlabel('X Label') > ax.set_ylabel('Y Label') > ax.set_zlabel('Z Label') > > plt.show() > > > > ------------------------------------------------------------------------------ > Download new Adobe(R) Flash(R) Builder(TM) 4 > The new Adobe(R) Flex(R) 4 and Flash(R) Builder(TM) 4 (formerly > Flex(R) Builder(TM)) enable the development of rich applications that run > across multiple browsers and platforms. Download your free trials today! > http://p.sf.net/sfu/adobe-dev2dev > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > -- Daniel Hyams dh...@gm... |
|
From: R. B. F. <rob...@ir...> - 2010-10-15 14:43:51
|
Marker types in 3d plots
Hi,
A few problems with marker types in 3D plots. I can use "o" and "^"
and "+". However I can not use "." or "," it seems a bit odd to me
however I get the below error. It should be possible to repeat this
with the following input
Traceback (most recent call last):
File "test.py", line 16, in <module>
ax.scatter(xs, ys, zs, c=c, marker=m)
File "/Library/Frameworks/Python.framework/Versions/2.6/lib/
python2.6/site-packages/mpl_toolkits/mplot3d/axes3d.py", line 1019, in
scatter
patches = Axes.scatter(self, xs, ys, *args, **kwargs)
File "/Library/Frameworks/Python.framework/Versions/2.6/lib/
python2.6/site-packages/matplotlib/axes.py", line 5719, in scatter
raise ValueError('Unknown marker symbol to scatter')
ValueError: Unknown marker symbol to scatter
----
import numpy as np
from mpl_toolkits.mplot3d import axes3d
import matplotlib.pyplot as plt
def randrange(n, vmin, vmax):
return (vmax-vmin)*np.random.rand(n) + vmin
fig = plt.figure()
ax = fig.add_subplot(111, projection='3d')
n = 100
#for c, m, zl, zh in [('r', '+', -50, -25), ('b', '^', -30, -5)]:
for c, m, zl, zh in [('r', '+', -50, -25), ('b', '.', -30, -5)]:
xs = randrange(n, 23, 32)
ys = randrange(n, 0, 100)
zs = randrange(n, zl, zh)
ax.scatter(xs, ys, zs, c=c, marker=m)
ax.set_xlabel('X Label')
ax.set_ylabel('Y Label')
ax.set_zlabel('Z Label')
plt.show()
|
|
From: Daniel H. <dh...@gm...> - 2010-10-15 14:36:24
|
Ugh, if I could only undo an email send 20 seconds after I hit go ;) If setting 'edgewidths' to 0 doesn't work, try setting 'edgecolors' to 'None' as per JDH's suggestion above, which is the same suggestion as mine except for the "marker" part of the property is removed. On Fri, Oct 15, 2010 at 10:32 AM, Daniel Hyams <dh...@gm...> wrote: > Since you are talking about markers, I assume that you made the plot with > the scatter() function. > > The scatter() function creates the appropriate collection of patches > (polygon, circle, etc.) depending on what the marker style was passed to > it. As such, the normal 'marker*' properties do not work, as there is just > a collection patches that is being drawn. So the properties that you are > looking for in your situation are here: > > > http://matplotlib.sourceforge.net/api/collections_api.html#matplotlib.collections.PatchCollection > > I believe that the property you are looking for is 'edgewidth'. E.g. (and > I think this is right, but not where I can test right now): > > the_artist.set_edgewidth(0.0) > > Which I believe will work, or you may have to do > > the_artist.set_edgewidths((0.0,)) > > But anyway, hopefully this is enough to set you on your way. > > > On Fri, Oct 15, 2010 at 4:10 AM, Robert Fenwick < > rob...@ir...> wrote: > >> >> Hi, >> >> I have a 3d plot that I am trying to plot and I can not get rid of the >> marker edge. an example would help >> >> Bryn >> >> >> >> >> >> >> >> ------------------------------------------------------------------------------ >> Download new Adobe(R) Flash(R) Builder(TM) 4 >> The new Adobe(R) Flex(R) 4 and Flash(R) Builder(TM) 4 (formerly >> Flex(R) Builder(TM)) enable the development of rich applications that run >> across multiple browsers and platforms. Download your free trials today! >> http://p.sf.net/sfu/adobe-dev2dev >> _______________________________________________ >> Matplotlib-users mailing list >> Mat...@li... >> https://lists.sourceforge.net/lists/listinfo/matplotlib-users >> > > > > -- > Daniel Hyams > dh...@gm... > -- Daniel Hyams dh...@gm... |
|
From: Daniel H. <dh...@gm...> - 2010-10-15 14:33:38
|
Since you are talking about markers, I assume that you made the plot with the scatter() function. The scatter() function creates the appropriate collection of patches (polygon, circle, etc.) depending on what the marker style was passed to it. As such, the normal 'marker*' properties do not work, as there is just a collection patches that is being drawn. So the properties that you are looking for in your situation are here: http://matplotlib.sourceforge.net/api/collections_api.html#matplotlib.collections.PatchCollection I believe that the property you are looking for is 'edgewidth'. E.g. (and I think this is right, but not where I can test right now): the_artist.set_edgewidth(0.0) Which I believe will work, or you may have to do the_artist.set_edgewidths((0.0,)) But anyway, hopefully this is enough to set you on your way. On Fri, Oct 15, 2010 at 4:10 AM, Robert Fenwick < rob...@ir...> wrote: > > Hi, > > I have a 3d plot that I am trying to plot and I can not get rid of the > marker edge. an example would help > > Bryn > > > > > > > > ------------------------------------------------------------------------------ > Download new Adobe(R) Flash(R) Builder(TM) 4 > The new Adobe(R) Flex(R) 4 and Flash(R) Builder(TM) 4 (formerly > Flex(R) Builder(TM)) enable the development of rich applications that run > across multiple browsers and platforms. Download your free trials today! > http://p.sf.net/sfu/adobe-dev2dev > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > -- Daniel Hyams dh...@gm... |
|
From: John H. <jd...@gm...> - 2010-10-15 13:40:50
|
On Thu, Oct 14, 2010 at 2:07 PM, Carl Karsten <ca...@pe...> wrote: > yep - thanks. Not exactly how I remember it from the talk. wonder > where the story got changed. Hey Carl -- I added the talk video link on the mpl website http://carlfk.blip.tv/file/2557425 The dolphins story you were referring to starts around 39:30. Not sure how your memory of the story got deformed :-) JDH |
|
From: Jae-Joon L. <lee...@gm...> - 2010-10-15 13:25:27
|
On Fri, Oct 15, 2010 at 9:33 PM, Lorenzo Isella
<lor...@gm...> wrote:
> arr = Arrow(0, 0, .3, .3, edgecolor='white')
>
> # Get the subplot that we are currently working on
> ax = gca()
>
> # Now add the arrow
> ax.add_patch(arr)
>
>
I recommend you to use the annotate command.
annotate("", xy=(0, 0), xytext=(0.3, 0.3), arrowprops=dict(fc="g"))
see
http://matplotlib.sourceforge.net/users/annotations_guide.html#annotating-with-arrow
Regards,
-JJ
|
|
From: John H. <jd...@gm...> - 2010-10-15 12:52:02
|
On Fri, Oct 15, 2010 at 3:10 AM, Robert Fenwick
<rob...@ir...> wrote:
> I have a 3d plot that I am trying to plot and I can not get rid of the marker edge. an example would help
What have you tried -- if line is a Line3D object, the following should work:
line.set_markeredgecolor('None')
Note that 'None' is a string here, not the python object None. This
is because None in matplotlib properties means do the default, ie the
default value specified in matplotlibrc
http://matplotlib.sourceforge.net/users/customizing.html
JDH
|
|
From: Lorenzo I. <lor...@gm...> - 2010-10-15 12:33:56
|
Dear All, I am not very much into matplotlib, so please bear with me if I am asking a trivial question. I put together this small snippet with the help I got on the mailing list and using the arrow example at http://bit.ly/cI9dqj . My problem is (or at least I believe it to be) the fact that I am messing up the coordinates or rather: I am generating a x and y coordinates in the range [-1,1], but I eventually resort to polar coordinates. It all goes fine till I try adding arrows to the image (then I think about Cartesian coordinates) and the result is quite a mess. Bottom line: any ideas about how to use arrows in a polar plot? Many thanks Lorenzo ########################################################################## #!/usr/bin/env python """ See pcolor_demo2 for a much faster way of generating pcolor plots """ from __future__ import division from pylab import * # make these smaller to increase the resolution dx, dy = 0.005, 0.005 x = arange(-1.0, 1.0, dx) y = arange(-1.0, 1.0, dy) X,Y = meshgrid(x, y) # function defined in polar coordinate def func5(theta, r): y = r*np.sin(theta) theta=np.arcsin(y) return np.cos(theta) def func6(theta, r): y = r*np.sin(theta) theta=np.arcsin(y) return np.abs(sin(theta)) def func7(theta, r): y = r*np.sin(theta) theta=np.arcsin(y) return np.abs(cos(theta)) R=1. n_theta, n_r = 360, 100 # coordinates of the mesh theta = np.linspace(0, 2*np.pi, n_theta+1) r = np.linspace(0., R, n_r + 1) dr, dtheta = r[1]-r[0], theta[1]-theta[0] # cooridnate for the data point theta_d = np.arange(dtheta/2., 2*np.pi, dtheta) r_d = np.arange(dr/2., R, dr) TT, RR = meshgrid(theta_d, r_d) # Z = func6(TT, RR) Z = func7(TT, RR) ax=subplot(1,1,1, projection="polar", aspect=1.) ax.pcolormesh(theta, r, Z) # ax.set_xlabel('Model complexity --->') ax.set_yticklabels([]) ax.set_xticklabels([]) ax.grid(False) # show() arr = Arrow(0, 0, .3, .3, edgecolor='white') # Get the subplot that we are currently working on ax = gca() # Now add the arrow ax.add_patch(arr) # We should be able to make modifications to the arrow. # Lets make it green. arr.set_facecolor('g') savefig("test.pdf") clf() |
|
From: Daniel F. <dan...@we...> - 2010-10-15 10:21:05
|
Dear all, I would like to project a graphics file of some colour coded geo data that is already given in lat-lon with corners specified in lat-lon onto a map. The projection of the result should be flexible. In the end the resulting plot shows a section of the earth, either from a satallite perspective (ortho) or some convenient projection. All examples I found seem to be doing different things or special cases that I have trouble to generalize or modify. These examples transform the data from some (often unpecified) system to a coordinate system that suites the chosen projection. But the fact that the geo data file is given in lat-lon with corners must simplify everything and should make the chosen projection arbitrary. The resolution of the data file must also be arbitrary and should not appear in the code. I do not see why the final projection should require beforehand a change of the geo-data coordinate system *by hand* i.e. typing in the transform formulas and extracting pixel sizes. I would have thought that to avoid this is the whole point of using map toolkits. I imagine a function that takes the parameters - datafile, alternatively an array with a colour value or RGB for each lon-lat coordinate - its lon-lat corners, - a basemap map-object i want the data projected onto - and the projection specifier (possibly with desired corners if different from the maps corners) that determines how i want to see the the resulting piece of the globe. Could someone explain to me (a python newbie) what the sequence of steps/functions would have to be or which predefined methods are doing this. Regards Daniel |
|
From: Robert F. <rob...@ir...> - 2010-10-15 09:55:27
|
Hi, I have a 3d plot that I am trying to plot and I can not get rid of the marker edge. an example would help Bryn |