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






Showing results of 523

<< < 1 .. 15 16 17 18 19 .. 21 > >> (Page 17 of 21)
From: Ryan M. <rm...@gm...> - 2009年05月07日 19:38:10
On Tue, Apr 28, 2009 at 9:54 PM, Thomas Robitaille <
tho...@gm...> wrote:
> Thanks! I could not find any documentation relating to this, so I was
> wondering whether it would be better to go with a well-documented
> function such as text or figtext? What would be best to use?
>
> Thomas
>
> On 28 Apr 2009, at 22:27, Yong-Duk Jin wrote:
>
> > You can use 'LABELPAD' to adjust label position.
> > e.g.
> >
> > import pylab
> > hAxes = pylab.axes()
> > pylab.xlabel('test')
> > hAxes.xaxis.LABELPAD = 0
> > pylab.show()
> >
>
There's now a documented way to do this in SVN HEAD, by passing labelpad as
an argument to the xlabel/ylabel functions.
Ryan
-- 
Ryan May
Graduate Research Assistant
School of Meteorology
University of Oklahoma
Sent from Norman, Oklahoma, United States
From: Eric F. <ef...@ha...> - 2009年05月07日 19:28:46
Thomas Robitaille wrote:
> Hello,
> 
> I'm having a strange issue, and I've managed to reduce it to a simple 
> problem. I created the following file structure:
> 
> - a directory named scripts/
> - a script called scripts/inspect.py
> - a script called scripts/test.py
> 
> inspect.py contains just 'pass' and test.py contains 'from 
> matplotlib.pyplot import *'. When I run
> 
> python scripts/test.py
> 
> I get the traceback included below. Basically, it looks like python is 
> trying to import my inspect.py script instead of one that comes with 
> matplotlib. Is this just down to the design of python? Is there 
Actually, inspect.py doesn't come from mpl, it is in the python standard 
library.
Eric
> anything I can do to avoid this problem in future apart from renaming 
> inspect.py to another name?
> 
> Thanks,
> 
> Thomas
> 
> Traceback (most recent call last):
> File "scripts/test.py", line 1, in <module>
> from matplotlib.pyplot import *
> File "/Library/Frameworks/Python.framework/Versions/2.6/lib/ 
> python2.6/site-packages/matplotlib-0.98.6svn-py2.6-macosx-10.5-fat.egg/ 
> matplotlib/__init__.py", line 129, in <module>
> from rcsetup import defaultParams, validate_backend, 
> validate_toolbar
> File "/Library/Frameworks/Python.framework/Versions/2.6/lib/ 
> python2.6/site-packages/matplotlib-0.98.6svn-py2.6-macosx-10.5-fat.egg/ 
> matplotlib/rcsetup.py", line 19, in <module>
> from matplotlib.colors import is_color_like
> File "/Library/Frameworks/Python.framework/Versions/2.6/lib/ 
> python2.6/site-packages/matplotlib-0.98.6svn-py2.6-macosx-10.5-fat.egg/ 
> matplotlib/colors.py", line 52, in <module>
> import numpy as np
> File "/Library/Frameworks/Python.framework/Versions/2.6/lib/ 
> python2.6/site-packages/numpy-1.4.0.dev6942-py2.6-macosx-10.5-fat.egg/ 
> numpy/__init__.py", line 147, in <module>
> import ma
> File "/Library/Frameworks/Python.framework/Versions/2.6/lib/ 
> python2.6/site-packages/numpy-1.4.0.dev6942-py2.6-macosx-10.5-fat.egg/ 
> numpy/ma/__init__.py", line 44, in <module>
> import core
> File "/Library/Frameworks/Python.framework/Versions/2.6/lib/ 
> python2.6/site-packages/numpy-1.4.0.dev6942-py2.6-macosx-10.5-fat.egg/ 
> numpy/ma/core.py", line 4855, in <module>
> all = _frommethod('all')
> File "/Library/Frameworks/Python.framework/Versions/2.6/lib/ 
> python2.6/site-packages/numpy-1.4.0.dev6942-py2.6-macosx-10.5-fat.egg/ 
> numpy/ma/core.py", line 4829, in __init__
> self.__doc__ = self.getdoc()
> File "/Library/Frameworks/Python.framework/Versions/2.6/lib/ 
> python2.6/site-packages/numpy-1.4.0.dev6942-py2.6-macosx-10.5-fat.egg/ 
> numpy/ma/core.py", line 4835, in getdoc
> signature = self.__name__ + get_object_signature(meth)
> File "/Library/Frameworks/Python.framework/Versions/2.6/lib/ 
> python2.6/site-packages/numpy-1.4.0.dev6942-py2.6-macosx-10.5-fat.egg/ 
> numpy/ma/core.py", line 111, in get_object_signature
> sig = inspect.formatargspec(*inspect.getargspec(obj))
> AttributeError: 'module' object has no attribute 'formatargspec'
> 
> 
> ------------------------------------------------------------------------------
> The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
> production scanning environment may not be a perfect world - but thanks to
> Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700
> Series Scanner you'll get full speed at 300 dpi even with all image 
> processing features enabled. http://p.sf.net/sfu/kodak-com
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
From: Sandro T. <mo...@de...> - 2009年05月07日 19:21:57
On Thu, May 7, 2009 at 21:12, Thomas Robitaille
<tho...@gm...> wrote:
> Hello,
>
> I'm having a strange issue, and I've managed to reduce it to a simple
> problem. I created the following file structure:
>
> - a directory named scripts/
> - a script called scripts/inspect.py
> - a script called scripts/test.py
>
> inspect.py contains just 'pass' and test.py contains 'from
> matplotlib.pyplot import *'. When I run
>
> python scripts/test.py
>
> I get the traceback included below. Basically, it looks like python is
> trying to import my inspect.py script instead of one that comes with
> matplotlib. Is this just down to the design of python?
the current directory and the one containing the executed script are
by default imported first than standard and 3rd part modules.
> Is there
> anything I can do to avoid this problem in future apart from renaming
> inspect.py to another name?
rename it :) or maybe changing the os.path variable forcing to some values.
Cheers,
-- 
Sandro Tosi (aka morph, morpheus, matrixhasu)
My website: http://matrixhasu.altervista.org/
Me at Debian: http://wiki.debian.org/SandroTosi
From: Thomas R. <tho...@gm...> - 2009年05月07日 19:12:40
Hello,
I'm having a strange issue, and I've managed to reduce it to a simple 
problem. I created the following file structure:
- a directory named scripts/
- a script called scripts/inspect.py
- a script called scripts/test.py
inspect.py contains just 'pass' and test.py contains 'from 
matplotlib.pyplot import *'. When I run
python scripts/test.py
I get the traceback included below. Basically, it looks like python is 
trying to import my inspect.py script instead of one that comes with 
matplotlib. Is this just down to the design of python? Is there 
anything I can do to avoid this problem in future apart from renaming 
inspect.py to another name?
Thanks,
Thomas
Traceback (most recent call last):
 File "scripts/test.py", line 1, in <module>
 from matplotlib.pyplot import *
 File "/Library/Frameworks/Python.framework/Versions/2.6/lib/ 
python2.6/site-packages/matplotlib-0.98.6svn-py2.6-macosx-10.5-fat.egg/ 
matplotlib/__init__.py", line 129, in <module>
 from rcsetup import defaultParams, validate_backend, 
validate_toolbar
 File "/Library/Frameworks/Python.framework/Versions/2.6/lib/ 
python2.6/site-packages/matplotlib-0.98.6svn-py2.6-macosx-10.5-fat.egg/ 
matplotlib/rcsetup.py", line 19, in <module>
 from matplotlib.colors import is_color_like
 File "/Library/Frameworks/Python.framework/Versions/2.6/lib/ 
python2.6/site-packages/matplotlib-0.98.6svn-py2.6-macosx-10.5-fat.egg/ 
matplotlib/colors.py", line 52, in <module>
 import numpy as np
 File "/Library/Frameworks/Python.framework/Versions/2.6/lib/ 
python2.6/site-packages/numpy-1.4.0.dev6942-py2.6-macosx-10.5-fat.egg/ 
numpy/__init__.py", line 147, in <module>
 import ma
 File "/Library/Frameworks/Python.framework/Versions/2.6/lib/ 
python2.6/site-packages/numpy-1.4.0.dev6942-py2.6-macosx-10.5-fat.egg/ 
numpy/ma/__init__.py", line 44, in <module>
 import core
 File "/Library/Frameworks/Python.framework/Versions/2.6/lib/ 
python2.6/site-packages/numpy-1.4.0.dev6942-py2.6-macosx-10.5-fat.egg/ 
numpy/ma/core.py", line 4855, in <module>
 all = _frommethod('all')
 File "/Library/Frameworks/Python.framework/Versions/2.6/lib/ 
python2.6/site-packages/numpy-1.4.0.dev6942-py2.6-macosx-10.5-fat.egg/ 
numpy/ma/core.py", line 4829, in __init__
 self.__doc__ = self.getdoc()
 File "/Library/Frameworks/Python.framework/Versions/2.6/lib/ 
python2.6/site-packages/numpy-1.4.0.dev6942-py2.6-macosx-10.5-fat.egg/ 
numpy/ma/core.py", line 4835, in getdoc
 signature = self.__name__ + get_object_signature(meth)
 File "/Library/Frameworks/Python.framework/Versions/2.6/lib/ 
python2.6/site-packages/numpy-1.4.0.dev6942-py2.6-macosx-10.5-fat.egg/ 
numpy/ma/core.py", line 111, in get_object_signature
 sig = inspect.formatargspec(*inspect.getargspec(obj))
AttributeError: 'module' object has no attribute 'formatargspec'
From: Ryan M. <rm...@gm...> - 2009年05月07日 18:38:29
On Mon, May 4, 2009 at 9:49 AM, Olivier Benoist <
oli...@er...> wrote:
> Hi,
> I'm new with matplotlib.
>
> I need to make a graph with the X axis represents time in hours and
> minutes. My script don't works, I want to display all the values of time
> that I have.
> I use a list of string like this :
> t=['0015', '0030', '0045', '0100', '0115', '0130', '0145', '0200',
> '0215', '0230', '0245', '0300', '03
> 15', '0330', '0345', '0400', '0415', '0430', '0445', '0500', '0515',
> '0530', '0545', '0600', '0615',
> '0630', '0645', '0700', '0715', '0730', '0745', '0800', '0815', '0830',
> '0845', '0900', '0915', '09
> 30', '0945', '1000', '1015', '1030', '1045', '1100', '1115', '1130',
> '1145', '1200', '1215', '1230',
> '1245', '1300', '1315', '1330', '1345', '1400', '1415']
>
> ax.plot(t, y)
>
> I tried to convert hours and minutes to the base 100 ( , it works but I
> can not show on the x-axis the hours, minutes.
> I tried to use plot_date, but I don't understand "x and/or y can be a
> sequence of dates represented as float days since 0001年01月01日 UTC."
>
> Could you help me, please ?
You don't necessarily need to use plot_date. Try this:
import numpy as np
import matplotlib.pyplot as plt
from matplotlib.ticker import FuncFormatter, MultipleLocator
times = ['0015', '0030', '0045', '0100', '0115', '0130', '0145', '0200',
'0215',
 '0230', '0245', '0300', '0315', '0330', '0345', '0400', '0415', '0430',
 '0445', '0500', '0515', '0530', '0545', '0600', '0615', '0630', '0645',
 '0700', '0715', '0730', '0745', '0800', '0815', '0830', '0845', '0900',
 '0915', '0930', '0945', '1000', '1015', '1030', '1045', '1100', '1115',
 '1130', '1145', '1200', '1215', '1230', '1245', '1300', '1315', '1330',
 '1345', '1400', '1415']
# Conver the string time values into the corresponding number of minutes
minutes = np.array([int(t[:2])*60 + int(t[2:]) for t in times])
y = np.random.rand(*minutes.shape)
plt.plot(minutes, y)
ax = plt.gca()
# Set the formatter to take a value in minutes and convert to hour:minute
ax.xaxis.set_major_formatter(FuncFormatter(
 lambda t,p : '%02d:%02d' % (t//60, t%60)))
# Set up placing tick marks every 15 minutes
ax.xaxis.set_major_locator(MultipleLocator(15))
# Used to rotate all of the ticks so that they fit on the plot.
# ha='center' aligns them better to the tick marks
fig = plt.gcf()
fig.autofmt_xdate(rotation=90, ha='center')
plt.show()
Ryan
--
Ryan May
Graduate Research Assistant
School of Meteorology
University of Oklahoma
Sent from Norman, Oklahoma, United States
From: Robert C. <cim...@nt...> - 2009年05月07日 17:55:51
Ryan May wrote:
> On Thu, May 7, 2009 at 12:39 PM, Eric Firing <ef...@ha...> wrote:
> 
>> In case you are not receiving the automatic svn commit messages: yesterday
>> I took the liberty of renaming log.py to multiprocess.py, because as far as
>> I could see the former gave no clue as to the point of the example. Feel
>> free to change it back, or change it to something else, if you think I am
>> mistaken or confused about this.
> 
> 
> No, I think that is a much better name in terms of why that demo exists in
> matplotlib. It was only in my haste to commit it that I didn't think about
> renaming it.
Yes, it is a better name.
Of course, you can also add the log2.py script to the matplotlib example 
s(renamed to multiprocess_complex.py?) if you wish.
cheers,
r.
From: Ryan M. <rm...@gm...> - 2009年05月07日 17:47:16
On Thu, May 7, 2009 at 12:39 PM, Eric Firing <ef...@ha...> wrote:
> In case you are not receiving the automatic svn commit messages: yesterday
> I took the liberty of renaming log.py to multiprocess.py, because as far as
> I could see the former gave no clue as to the point of the example. Feel
> free to change it back, or change it to something else, if you think I am
> mistaken or confused about this.
No, I think that is a much better name in terms of why that demo exists in
matplotlib. It was only in my haste to commit it that I didn't think about
renaming it.
Ryan
-- 
Ryan May
Graduate Research Assistant
School of Meteorology
University of Oklahoma
From: Eric F. <ef...@ha...> - 2009年05月07日 17:39:15
Robert Cimrman wrote:
> Ryan May wrote:
>> On Wed, May 6, 2009 at 8:53 AM, Robert Cimrman <cim...@nt...> 
>> wrote:
>>
>>> Ryan May wrote:
In case you are not receiving the automatic svn commit messages: 
yesterday I took the liberty of renaming log.py to multiprocess.py, 
because as far as I could see the former gave no clue as to the point of 
the example. Feel free to change it back, or change it to something 
else, if you think I am mistaken or confused about this.
Eric
>>>
>>>> On Wed, May 6, 2009 at 7:57 AM, Robert Cimrman <cim...@nt...>
>>>> wrote:
>>>>
>>>>> Just for the record: Ryan May's example in this thread, that uses 
>>>>> pipes,
>>>>> inspired me to try pipes as well, instead of queues
>>>>> (multiprocessing.Pipe instead of Queue) and the "hanging problem", 
>>>>> i.e.
>>>>> the problem that Ctrl-C interrupted the program, but it had to be 
>>>>> killed
>>>>> to stop, disappeared. I can fix the script that I sent in message [1]
>>>>> and provide it, if there is interest. (Currently I have fixed only the
>>>>> version that is within sfepy).
>>>>>
>>>>
>>>> I know I'd be interested. With your permission, it might make a nice
>>>> example as well.
>>>>
>>> Permission granted :) I have sent the script in response to William.
>>>
>>>
>> Done. I like the fact that with your example, everything is 
>> self-contained
>> in a single script.
> 
> Exactly, the details of starting another python process are hidden, the 
> multiprocessing module is really nice.
> 
> You might want to add
> 
> import matplotlib
> matplotlib.use('GtkAgg')
> 
> to the script, and remove "from Queue import Empty".
> 
> FYI: I am sending also a more complex example - a Log class used in 
> sfepy, which supports multiple subplots, labels, logarithmic plots etc. 
> The file contains some other support classes too, so that it works 
> standalone. It is not very polished, but it serves its purpose.
> 
> r.
> 
> 
> 
> 
> ------------------------------------------------------------------------
> 
> ------------------------------------------------------------------------------
> The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
> production scanning environment may not be a perfect world - but thanks to
> Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700
> Series Scanner you'll get full speed at 300 dpi even with all image 
> processing features enabled. http://p.sf.net/sfu/kodak-com
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
From: Christopher B. <Chr...@no...> - 2009年05月07日 16:52:23
Brian Granger wrote:
> I too have been bit by related freetype problems...
> 
> Is there a way of telling matplotlib which freetype dylib to use on OS
> X?
at run time, no. At built time, then:
> I can probably go and hack on the setup.py/setupext.py 
that's how.
The tough part is that AFAICT, there is no way to specify a particular 
lib to link to, rather, you specify where to look for libs, so you need 
to make sure that it's looking where you want before where you don't want.
Ideally, the MPL community would decide on which is the "canonical" 
choice, and that would be how setup.py would be written. But there are 
so many options, it's hard to come to consensus.
Personally, I'd like to see the "Kyng Chaos" frameworks be the 
"standard" basis for python extension binaries:
http://www.kyngchaos.com/software:frameworks
That's a pretty complete set, and would support MPL, PIL, etc, etc....
But it seems folks prefer to do static linking for distributed binaries, 
which is good too, but a bit tricky, as gcc really prefers to 
dynamically link -- it's easy to accidentally include a dynamic link 
without realizing it.
-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: Brian G. <ell...@gm...> - 2009年05月07日 16:19:18
I too have been bit by related freetype problems...
Is there a way of telling matplotlib which freetype dylib to use on OS
X? I have multiple installed and it finds the wrong one by default.
I can probably go and hack on the setup.py/setupext.py to do this but
I am hoping there is any easier way.
Thanks,
Brian
On Thu, May 7, 2009 at 9:07 AM, Christopher Barker
<Chr...@no...> wrote:
> John Seales wrote:
>> Turns out that libfreetype in X11 has a bug with mac os 10.4.11. I found
>> out how to fix it on
>> http://forums.macosxhints.com/archive/index.php/t-98792.html . The new
>> libfreetype, once in the right spot and called libfreetype.6.dylib seems
>> to work.
>
> If it works, you're probably done, but, for the sake of completeness,
> what do you get from:
>
> $ ls -l /usr/X11R6/lib/libfreetype*
>
> -rw-r--r--  1 root wheel 348476 Jan 21 07:27
> /usr/X11R6/lib/libfreetype.6.3.dylib
>
> lrwxr-xr-x  1 root wheel   21 Aug 14 2008
> /usr/X11R6/lib/libfreetype.6.dylib -> libfreetype.6.3.dylib
>
> -rw-r--r--  1 root wheel 831260 Mar 23 2007 /usr/X11R6/lib/libfreetype.a
>
> lrwxr-xr-x  1 root wheel   21 Aug 14 2008
> /usr/X11R6/lib/libfreetype.dylib -> libfreetype.6.3.dylib
>
> This is the traditional *nix convention:
>
> the real lib is libfreetype.6.3.dylib (major an minor version specified)
>
> The other ones are links to it.
>
> I suspect that you where missing the libfreetype.6.dylib link before,
> and that you may now have a full lib there, rather than a link. Which
> probably is fine, but not quite standard.
>
> -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...
>
> ------------------------------------------------------------------------------
> The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
> production scanning environment may not be a perfect world - but thanks to
> Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700
> Series Scanner you'll get full speed at 300 dpi even with all image
> processing features enabled. http://p.sf.net/sfu/kodak-com
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
From: Christopher B. <Chr...@no...> - 2009年05月07日 16:12:44
Jouni K. Seppänen wrote:
> AFAIK, the static linking is done precisely to avoid version mismatches
> between different versions of freetype, zlib, and png on various
> versions of OS X.
Well, it was done originally because all those libs weren't there at all 
originally. Apple has slowly been adding more (and the first freetype 
they included was not compatible with MPL in some way)
But yes, if there are different versions floating around static linking 
is a good idea.
 Several *.so files within the mpkg link to
> /usr/X11R6/lib/libfreetype.6.dylib and /usr/lib/libz.1.dylib (though,
> curiously, none link to the system libpng).
I think zlib as been pretty reliable, freetype not so much, and I don't 
think Apple provides libpng at all (I've got a whole bunch of copies on 
my system that came with various packages -- but none in system locations)
> I suppose this is exactly the kind of problem that results from dynamic
> linking to a wrong version of freetype:
In this case, I think a symlink was missing -- which looks like an Apple 
bug, but I can't tell you why it didn't bite me -- I suppose it depends 
on what order you installed/upgraded things.
-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: Christopher B. <Chr...@no...> - 2009年05月07日 16:07:03
John Seales wrote:
> Turns out that libfreetype in X11 has a bug with mac os 10.4.11. I found 
> out how to fix it on 
> http://forums.macosxhints.com/archive/index.php/t-98792.html . The new 
> libfreetype, once in the right spot and called libfreetype.6.dylib seems 
> to work.
If it works, you're probably done, but, for the sake of completeness, 
what do you get from:
$ ls -l /usr/X11R6/lib/libfreetype*
-rw-r--r-- 1 root wheel 348476 Jan 21 07:27
/usr/X11R6/lib/libfreetype.6.3.dylib
lrwxr-xr-x 1 root wheel 21 Aug 14 2008
/usr/X11R6/lib/libfreetype.6.dylib -> libfreetype.6.3.dylib
-rw-r--r-- 1 root wheel 831260 Mar 23 2007 /usr/X11R6/lib/libfreetype.a
lrwxr-xr-x 1 root wheel 21 Aug 14 2008 
/usr/X11R6/lib/libfreetype.dylib -> libfreetype.6.3.dylib
This is the traditional *nix convention:
the real lib is libfreetype.6.3.dylib (major an minor version specified)
The other ones are links to it.
I suspect that you where missing the libfreetype.6.dylib link before, 
and that you may now have a full lib there, rather than a link. Which 
probably is fine, but not quite standard.
-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: John S. <pra...@ho...> - 2009年05月07日 15:50:28
Victory!
Turns out that libfreetype in X11 has a bug with mac os 10.4.11. I found out how to fix it on http://forums.macosxhints.com/archive/index.php/t-98792.html . The new libfreetype, once in the right spot and called libfreetype.6.dylib seems to work.
Thanks, Chris, for helping me. 
From: pra...@ho...
To: mat...@li...
Date: Wed, 6 May 2009 17:44:12 -0700
Subject: Re: [Matplotlib-users] O pylab why do you refuse to import?
I do have X11. It looks like there's a problem with the libfreetype, but I don't understand what the problem is. 
john-seales-computer:/ johnseales$ file /usr/X11R6/lib/libfreetype.6.dylib
/usr/X11R6/lib/libfreetype.6.dylib: cannot open (/usr/X11R6/lib/libfreetype.6.dylib)
john-seales-computer:/ johnseales$ file /usr/X11R6/lib/libfreetype.6.3.dylib
/usr/X11R6/lib/libfreetype.6.3.dylib: Mach-O universal binary with 2 architectures
/usr/X11R6/lib/libfreetype.6.3.dylib (for architecture ppc):Mach-O dynamically linked shared library ppc
/usr/X11R6/lib/libfreetype.6.3.dylib (for architecture i386): Mach-O dynamically linked shared library i386
> Date: Wed, 6 May 2009 16:55:23 -0700
> From: Chr...@no...
> To: mat...@li...
> Subject: Re: [Matplotlib-users] O pylab why do you refuse to import?
> 
> note: make sure to include the list, it doesn't look like you did.
> 
> John Seales wrote:
> > Here's what it says:
> > 
> > $ file ft2font.so
> > ft2font.so: Mach-O universal binary with 2 architectures
> > ft2font.so (for architecture i386): Mach-O bundle i386
> > ft2font.so (for architecture ppc): Mach-O bundle ppc
> 
> that's right, but now I see that that wasn't the issue anyway:
> 
> > > > ImportError: 
> > dlopen(/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib/ft2font.so, 
> > 2): Library not loaded: /usr/X11R6/lib/libfreetype.6.dylib
> > > > Referenced from: 
> > /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib/ft2font.so
> 
> ft2font is relying on libfreetype. I think that's the one that Apple 
> delivers with their X11 (I know I have it, anyway), but I think X11 is 
> an optional install, so you may not have it.
> 
> Is that file there? ON my system:
> 
> $ file /usr/X11R6/lib/libfreetype.6.dylib
> /usr/X11R6/lib/libfreetype.6.dylib: symbolic link to `libfreetype.6.3.dylib'
> 
> and
> 
> $ file /usr/X11R6/lib/libfreetype.6.3.dylib
> /usr/X11R6/lib/libfreetype.6.3.dylib: Mach-O dynamically linked shared 
> library ppc
> 
> so I have it, and it's a ppc lib, which makes sense, as I'm running on a 
> ppc machine.
> 
> 
> If you don't have it, probably the easiest thing to do is install 
> Apple's X11 -- otherwise, perhaps MPL should be built against a static 
> libfreetype.
> 
> -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...
> 
> ------------------------------------------------------------------------------
> The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
> production scanning environment may not be a perfect world - but thanks to
> Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700
> Series Scanner you'll get full speed at 300 dpi even with all image 
> processing features enabled. http://p.sf.net/sfu/kodak-com
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Hotmail® goes with you. Get it on your BlackBerry or iPhone.
_________________________________________________________________
Hotmail® goes with you. 
http://windowslive.com/Tutorial/Hotmail/Mobile?ocid=TXT_TAGLM_WL_HM_Tutorial_Mobile1_052009 
From: John S. <pra...@ho...> - 2009年05月07日 15:48:49
Victory!
Turns out that libfreetype in X11 has a bug with mac os 10.4.11. I found out how to fix it on http://forums.macosxhints.com/archive/index.php/t-98792.html . The new libfreetype, once in the right spot and called libfreetype.6.dylib seems to work.
Thanks, Chris, for helping me. 
From: pra...@ho...
To: mat...@li...
Date: Wed, 6 May 2009 17:44:12 -0700
Subject: Re: [Matplotlib-users] O pylab why do you refuse to import?
I do have X11. It looks like there's a problem with the libfreetype, but I don't understand what the problem is. 
john-seales-computer:/ johnseales$ file /usr/X11R6/lib/libfreetype.6.dylib
/usr/X11R6/lib/libfreetype.6.dylib: cannot open (/usr/X11R6/lib/libfreetype.6.dylib)
john-seales-computer:/ johnseales$ file /usr/X11R6/lib/libfreetype.6.3.dylib
/usr/X11R6/lib/libfreetype.6.3.dylib: Mach-O universal binary with 2 architectures
/usr/X11R6/lib/libfreetype.6.3.dylib (for architecture ppc):Mach-O dynamically linked shared library ppc
/usr/X11R6/lib/libfreetype.6.3.dylib (for architecture i386): Mach-O dynamically linked shared library i386
> Date: Wed, 6 May 2009 16:55:23 -0700
> From: Chr...@no...
> To: mat...@li...
> Subject: Re: [Matplotlib-users] O pylab why do you refuse to import?
> 
> note: make sure to include the list, it doesn't look like you did.
> 
> John Seales wrote:
> > Here's what it says:
> > 
> > $ file ft2font.so
> > ft2font.so: Mach-O universal binary with 2 architectures
> > ft2font.so (for architecture i386): Mach-O bundle i386
> > ft2font.so (for architecture ppc): Mach-O bundle ppc
> 
> that's right, but now I see that that wasn't the issue anyway:
> 
> > > > ImportError: 
> > dlopen(/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib/ft2font.so, 
> > 2): Library not loaded: /usr/X11R6/lib/libfreetype.6.dylib
> > > > Referenced from: 
> > /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib/ft2font.so
> 
> ft2font is relying on libfreetype. I think that's the one that Apple 
> delivers with their X11 (I know I have it, anyway), but I think X11 is 
> an optional install, so you may not have it.
> 
> Is that file there? ON my system:
> 
> $ file /usr/X11R6/lib/libfreetype.6.dylib
> /usr/X11R6/lib/libfreetype.6.dylib: symbolic link to `libfreetype.6.3.dylib'
> 
> and
> 
> $ file /usr/X11R6/lib/libfreetype.6.3.dylib
> /usr/X11R6/lib/libfreetype.6.3.dylib: Mach-O dynamically linked shared 
> library ppc
> 
> so I have it, and it's a ppc lib, which makes sense, as I'm running on a 
> ppc machine.
> 
> 
> If you don't have it, probably the easiest thing to do is install 
> Apple's X11 -- otherwise, perhaps MPL should be built against a static 
> libfreetype.
> 
> -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...
> 
> ------------------------------------------------------------------------------
> The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
> production scanning environment may not be a perfect world - but thanks to
> Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700
> Series Scanner you'll get full speed at 300 dpi even with all image 
> processing features enabled. http://p.sf.net/sfu/kodak-com
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Hotmail® goes with you. Get it on your BlackBerry or iPhone.
_________________________________________________________________
Hotmail® has a new way to see what's up with your friends.
http://windowslive.com/Tutorial/Hotmail/WhatsNew?ocid=TXT_TAGLM_WL_HM_Tutorial_WhatsNew1_052009 
From: John H. <jd...@gm...> - 2009年05月07日 14:44:44
On Wed, May 6, 2009 at 1:05 PM, Elan Pavlov <ep...@gm...> wrote:
> Hi,
> I can't get wxpython to play well with matplotlib and draw_artist.
> After mucking around quite a bit I think I narrowed it down to the
> draw_artist function The problem seems to be that draw_artist when
> working within wxpython (as opposed to a simple mpl window) doesn't
> remove the old points it plotted. I adapted the example from the
> cookbook (http://www.scipy.org/Cookbook/Matplotlib/Animations) to
> illustrate this problem. I modified the example so it is updated on
> mouse movements (followed by idle time) so that the problem is more
> visual.
>
> Replacing the copy_from_bbox/restore/draw_artist (i.e. removing the
> animated properties) with the simple draw causes this to work. The
> copy_from_bbox/restore methods work as expected so it seems that the
> problem is either the draw_artist (or possibly the blit, but that
> seems unlikely).
>
> Is there something I am doing wrong?
You need to make sure that the background you copy on the initial draw
(with the artist animate so it won't be drawn) is large enough to
cover the entire artist on subsequent draws. This is the background
and will be used to "erase" subsequent draws of the animated artist.
Then you draw the artist and blit the region. When you are ready to
update with new data, restore the background (this erases all the old
points as long as the background region is large enough) and then
redraw/reblit.
JDH
>
> Elan
> --
> Beware of bugs in the above code; I have only proved it correct, not tried it.
> - Donald Knuth
>
> ------------------------------------------------------------------------------
> The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
> production scanning environment may not be a perfect world - but thanks to
> Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700
> Series Scanner you'll get full speed at 300 dpi even with all image
> processing features enabled. http://p.sf.net/sfu/kodak-com
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
>
From: Michiel de H. <mjl...@ya...> - 2009年05月07日 14:43:20
> Looks like we have the culprit. Is this a bug or an
> undocumented feature 
I think that the current code is a bit of a hack that sometimes works and sometimes doesn't, depending on which backend you use.
> and is there anything I should do about it (i.e.,
> report it)?
Yes, I think so. It's not super difficult to find a solution, but it will need some discussion with the matplotlib developers to find the best way to fit this in with the existing matplotlib code.
> More importantly, do you have any idea how to fix the
> problem 
In principle, it's simple. You'll need to split up the restore_background function in a frontend_restore_background and a backend_restore_background (arbitrary names, of course). The frontend_restore_background is what the user uses to tell matplotlib which background should be restored where. Inside the event loop, the backend_restore_background uses this information to do the actual blitting.
> or how the event interactions with wxpython work?
I don't think it matters much, as long as the actual drawing is done from inside figure.draw(renderer).
> Is it even feasible to do a
> restore_canvas within the event loop
Absolutely. There is no essential difference between drawing a line or blitting a background. Imagine the code in figure.draw(renderer) to be something along the lines of
blit a background, if any
draw the lines, if any
fill shapes with color, if any
draw the text, if any
...
> or will this slow it down to the extent of being useless?
I wouldn't know why.
--Michiel.
--- On Thu, 5/7/09, Elan Pavlov <ep...@gm...> wrote:
> From: Elan Pavlov <ep...@gm...>
> Subject: Re: [Matplotlib-users] Wxpython, Matplotlib and draw_artist
> To: mjl...@ya...
> Cc: mat...@li...
> Date: Thursday, May 7, 2009, 10:23 AM
> Hi,
> By George, I think you've got it! That does explain the
> fact that old
> lines remain since the restore_background is what should 
> remove them.
> To test out your hypotheses I added sleep commands after
> every line in
> the update_line() function and indeed a blank axes never
> appears.
> Looks like we have the culprit. Is this a bug or an
> undocumented
> feature and is there anything I should do about it (i.e.,
> report it)?
> More importantly, do you have any idea how to fix the
> problem or how
> the event interactions with wxpython work? Is it even
> feasible to do a
> restore_canvas within the event loop or will this slow it
> down to the
> extent of being useless?
> 
> Elan
> ---
> I can no other answer make but thanks,
> And thanks, and ever thanks.
> - William Shakespeare
> 
> On Thu, May 7, 2009 at 9:17 AM, Michiel de Hoon
> <mjl...@ya...> wrote:
> >
> > I am not sure if this is related, but maybe it can
> give you a hint.
> > I looked at the copy_from_bbox/restore/draw_artist
> code a long time ago, and if I remember correctly by calling
> restore_region function, you're drawing directly onto
> the canvas. In contrast, if you do e.g. plot(x,y),
> you're not drawing directly; you're just telling
> matplotlib what you want to plot, but the actual plotting is
> done by matplotlib by calling figure.draw(renderer).
> Typically, this happens from inside the event loop, which is
> how things are supposed to be. On the other hand,
> restore_region bypasses the event loop, which is usually not
> a good idea.
> >
> > --Michiel
> >
> >
> >
> >
> > --- On Wed, 5/6/09, Elan Pavlov
> <ep...@gm...> wrote:
> >
> >> From: Elan Pavlov <ep...@gm...>
> >> Subject: [Matplotlib-users] Wxpython, Matplotlib
> and draw_artist
> >> To: mat...@li...
> >> Date: Wednesday, May 6, 2009, 2:05 PM
> >> Hi,
> >> I can't get wxpython to play well with
> matplotlib and
> >> draw_artist.
> >> After mucking around quite a bit I think I
> narrowed it down
> >> to the
> >> draw_artist function The problem seems to be that
> >> draw_artist when
> >> working within wxpython (as opposed to a simple
> mpl window)
> >> doesn't
> >> remove the old points it plotted. I adapted the
> example
> >> from the
> >> cookbook
> >>
> (http://www.scipy.org/Cookbook/Matplotlib/Animations) to
> >> illustrate this problem. I modified the example so
> it is
> >> updated on
> >> mouse movements (followed by idle time) so that
> the problem
> >> is more
> >> visual.
> >>
> >> Replacing the copy_from_bbox/restore/draw_artist
> (i.e.
> >> removing the
> >> animated properties) with the simple draw causes
> this to
> >> work. The
> >> copy_from_bbox/restore methods work as expected so
> it seems
> >> that the
> >> problem is either the draw_artist (or possibly the
> blit,
> >> but that
> >> seems unlikely).
> >>
> >> Is there something I am doing wrong?
> >>
> >> Elan
> >> --
> >> Beware of bugs in the above code; I have only
> proved it
> >> correct, not tried it.
> >> - Donald Knuth
> >>
> ------------------------------------------------------------------------------
> >> The NEW KODAK i700 Series Scanners deliver under
> ANY
> >> circumstances! Your
> >> production scanning environment may not be a
> perfect world
> >> - but thanks to
> >> Kodak, there's a perfect scanner to get the
> job done!
> >> With the NEW KODAK i700
> >> Series Scanner you'll get full speed at 300
> dpi even
> >> with all image
> >> processing features enabled.
> >>
> http://p.sf.net/sfu/kodak-com_______________________________________________
> >> Matplotlib-users mailing list
> >> Mat...@li...
> >>
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
> >
 
From: Sebastian P. <spc...@gm...> - 2009年05月07日 14:24:24
OK works. I didn't notice the ticks arg. Thanks again
Sebastian
2009年5月7日 Jae-Joon Lee <lee...@gm...>:
> http://matplotlib.sourceforge.net/api/figure_api.html?highlight=colorbar#matplotlib.figure.Figure.colorbar
>
> cbar = colorbar(ticks=lev, format = l_f)
>
> -JJ
>
>
> On Wed, May 6, 2009 at 3:28 PM, Sebastian Pająk <spc...@gm...> wrote:
>> Hello
>>
>> I have a contour plot with specified number of levels (isolines):
>>
>> lev = array([2,3,5,7,10,13,17,21,26,32,42,62,80,100,120,140,180])
>>
>> to have a log "z" axis I put:
>>
>> from matplotlib import colors
>> contourf(x1, y1, z1, lev, norm=colors.LogNorm(lev[0],lev[len(lev)-1]))
>>
>> now, to get colorbar in log scale:
>>
>> from matplotlib.ticker import LogLocator, LogFormatter
>> l_f = LogFormatter(10, labelOnlyBase=False)
>> cbar = colorbar(format = l_f)
>>
>> But the colorbar doesn't have all tick's labels specified in "lev"
>> variable. Ticks are placed correctly on the cbar, but only every
>> second tick has a text label (yes 2, 5, 10 ... etc). What should I do
>> to have ALL levels on colorbar labeled?
>>
>> ------------------------------------------------------------------------------
>> The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
>> production scanning environment may not be a perfect world - but thanks to
>> Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700
>> Series Scanner you'll get full speed at 300 dpi even with all image
>> processing features enabled. http://p.sf.net/sfu/kodak-com
>> _______________________________________________
>> Matplotlib-users mailing list
>> Mat...@li...
>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>>
>
From: Elan P. <ep...@gm...> - 2009年05月07日 14:23:58
Hi,
By George, I think you've got it! That does explain the fact that old
lines remain since the restore_background is what should remove them.
To test out your hypotheses I added sleep commands after every line in
the update_line() function and indeed a blank axes never appears.
Looks like we have the culprit. Is this a bug or an undocumented
feature and is there anything I should do about it (i.e., report it)?
More importantly, do you have any idea how to fix the problem or how
the event interactions with wxpython work? Is it even feasible to do a
restore_canvas within the event loop or will this slow it down to the
extent of being useless?
Elan
---
I can no other answer make but thanks,
And thanks, and ever thanks.
- William Shakespeare
On Thu, May 7, 2009 at 9:17 AM, Michiel de Hoon <mjl...@ya...> wrote:
>
> I am not sure if this is related, but maybe it can give you a hint.
> I looked at the copy_from_bbox/restore/draw_artist code a long time ago, and if I remember correctly by calling restore_region function, you're drawing directly onto the canvas. In contrast, if you do e.g. plot(x,y), you're not drawing directly; you're just telling matplotlib what you want to plot, but the actual plotting is done by matplotlib by calling figure.draw(renderer). Typically, this happens from inside the event loop, which is how things are supposed to be. On the other hand, restore_region bypasses the event loop, which is usually not a good idea.
>
> --Michiel
>
>
>
>
> --- On Wed, 5/6/09, Elan Pavlov <ep...@gm...> wrote:
>
>> From: Elan Pavlov <ep...@gm...>
>> Subject: [Matplotlib-users] Wxpython, Matplotlib and draw_artist
>> To: mat...@li...
>> Date: Wednesday, May 6, 2009, 2:05 PM
>> Hi,
>> I can't get wxpython to play well with matplotlib and
>> draw_artist.
>> After mucking around quite a bit I think I narrowed it down
>> to the
>> draw_artist function The problem seems to be that
>> draw_artist when
>> working within wxpython (as opposed to a simple mpl window)
>> doesn't
>> remove the old points it plotted. I adapted the example
>> from the
>> cookbook
>> (http://www.scipy.org/Cookbook/Matplotlib/Animations) to
>> illustrate this problem. I modified the example so it is
>> updated on
>> mouse movements (followed by idle time) so that the problem
>> is more
>> visual.
>>
>> Replacing the copy_from_bbox/restore/draw_artist (i.e.
>> removing the
>> animated properties) with the simple draw causes this to
>> work. The
>> copy_from_bbox/restore methods work as expected so it seems
>> that the
>> problem is either the draw_artist (or possibly the blit,
>> but that
>> seems unlikely).
>>
>> Is there something I am doing wrong?
>>
>> Elan
>> --
>> Beware of bugs in the above code; I have only proved it
>> correct, not tried it.
>> - Donald Knuth
>> ------------------------------------------------------------------------------
>> The NEW KODAK i700 Series Scanners deliver under ANY
>> circumstances! Your
>> production scanning environment may not be a perfect world
>> - but thanks to
>> Kodak, there's a perfect scanner to get the job done!
>> With the NEW KODAK i700
>> Series Scanner you'll get full speed at 300 dpi even
>> with all image
>> processing features enabled.
>> http://p.sf.net/sfu/kodak-com_______________________________________________
>> Matplotlib-users mailing list
>> Mat...@li...
>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
From: Michiel de H. <mjl...@ya...> - 2009年05月07日 13:17:51
I am not sure if this is related, but maybe it can give you a hint.
I looked at the copy_from_bbox/restore/draw_artist code a long time ago, and if I remember correctly by calling restore_region function, you're drawing directly onto the canvas. In contrast, if you do e.g. plot(x,y), you're not drawing directly; you're just telling matplotlib what you want to plot, but the actual plotting is done by matplotlib by calling figure.draw(renderer). Typically, this happens from inside the event loop, which is how things are supposed to be. On the other hand, restore_region bypasses the event loop, which is usually not a good idea.
--Michiel
--- On Wed, 5/6/09, Elan Pavlov <ep...@gm...> wrote:
> From: Elan Pavlov <ep...@gm...>
> Subject: [Matplotlib-users] Wxpython, Matplotlib and draw_artist
> To: mat...@li...
> Date: Wednesday, May 6, 2009, 2:05 PM
> Hi,
> I can't get wxpython to play well with matplotlib and
> draw_artist.
> After mucking around quite a bit I think I narrowed it down
> to the
> draw_artist function The problem seems to be that
> draw_artist when
> working within wxpython (as opposed to a simple mpl window)
> doesn't
> remove the old points it plotted. I adapted the example
> from the
> cookbook
> (http://www.scipy.org/Cookbook/Matplotlib/Animations) to
> illustrate this problem. I modified the example so it is
> updated on
> mouse movements (followed by idle time) so that the problem
> is more
> visual.
> 
> Replacing the copy_from_bbox/restore/draw_artist (i.e.
> removing the
> animated properties) with the simple draw causes this to
> work. The
> copy_from_bbox/restore methods work as expected so it seems
> that the
> problem is either the draw_artist (or possibly the blit,
> but that
> seems unlikely).
> 
> Is there something I am doing wrong?
> 
> Elan
> -- 
> Beware of bugs in the above code; I have only proved it
> correct, not tried it.
> - Donald Knuth
> ------------------------------------------------------------------------------
> The NEW KODAK i700 Series Scanners deliver under ANY
> circumstances! Your
> production scanning environment may not be a perfect world
> - but thanks to
> Kodak, there's a perfect scanner to get the job done!
> With the NEW KODAK i700
> Series Scanner you'll get full speed at 300 dpi even
> with all image 
> processing features enabled.
> http://p.sf.net/sfu/kodak-com_______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
 
From: Jae-Joon L. <lee...@gm...> - 2009年05月07日 12:59:09
http://matplotlib.sourceforge.net/api/figure_api.html?highlight=colorbar#matplotlib.figure.Figure.colorbar
cbar = colorbar(ticks=lev, format = l_f)
-JJ
On Wed, May 6, 2009 at 3:28 PM, Sebastian Pająk <spc...@gm...> wrote:
> Hello
>
> I have a contour plot with specified number of levels (isolines):
>
> lev = array([2,3,5,7,10,13,17,21,26,32,42,62,80,100,120,140,180])
>
> to have a log "z" axis I put:
>
> from matplotlib import colors
> contourf(x1, y1, z1, lev, norm=colors.LogNorm(lev[0],lev[len(lev)-1]))
>
> now, to get colorbar in log scale:
>
> from matplotlib.ticker import LogLocator, LogFormatter
> l_f = LogFormatter(10, labelOnlyBase=False)
> cbar = colorbar(format = l_f)
>
> But the colorbar doesn't have all tick's labels specified in "lev"
> variable. Ticks are placed correctly on the cbar, but only every
> second tick has a text label (yes 2, 5, 10 ... etc). What should I do
> to have ALL levels on colorbar labeled?
>
> ------------------------------------------------------------------------------
> The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
> production scanning environment may not be a perfect world - but thanks to
> Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700
> Series Scanner you'll get full speed at 300 dpi even with all image
> processing features enabled. http://p.sf.net/sfu/kodak-com
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
From: Robert C. <cim...@nt...> - 2009年05月07日 11:07:19
Attachments: log2.py
Ryan May wrote:
> On Wed, May 6, 2009 at 8:53 AM, Robert Cimrman <cim...@nt...> wrote:
> 
>> Ryan May wrote:
>>
>>> On Wed, May 6, 2009 at 7:57 AM, Robert Cimrman <cim...@nt...>
>>> wrote:
>>>
>>>> Just for the record: Ryan May's example in this thread, that uses pipes,
>>>> inspired me to try pipes as well, instead of queues
>>>> (multiprocessing.Pipe instead of Queue) and the "hanging problem", i.e.
>>>> the problem that Ctrl-C interrupted the program, but it had to be killed
>>>> to stop, disappeared. I can fix the script that I sent in message [1]
>>>> and provide it, if there is interest. (Currently I have fixed only the
>>>> version that is within sfepy).
>>>>
>>>
>>> I know I'd be interested. With your permission, it might make a nice
>>> example as well.
>>>
>> Permission granted :) I have sent the script in response to William.
>>
>>
> Done. I like the fact that with your example, everything is self-contained
> in a single script.
Exactly, the details of starting another python process are hidden, the 
multiprocessing module is really nice.
You might want to add
import matplotlib
matplotlib.use('GtkAgg')
to the script, and remove "from Queue import Empty".
FYI: I am sending also a more complex example - a Log class used in 
sfepy, which supports multiple subplots, labels, logarithmic plots etc. 
The file contains some other support classes too, so that it works 
standalone. It is not very polished, but it serves its purpose.
r.
John Seales <pra...@ho...> writes:
>> > I'm using python 2.5.2 on a macbook, intel microprocessor, mac os 10.4.11
> I installed matplotlib from the dmg file. I clicked on the icon to install it.
I assume you mean the mpkg file - I don't see any dmg file on the
download page. It seems to me that something is wrong with that file,
since release/osx/Makefile compiles its own Freetype and attempts to
link to it statically, but the file ft2font.so distributed within the
mpkg installer links dynamically to /usr/X11R6/lib/libfreetype.6.dylib.
AFAIK, the static linking is done precisely to avoid version mismatches
between different versions of freetype, zlib, and png on various
versions of OS X. Several *.so files within the mpkg link to
/usr/X11R6/lib/libfreetype.6.dylib and /usr/lib/libz.1.dylib (though,
curiously, none link to the system libpng).
I suppose this is exactly the kind of problem that results from dynamic
linking to a wrong version of freetype:
>> > ImportError: dlopen(/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib/ft2font.so, 2): Library not loaded: /usr/X11R6/lib/libfreetype.6.dylib
>> > Referenced from: /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib/ft2font.so
>> > Reason: image not found
-- 
Jouni K. Seppänen
http://www.iki.fi/jks
From: Gert-Jan <gj_...@ho...> - 2009年05月07日 09:02:41
Hey all,
I was just hoping anyone could help me further here... it would be highly
appreciated.
Thanks in advance,
Gert-Jan
Olivier Benoist wrote:
> 
> Hi,
> I'm new with matplotlib.
> 
> I need to make a graph with the X axis represents time in hours and
> minutes. My script don't works, I want to display all the values of time
> that I have.
> I use a list of string like this :
> t=['0015', '0030', '0045', '0100', '0115', '0130', '0145', '0200',
> '0215', '0230', '0245', '0300', '03
> 15', '0330', '0345', '0400', '0415', '0430', '0445', '0500', '0515',
> '0530', '0545', '0600', '0615',
> '0630', '0645', '0700', '0715', '0730', '0745', '0800', '0815', '0830',
> '0845', '0900', '0915', '09
> 30', '0945', '1000', '1015', '1030', '1045', '1100', '1115', '1130',
> '1145', '1200', '1215', '1230',
> '1245', '1300', '1315', '1330', '1345', '1400', '1415']
> 
> ax.plot(t, y)
> 
> I tried to convert hours and minutes to the base 100 ( , it works but I
> can not show on the x-axis the hours, minutes.
> I tried to use plot_date, but I don't understand "x and/or y can be a
> sequence of dates represented as float days since 0001年01月01日 UTC."
> 
> Could you help me, please ?
> 
> /olivier
> 
> ------------------------------------------------------------------------------
> Register Now & Save for Velocity, the Web Performance & Operations 
> Conference from O'Reilly Media. Velocity features a full day of 
> expert-led, hands-on workshops and two days of sessions from industry 
> leaders in dedicated Performance & Operations tracks. Use code vel09scf 
> and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
> 
> 
I believe this needs its own thread. =)
-- 
View this message in context: http://www.nabble.com/Manually-enable-export-as-EMF-tp23293186p23422798.html
Sent from the matplotlib - users mailing list archive at Nabble.com.
From: Joshua L. <dis...@gm...> - 2009年05月07日 04:19:52
John,
I've seen this problem happen before with someone else; the person's
X11 installation for some reason included the file
libfreetype.6.3.dylib but not librfreetype.6.3.dylib. Did you install
X11 before or after installing the Xcode development tools? Also, if
you had to install X11 yourself, I'm assuming you're using OS X Tiger
(or at least not 10.5.x)? I'd recommend trying a reinstall of X11 (if
you're not using Leopard) and then Xcode in your situation, but a
quicker workaround is to install freetype yourself (thus putting a
copy in /usr/local) and build matplotlib from source rather than use
the installer package.
Josh
On Wed, May 6, 2009 at 5:44 PM, John Seales <pra...@ho...> wrote:
> I do have X11. It looks like there's a problem with the libfreetype, but I
> don't understand what the problem is.
>
> john-seales-computer:/ johnseales$ file /usr/X11R6/lib/libfreetype.6.dylib
> /usr/X11R6/lib/libfreetype.6.dylib: cannot open
> (/usr/X11R6/lib/libfreetype.6.dylib)
>
> john-seales-computer:/ johnseales$ file /usr/X11R6/lib/libfreetype.6.3.dylib
> /usr/X11R6/lib/libfreetype.6.3.dylib: Mach-O universal binary with 2
> architectures
> /usr/X11R6/lib/libfreetype.6.3.dylib (for architecture ppc):Mach-O
> dynamically linked shared library ppc
> /usr/X11R6/lib/libfreetype.6.3.dylib (for architecture i386):    Mach-O
> dynamically linked shared library i386
>
>> Date: Wed, 6 May 2009 16:55:23 -0700
>> From: Chr...@no...
>> To: mat...@li...
>> Subject: Re: [Matplotlib-users] O pylab why do you refuse to import?
>>
>> note: make sure to include the list, it doesn't look like you did.
>>
>> John Seales wrote:
>> > Here's what it says:
>> >
>> > $ file ft2font.so
>> > ft2font.so: Mach-O universal binary with 2 architectures
>> > ft2font.so (for architecture i386): Mach-O bundle i386
>> > ft2font.so (for architecture ppc): Mach-O bundle ppc
>>
>> that's right, but now I see that that wasn't the issue anyway:
>>
>> > > > ImportError:
>> >
>> > dlopen(/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib/ft2font.so,
>> > 2): Library not loaded: /usr/X11R6/lib/libfreetype.6.dylib
>> > > > Referenced from:
>> >
>> > /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib/ft2font.so
>>
>> ft2font is relying on libfreetype. I think that's the one that Apple
>> delivers with their X11 (I know I have it, anyway), but I think X11 is
>> an optional install, so you may not have it.
>>
>> Is that file there? ON my system:
>>
>> $ file /usr/X11R6/lib/libfreetype.6.dylib
>> /usr/X11R6/lib/libfreetype.6.dylib: symbolic link to
>> `libfreetype.6.3.dylib'
>>
>> and
>>
>> $ file /usr/X11R6/lib/libfreetype.6.3.dylib
>> /usr/X11R6/lib/libfreetype.6.3.dylib: Mach-O dynamically linked shared
>> library ppc
>>
>> so I have it, and it's a ppc lib, which makes sense, as I'm running on a
>> ppc machine.
>>
>>
>> If you don't have it, probably the easiest thing to do is install
>> Apple's X11 -- otherwise, perhaps MPL should be built against a static
>> libfreetype.
>>
>> -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...
>>
>>
>> ------------------------------------------------------------------------------
>> The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
>> production scanning environment may not be a perfect world - but thanks to
>> Kodak, there's a perfect scanner to get the job done! With the NEW KODAK
>> i700
>> Series Scanner you'll get full speed at 300 dpi even with all image
>> processing features enabled. http://p.sf.net/sfu/kodak-com
>> _______________________________________________
>> Matplotlib-users mailing list
>> Mat...@li...
>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
> ________________________________
> Hotmail® goes with you. Get it on your BlackBerry or iPhone.
> ------------------------------------------------------------------------------
> The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
> production scanning environment may not be a perfect world - but thanks to
> Kodak, there's a perfect scanner to get the job done! With the NEW KODAK
> i700
> Series Scanner you'll get full speed at 300 dpi even with all image
> processing features enabled. http://p.sf.net/sfu/kodak-com
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
>
From: Jae-Joon L. <lee...@gm...> - 2009年05月07日 02:45:29
Try to put plt.draw() before plt.show().
My guess is that what show() does is to create figure windows, and in
most cases it does not redraw the figure (Tk backend is always an
exception). So, this may not be a bug.
But I hope some who knows well about the backends clarify this.
Regards,
-JJ
On Wed, May 6, 2009 at 8:14 PM, Christopher Barker
<Chr...@no...> wrote:
> Gökhan SEVER wrote:
>> I am playing with some other commands to achieve updating on the same
>> figure, no luck yet.
>>
>> I guess that is what you actually been trying to see? Update the
>> figure content without opening another one?
>
> right.
>
> Christopher Barker wrote:
>
>> oops, no it doesn't -- what that does is give me a new figure each time,
>> so I get a big stack of them. So I tried:
>>
>> fig = plt.figure(1)
>> fig.clear()
>>
>> then I didn't get a new figure, but I didn't get the figure updated,
>> either -- could this be a back-end bug? I'm using wxAgg, and IIRC, the
>> refreshing code is pretty messed up..
>>
>> Off to try TK
>
> OK, with TK, it does refresh when I expect it to. So now to write a new
> thread, on a wxAgg refresh bug.
>
> -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...
>
>
> ------------------------------------------------------------------------------
> The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
> production scanning environment may not be a perfect world - but thanks to
> Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700
> Series Scanner you'll get full speed at 300 dpi even with all image
> processing features enabled. http://p.sf.net/sfu/kodak-com
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
22 messages has been excluded from this view by a project administrator.

Showing results of 523

<< < 1 .. 15 16 17 18 19 .. 21 > >> (Page 17 of 21)
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 によって変換されたページ (->オリジナル) /