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

Showing 25 results of 25

From: Dong, H. <don...@gm...> - 2009年07月30日 22:33:24
I also use matplotlib-0.98.5.3.win32-py2.6.exe. It was built without
gtk. You have to build your own binaries with gtk support. Or find
compiled package (by Christoph Gohlke) with gtk support here:
http://www.lfd.uci.edu/~gohlke/#pythonlibs
and original information is here:
http://www.nabble.com/matplotlib-0.98.5.3.win32-py2.6.exe-td24299490.html
Personally I suggest use TkAgg. It dosen't matter if the figure window
is smaller than the canvas. If you don't resize the window (i.e. you
have checked the figure is ok and replotted the figure), it is ok to
just save it by clicking save icon in the toolbar.
On Thu, Jul 30, 2009 at 8:34 PM, Sebastian Pająk<spc...@gm...> wrote:
> Hello
> I don't know why, but after switching from python2.5 to python2.6 I
> cannot even launch matplotlib (matplotlib-0.98.5.3.win32-py2.6.exe).
> This is what I get:
>
> Traceback (most recent call last):
> File "<stdin>", line 1, in <module>
> File "D:\msys\opt\python\lib\site-packages\pylab.py", line 1, in <module>
>  from matplotlib.pylab import *
> File "D:\msys\opt\python\lib\site-packages\matplotlib\pylab.py",
> line 253, in <module>
>  from matplotlib.pyplot import *
> File "D:\msys\opt\python\lib\site-packages\matplotlib\pyplot.py",
> line 75, in <module>
>  new_figure_manager, draw_if_interactive, show = pylab_setup()
> File "D:\msys\opt\python\lib\site-packages\matplotlib\backends\__init__.py",
> line 25, in pylab_setup
>  globals(),locals(),[backend_name])
> File "D:\msys\opt\python\lib\site-packages\matplotlib\backends\backend_gtkagg.py",
> line 10, in <module>
>  from matplotlib.backends.backend_gtk import gtk, FigureManagerGTK,
> FigureCanvasGTK,\
> File "D:\msys\opt\python\lib\site-packages\matplotlib\backends\backend_gtk.py",
> line 25, in <module>
>  from matplotlib.backends.backend_gdk import RendererGDK, FigureCanvasGDK
> File "D:\msys\opt\python\lib\site-packages\matplotlib\backends\backend_gdk.py",
> line 29, in <module>
>  from matplotlib.backends._backend_gdk import pixbuf_get_pixels_array
> ImportError: No module named _backend_gdk
>
>
> I have PyGTK installed. What can be the problem?
> win xp sp3
>
> ------------------------------------------------------------------------------
> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
> trial. Simplify your report design, integration and deployment - and focus on
> what you do best, core application coding. Discover what's new with
> Crystal Reports now. http://p.sf.net/sfu/bobj-july
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
From: Gewton J. <gj...@gm...> - 2009年07月30日 21:17:37
Anyone?
On Tue, Jul 28, 2009 at 3:23 PM, Gewton Jhames <gj...@gm...> wrote:
> Guys, there is the code.
> On Tue, Jul 28, 2009 at 3:13 PM, Gewton Jhames <gj...@gm...> wrote:
>
>> Jae-Joon Lee, savefig("file.png", bbox_inches="tight") doesn't work too.
>>
>> On Mon, Jul 27, 2009 at 7:00 PM, Jae-Joon Lee <lee...@gm...>wrote:
>>
>>> On Mon, Jul 27, 2009 at 4:06 PM, Gewton Jhames<gj...@gm...> wrote:
>>> > How to "trim the canvas" of the image generated? It's transparent, but
>>> still
>>> > have a "padding", if it would be cropped, I can safe almost 200px!. I
>>> have
>>> > attached a file to this email to show it, the background of the graph
>>> was
>>> > set to red only to you see the padding.
>>>
>>> As John suggested, you can adjust the subplot params. This adjusts the
>>> area occupied by the axes, while the figure size (canvas size) is
>>> fixed.
>>>
>>> The subplot params can be automatically adjusted.
>>>
>>>
>>> http://matplotlib.sourceforge.net/faq/howto_faq.html?highlight=automatic%20adjust#automatically-make-room-for-tick-labels
>>>
>>>
>>> On the other hand, there is some crude support for trimming, i.e.,
>>> reducing the figure size while the axes area fixed.
>>>
>>> savefig("file.png", bbox_inches="tight")
>>>
>>> Note that the figure size of the saved output is only affected. This
>>> does not change the figure displayed on the screen.
>>>
>>> Regards,
>>>
>>> -JJ
>>>
>>
>>
>
From: Bas v. L. <le...@gm...> - 2009年07月30日 20:08:35
Hi JJ,
Thank you for your kind and speedy reply, I completely glanced over
the extent parameter.
Datacoords are actually what I need so this is perfect for me.
To clarify what I want, I want to mark certain parts of a graph with
an icon representing the reason it's interesting. Icons are for peaks,
trends, correlation, etc.
Thank you very much!
Bas
2009年7月30日 Jae-Joon Lee <lee...@gm...>:
> The location of the image can be set by specifying the "extent"
> keyword, however, this is set in data coordinate.
> figimage may be close to what you want.
>
> http://matplotlib.sourceforge.net/api/pyplot_api.html#matplotlib.pyplot.figimage
>
> As far as I know, there is no direct support in matplotlib to place an
> image with arbitrary transformation. But it may not be difficult to
> implement. However, "annotate a plot with icons" is not enough to
> figure out what you really want.
> Maybe some screenshots from other plotting tool will be helpful. Or,
> please elaborate how you want to position your image.
>
> -JJ
>
>
> On Thu, Jul 30, 2009 at 12:11 PM, Bas van Leeuwen<le...@gm...> wrote:
>> Hi all,
>>
>> Is there any way to annotate a plot with icons?
>> The only way to include an image that I've found is using imshow, but
>> imshow does not accept (x,y) coordinates.
>>
>> There probably is an easy solution, but I have not been able to find
>> any. Please be patient :-)
>>
>> Thank you in advance for your reply,
>> Bas van Leeuwen
>>
>> PS, I'm sorry if this mail arrives multiple times, I didn't see the
>> previous one in the archive.
>>
>> ------------------------------------------------------------------------------
>> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
>> trial. Simplify your report design, integration and deployment - and focus on
>> what you do best, core application coding. Discover what's new with
>> Crystal Reports now. http://p.sf.net/sfu/bobj-july
>> _______________________________________________
>> Matplotlib-users mailing list
>> Mat...@li...
>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>>
>
From: Eric F. <ef...@ha...> - 2009年07月30日 19:41:57
Jae-Joon Lee wrote:
> I don't think there is any user-visible support for registering a
> custom colormap.
Now there is: svn r7309. Its use is illustrated via a modification of 
examples/pylab_examples/custom_cmap.py.
With just a little more work, we could make it so that anything taking a 
"cmap" kwarg will accept either a Colormap instance or the name of a 
registered instance (including builtins). Maybe I will do that later today.
Eric
> However, it seems to me that adding the colormap to
> matplotlib.cm.datad distionary is enough.
> Note that the value need to be a dictionary of RGB specification, not
> the actual colormap instance.
> 
> for example,
> 
> mycolormap = {'blue': ((0.0, 0.40000000000000002, 0.40000000000000002),
> (1.0, 0.40000000000000002, 0.40000000000000002)),
> 'green': ((0.0, 0.5, 0.5), (1.0, 1.0, 1.0)),
> 'red': ((0.0, 0.0, 0.0), (1.0, 1.0, 1.0))}
> 
> matplotlib.cm.datad["mycolormap"] = mycolormap
> rcParams["image.cmap"]="mycolormap"
> 
> Having a function (like jet in pylab) would not be also difficult.
> Take a look at the definition of "jet" function (for example) in the
> pylab.py.
> 
> We may be better to have a proper way to register a custom colormap.
> I'll try to take a more look later, but any patch will be appreciated.
> 
> Regards,
> 
> -JJ
> 
> 
> 
> On Thu, Jul 30, 2009 at 3:48 AM, Philipp
> Lies<phi...@go...> wrote:
>> Does no one have an idea? If not, this is a severe usability bug!
>>
>> Philipp Lies wrote:
>>> Hi,
>>>
>>> I just created a hsv-like color map with gray levels only, now I'd like to
>>> use this as default color map. But how? Calling it like hsv() does not
>>> work and I did not find a hint in the documentation how to set a user
>>> defined color map interactively as default color map.
>>>
>>> Cheers
>>>
>>> Philipp
>>>
>> --
>> View this message in context: http://www.nabble.com/setting-user-defined-color-map-as-default-tp24587528p24733739.html
>> Sent from the matplotlib - users mailing list archive at Nabble.com.
>>
>>
>> ------------------------------------------------------------------------------
>> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
>> trial. Simplify your report design, integration and deployment - and focus on
>> what you do best, core application coding. Discover what's new with
>> Crystal Reports now. http://p.sf.net/sfu/bobj-july
>> _______________________________________________
>> Matplotlib-users mailing list
>> Mat...@li...
>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>>
> 
> ------------------------------------------------------------------------------
> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
> trial. Simplify your report design, integration and deployment - and focus on 
> what you do best, core application coding. Discover what's new with 
> Crystal Reports now. http://p.sf.net/sfu/bobj-july
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
From: Sebastian P. <spc...@gm...> - 2009年07月30日 18:35:00
Hello
I don't know why, but after switching from python2.5 to python2.6 I
cannot even launch matplotlib (matplotlib-0.98.5.3.win32-py2.6.exe).
This is what I get:
Traceback (most recent call last):
 File "<stdin>", line 1, in <module>
 File "D:\msys\opt\python\lib\site-packages\pylab.py", line 1, in <module>
 from matplotlib.pylab import *
 File "D:\msys\opt\python\lib\site-packages\matplotlib\pylab.py",
line 253, in <module>
 from matplotlib.pyplot import *
 File "D:\msys\opt\python\lib\site-packages\matplotlib\pyplot.py",
line 75, in <module>
 new_figure_manager, draw_if_interactive, show = pylab_setup()
 File "D:\msys\opt\python\lib\site-packages\matplotlib\backends\__init__.py",
line 25, in pylab_setup
 globals(),locals(),[backend_name])
 File "D:\msys\opt\python\lib\site-packages\matplotlib\backends\backend_gtkagg.py",
line 10, in <module>
 from matplotlib.backends.backend_gtk import gtk, FigureManagerGTK,
FigureCanvasGTK,\
 File "D:\msys\opt\python\lib\site-packages\matplotlib\backends\backend_gtk.py",
line 25, in <module>
 from matplotlib.backends.backend_gdk import RendererGDK, FigureCanvasGDK
 File "D:\msys\opt\python\lib\site-packages\matplotlib\backends\backend_gdk.py",
line 29, in <module>
 from matplotlib.backends._backend_gdk import pixbuf_get_pixels_array
ImportError: No module named _backend_gdk
I have PyGTK installed. What can be the problem?
win xp sp3
From: Eric F. <ef...@ha...> - 2009年07月30日 17:59:54
Jae-Joon Lee wrote:
> I don't think there is any user-visible support for registering a
> custom colormap.
I have it almost done; I will commit it shortly.
Eric
> However, it seems to me that adding the colormap to
> matplotlib.cm.datad distionary is enough.
> Note that the value need to be a dictionary of RGB specification, not
> the actual colormap instance.
(I will have a more general solution than this.)
> 
> for example,
> 
> mycolormap = {'blue': ((0.0, 0.40000000000000002, 0.40000000000000002),
> (1.0, 0.40000000000000002, 0.40000000000000002)),
> 'green': ((0.0, 0.5, 0.5), (1.0, 1.0, 1.0)),
> 'red': ((0.0, 0.0, 0.0), (1.0, 1.0, 1.0))}
> 
> matplotlib.cm.datad["mycolormap"] = mycolormap
> rcParams["image.cmap"]="mycolormap"
> 
> Having a function (like jet in pylab) would not be also difficult.
> Take a look at the definition of "jet" function (for example) in the
> pylab.py.
> 
> We may be better to have a proper way to register a custom colormap.
> I'll try to take a more look later, but any patch will be appreciated.
> 
> Regards,
> 
> -JJ
> 
> 
> 
> On Thu, Jul 30, 2009 at 3:48 AM, Philipp
> Lies<phi...@go...> wrote:
>> Does no one have an idea? If not, this is a severe usability bug!
>>
>> Philipp Lies wrote:
>>> Hi,
>>>
>>> I just created a hsv-like color map with gray levels only, now I'd like to
>>> use this as default color map. But how? Calling it like hsv() does not
>>> work and I did not find a hint in the documentation how to set a user
>>> defined color map interactively as default color map.
>>>
>>> Cheers
>>>
>>> Philipp
>>>
>> --
>> View this message in context: http://www.nabble.com/setting-user-defined-color-map-as-default-tp24587528p24733739.html
>> Sent from the matplotlib - users mailing list archive at Nabble.com.
>>
>>
>> ------------------------------------------------------------------------------
>> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
>> trial. Simplify your report design, integration and deployment - and focus on
>> what you do best, core application coding. Discover what's new with
>> Crystal Reports now. http://p.sf.net/sfu/bobj-july
>> _______________________________________________
>> Matplotlib-users mailing list
>> Mat...@li...
>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>>
> 
> ------------------------------------------------------------------------------
> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
> trial. Simplify your report design, integration and deployment - and focus on 
> what you do best, core application coding. Discover what's new with 
> Crystal Reports now. http://p.sf.net/sfu/bobj-july
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
From: Jae-Joon L. <lee...@gm...> - 2009年07月30日 17:37:44
I don't think there is any user-visible support for registering a
custom colormap.
However, it seems to me that adding the colormap to
matplotlib.cm.datad distionary is enough.
Note that the value need to be a dictionary of RGB specification, not
the actual colormap instance.
for example,
mycolormap = {'blue': ((0.0, 0.40000000000000002, 0.40000000000000002),
 (1.0, 0.40000000000000002, 0.40000000000000002)),
 'green': ((0.0, 0.5, 0.5), (1.0, 1.0, 1.0)),
 'red': ((0.0, 0.0, 0.0), (1.0, 1.0, 1.0))}
matplotlib.cm.datad["mycolormap"] = mycolormap
rcParams["image.cmap"]="mycolormap"
Having a function (like jet in pylab) would not be also difficult.
Take a look at the definition of "jet" function (for example) in the
pylab.py.
We may be better to have a proper way to register a custom colormap.
I'll try to take a more look later, but any patch will be appreciated.
Regards,
-JJ
On Thu, Jul 30, 2009 at 3:48 AM, Philipp
Lies<phi...@go...> wrote:
>
> Does no one have an idea? If not, this is a severe usability bug!
>
> Philipp Lies wrote:
>>
>> Hi,
>>
>> I just created a hsv-like color map with gray levels only, now I'd like to
>> use this as default color map. But how? Calling it like hsv() does not
>> work and I did not find a hint in the documentation how to set a user
>> defined color map interactively as default color map.
>>
>> Cheers
>>
>> Philipp
>>
>
> --
> View this message in context: http://www.nabble.com/setting-user-defined-color-map-as-default-tp24587528p24733739.html
> Sent from the matplotlib - users mailing list archive at Nabble.com.
>
>
> ------------------------------------------------------------------------------
> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
> trial. Simplify your report design, integration and deployment - and focus on
> what you do best, core application coding. Discover what's new with
> Crystal Reports now. http://p.sf.net/sfu/bobj-july
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
From: Jae-Joon L. <lee...@gm...> - 2009年07月30日 16:49:37
The location of the image can be set by specifying the "extent"
keyword, however, this is set in data coordinate.
figimage may be close to what you want.
http://matplotlib.sourceforge.net/api/pyplot_api.html#matplotlib.pyplot.figimage
As far as I know, there is no direct support in matplotlib to place an
image with arbitrary transformation. But it may not be difficult to
implement. However, "annotate a plot with icons" is not enough to
figure out what you really want.
Maybe some screenshots from other plotting tool will be helpful. Or,
please elaborate how you want to position your image.
-JJ
On Thu, Jul 30, 2009 at 12:11 PM, Bas van Leeuwen<le...@gm...> wrote:
> Hi all,
>
> Is there any way to annotate a plot with icons?
> The only way to include an image that I've found is using imshow, but
> imshow does not accept (x,y) coordinates.
>
> There probably is an easy solution, but I have not been able to find
> any. Please be patient :-)
>
> Thank you in advance for your reply,
> Bas van Leeuwen
>
> PS, I'm sorry if this mail arrives multiple times, I didn't see the
> previous one in the archive.
>
> ------------------------------------------------------------------------------
> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
> trial. Simplify your report design, integration and deployment - and focus on
> what you do best, core application coding. Discover what's new with
> Crystal Reports now. http://p.sf.net/sfu/bobj-july
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
From: Bas v. L. <le...@gm...> - 2009年07月30日 16:11:51
Hi all,
Is there any way to annotate a plot with icons?
The only way to include an image that I've found is using imshow, but
imshow does not accept (x,y) coordinates.
There probably is an easy solution, but I have not been able to find
any. Please be patient :-)
Thank you in advance for your reply,
Bas van Leeuwen
PS, I'm sorry if this mail arrives multiple times, I didn't see the
previous one in the archive.
From: Michael D. <md...@st...> - 2009年07月30日 14:11:08
axes_grid is only available in the SVN version. It has not been 
released yet, so therefore is not part of packages like Python(X, Y).
Mike
Sahar wrote:
> Hi all,
> 
> I try to run an example with the line: /from mpl_toolkits.axes_grid 
> import Divider/
> and I get the massage: /No module named axes_grid/
> It is possible to import mpl_toolkits but this module and others are 
> missing.
> 
> I work with Python(X,Y) so maybe it is some versions\installation 
> problem...
> 
> Thanks,
> Sahar
>
>
> *******************************************************************************************************
> This e-mail message may contain confidential,and privileged 
> information or data that constitute proprietary information of CMT 
> Medical Ltd. Any review or distribution by others is strictly 
> prohibited. If you are not the intended recipient you are hereby 
> notified that any use of this information or data by any other person 
> is absolutely prohibited. If you are not the intended recipient, 
> please delete all copies. Thank You. http://www.cmt.co.il
> ********************************************************************************************************
>
>
>
>
> ************************************************************************************
> This footnote confirms that this email message has been scanned by
> PineApp Mail-SeCure for the presence of malicious code, vandals & 
> computer viruses.
> ************************************************************************************
>
> ------------------------------------------------------------------------
>
> ------------------------------------------------------------------------------
> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
> trial. Simplify your report design, integration and deployment - and focus on 
> what you do best, core application coding. Discover what's new with 
> Crystal Reports now. http://p.sf.net/sfu/bobj-july
> ------------------------------------------------------------------------
>
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
> 
-- 
Michael Droettboom
Science Software Branch
Operations and Engineering Division
Space Telescope Science Institute
Operated by AURA for NASA
From: Sahar <sa...@cm...> - 2009年07月30日 14:08:27
Hi all,
I try to run an example with the line: from mpl_toolkits.axes_grid import
Divider
and I get the massage: No module named axes_grid
It is possible to import mpl_toolkits but this module and others are
missing.
I work with Python(X,Y) so maybe it is some versions\installation problem...
Thanks,
 Sahar
*******************************************************************************************************
This e-mail message may contain confidential,and privileged information or data that constitute proprietary information of CMT Medical Ltd. Any review or distribution by others is strictly prohibited. If you are not the intended recipient you are hereby notified that any use of this information or data by any other person is absolutely prohibited. If you are not the intended recipient, please delete all copies. Thank You. http://www.cmt.co.il
********************************************************************************************************
 
 
************************************************************************************
This footnote confirms that this email message has been scanned by
PineApp Mail-SeCure for the presence of malicious code, vandals & computer viruses.
************************************************************************************
From: Bas v. L. <le...@gm...> - 2009年07月30日 13:46:01
Hi all,
Is there any way to annotate a plot with icons?
The only way to include an image that I've found is using imshow, but
imshow does not accept (x,y) coordinates.
There probably is an easy solution, but I have not been able to find
any. Please be patient :-)
Thank you in advance for your reply,
Bas van Leeuwen
From: Bas v. L. <le...@gm...> - 2009年07月30日 09:33:31
Hi all,
Is there any way to annotate a plot with icons?
The only way to include an image that I've found is using imshow, but
imshow does not accept (x,y) coordinates.
There probably is an easy solution, but I have not been able to find
any. Please be patient :-)
Thank you in advance for your reply,
Bas van Leeuwen
From: Philipp L. <phi...@go...> - 2009年07月30日 07:48:23
Does no one have an idea? If not, this is a severe usability bug!
Philipp Lies wrote:
> 
> Hi,
> 
> I just created a hsv-like color map with gray levels only, now I'd like to
> use this as default color map. But how? Calling it like hsv() does not
> work and I did not find a hint in the documentation how to set a user
> defined color map interactively as default color map.
> 
> Cheers
> 
> Philipp
> 
-- 
View this message in context: http://www.nabble.com/setting-user-defined-color-map-as-default-tp24587528p24733739.html
Sent from the matplotlib - users mailing list archive at Nabble.com.
From: Uri L. <las...@mi...> - 2009年07月30日 05:35:19
The first suggestion failed with the same error, while the same suggestion
worked up through the last step (make installers) which fails with the same
error.
I decided to try Tommy's suggestion of just figuring out how to compile
libpng as a universal binary. The way I did it was to run the configuration
script as:
./configure --disable-dependency-tracking
and then to manually edit the Makefile. To CPPFLAGS and LDFLAGS I added
-arch i386 -arch ppc
Running make and sudo make install successfully built a universal library
for me.
After deleting my old MPL egg, I import matplotlib successfully and the
version number is as expected (0.98.6svn).
However, when I try to import pyplot, I get the following exception
traceback. Any suggestions on how to fix this?
Thanks again!
In [4]: import matplotlib.pyplot as plt
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
/usr/local/lib/<ipython console> in <module>()
/Library/Frameworks/Python.framework/Versions/4.0.30002/lib/python2.5/site-packages/matplotlib/pyplot.py
in <module>()
 4 from matplotlib import _pylab_helpers, interactive
 5 from matplotlib.cbook import dedent, silent_list, is_string_like,
is_numlike
----> 6 from matplotlib.figure import Figure, figaspect
 7 from matplotlib.backend_bases import FigureCanvasBase
 8 from matplotlib.image import imread as _imread
/Library/Frameworks/Python.framework/Versions/4.0.30002/lib/python2.5/site-packages/matplotlib/figure.py
in <module>()
 17 import artist
 18 from artist import Artist, allow_rasterization
---> 19 from axes import Axes, SubplotBase, subplot_class_factory
 20 from cbook import flatten, allequal, Stack, iterable, dedent
 21 import _image
/Library/Frameworks/Python.framework/Versions/4.0.30002/lib/python2.5/site-packages/matplotlib/axes.py
in <module>()
 17 import matplotlib.dates as mdates
 18 import matplotlib.font_manager as font_manager
---> 19 import matplotlib.image as mimage
 20 import matplotlib.legend as mlegend
 21 import matplotlib.lines as mlines
/Library/Frameworks/Python.framework/Versions/4.0.30002/lib/python2.5/site-packages/matplotlib/image.py
in <module>()
 19 # For clarity, names from _image are given explicitly in this
module:
 20 import matplotlib._image as _image
---> 21 import matplotlib._png as _png
 22
 23 # For user convenience, the names from _image are also imported into
ImportError:
dlopen(/Library/Frameworks/Python.framework/Versions/4.0.30002/lib/python2.5/site-packages/matplotlib/_png.so,
2): Symbol not found: _png_create_info_struct
 Referenced from:
/Library/Frameworks/Python.framework/Versions/4.0.30002/lib/python2.5/site-packages/matplotlib/_png.so
 Expected in: /usr/local/lib/libpng12.0.dylib
On Wed, Jul 29, 2009 at 21:46, John Hunter <jd...@gm...> wrote:
> On Wed, Jul 29, 2009 at 4:34 PM, Uri Laserson<las...@mi...> wrote:
> > Hi everyone,
> >
> > I am trying to build the latest svn trunk version of MPL on OS X 10.5. I
> am
> > getting the following error:
>
> Try
>
> make build_osx105
> python setup.py install --prefix=~/somewhere
>
> If that doesn't work, try
>
> cd release/osx
>
> read the readme there and follow the instructions. This will build
> mpl the way we do when making a release: fetch the dependencies (zlip,
> png and freetype) and build them with the right flags, and then build
> mpl explcitly linking to these libs.
>
> JDH
>
-- 
Uri Laserson
PhD Candidate, Biomedical Engineering
Harvard Medical School (Genetics)
Massachusetts Institute of Technology (Mathematics)
phone +1 917 742 8019
las...@mi...
From: Art <gre...@gm...> - 2009年07月30日 04:58:06
On Wed, Jul 29, 2009 at 6:09 PM, John Hunter <jd...@gm...> wrote:
> On Wed, Jul 29, 2009 at 6:50 PM, Art<gre...@gm...> wrote:
>
> > My bottleneck now is actually saving the pngs for mencoder to make into
> an
> > avi (as with the movie_demo example on your site) using savefig. Do you
> also
> > know of an alternative way of generating an avi of the animation? My
> > animation has about 9000 frames.
>
> No, I can't imagine there is much fat to trim in that part of the
> code. We're using libpng to write the png, so no speedups there
> unless you can make the pngs smaller. It looks like we are using a
> memory pointer to get the rgba data from agg over to png, so no
> speedups there either. Perhaps Michael has some input. Some code
> that we could run and test might help produce some further
> optimizations.
>
> JDH
>
Below is some sample code that creates the directory ~/tmp/blit_test,
outputs 50 pngs, and creates a mov.avi using /usr/local/bin/mencoder.
Apologies in advance for the code:
import os
import numpy as np
import matplotlib.pyplot as plt
import subprocess
movdir = os.path.join(os.path.expanduser('~'), 'tmp', 'blit_test')
try: os.mkdirs(movdir)
except: pass
mencoder = '/usr/local/bin/mencoder'
ax = []
im = []
vl = []
fig = plt.figure()
ax.append(fig.add_subplot(2,2,1))
im.append(ax[-1].imshow(np.random.randn(100,100)))
ax[-1].set_xticks([])
ax[-1].set_yticks([])
ax.append(fig.add_subplot(2,2,2))
im.append(ax[-1].imshow(np.random.randn(32,32)))
ax[-1].set_xticks([])
ax[-1].set_yticks([])
ax.append(fig.add_subplot(2, 1, 2))
r = np.abs(np.random.normal(0,0.1,1000))
for i in range(100):
 ras = np.nonzero(np.random.poisson(r))[0]
 ax[-1].scatter(ras, np.ones(len(ras)) * (i+1), s=1, alpha=0.5)
vl.append(ax[-1].axvline(-1, color='r', alpha=0.9, linewidth=2.))
ax[-1].set_xlim([0,1000])
ax[-1].set_ylim([0,100])
plt.draw()
canvas = fig.canvas
background = canvas.copy_from_bbox(fig.bbox)
for i in range(50):
 canvas.restore_region(background)
 im[0].set_data(np.random.randn(100,100))
 ax[0].draw_artist(im[0])
 im[1].set_data(np.random.randn(32,32))
 ax[1].draw_artist(im[1])
 vl[0].set_xdata([i,i])
 ax[2].draw_artist(vl[0])
 canvas.blit()
 plt.savefig(os.path.join(movdir, '%03d' % (i+1)))
fps = 10
command = (mencoder,
 'mf://%s/*.png' % (movdir),
 #'-vf', 'scale=800:-10',
 '-mf', 'fps=%d' % fps,
 '-ovc', 'lavc',
 '-lavcopts', 'vcodec=mpeg4',
 '-o', os.path.join(movdir, 'mov.avi'))
subprocess.check_call(command)
# output in ~/tmp/blit_test/mov.avi
From: Eric F. <ef...@ha...> - 2009年07月30日 04:05:14
John Hunter wrote:
> On Wed, Jul 29, 2009 at 6:50 PM, Art<gre...@gm...> wrote:
> 
>> My bottleneck now is actually saving the pngs for mencoder to make into an
>> avi (as with the movie_demo example on your site) using savefig. Do you also
>> know of an alternative way of generating an avi of the animation? My
>> animation has about 9000 frames.
> 
> No, I can't imagine there is much fat to trim in that part of the
> code. We're using libpng to write the png, so no speedups there
> unless you can make the pngs smaller. It looks like we are using a
> memory pointer to get the rgba data from agg over to png, so no
> speedups there either. Perhaps Michael has some input. Some code
> that we could run and test might help produce some further
> optimizations.
> 
> JDH
Can libpng be told to write one of the smaller png variants, using a 
color palette, for example, especially if antialiasing is turned off? 
For animation I suspect the reduced quality would not hurt much, and the 
smaller file size would be welcome, potentially yielding a smaller 
animation file as well.
Eric
> 
> ------------------------------------------------------------------------------
> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
> trial. Simplify your report design, integration and deployment - and focus on 
> what you do best, core application coding. Discover what's new with 
> Crystal Reports now. http://p.sf.net/sfu/bobj-july
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
From: John H. <jd...@gm...> - 2009年07月30日 02:10:57
On Wed, Jul 29, 2009 at 9:05 PM, Christian Lerrahn<li...@pe...> wrote:
>> Why not::
>>
>>  import matplotlib
>>  matplotlib.use('Agg')
>>
>> Then you have a full featured mpl backend w/ no GUI or X requirements.
>
> Thanks for that! I had overlooked that backend. It seems to do the
> trick perfectly. :)
Great -- take a look at
 http://matplotlib.sourceforge.net/faq/installing_faq.html#backends
which will explain the situation in much more detail. Also, the FAQ
 http://matplotlib.sourceforge.net/faq/howto_faq.html#matplotlib-in-a-web-application-server
is useful even if you are not writing a webapp server, since the
issues of working in a non-X environment are similar to your case.
JDH
From: Christian L. <li...@pe...> - 2009年07月30日 02:05:58
On 2009年7月29日 20:43:43 -0500
John Hunter <jd...@gm...> wrote:
> On Wed, Jul 29, 2009 at 7:33 PM, Christian
> Lerrahn<li...@pe...> wrote:
> > Hi,
> > I'm trying to make a few matplotlib scripts work on a box without
> > any X. However, I would like to change it as little as possible and
> > therefore don't want to get rid of the pylab interface.
> >
> > I almost got it to work already by just using the "dummy GUI", i.e.
> > i use
> >
> > import matplotlib as m
> > m.use('Template')
> > import pylab as p
> 
> Why not::
> 
> import matplotlib
> matplotlib.use('Agg')
> 
> Then you have a full featured mpl backend w/ no GUI or X requirements.
Thanks for that! I had overlooked that backend. It seems to do the
trick perfectly. :)
Cheers,
Christian
From: John H. <jd...@gm...> - 2009年07月30日 02:03:33
On Wed, Jul 29, 2009 at 1:25 PM, Antonino Ingargiola<tri...@gm...> wrote:
> I have attached another example of blit animation that does NOT
> require the svn version of MPL.
How did this help with your performance problems? The animation/blit
paradigm is great for *some* use cases, eg animating a cross-hair over
a static background, but is not ideal for strip charts, where the data
marches uniformly off the left of the figure. The problem is, in the
strip chart case, most of the figure is simply shifted left, and only
the new part needs to be redrawn. This does not map naturally to the
blit paradigm as mpl expresses it, since so many artists need to be
updated, eg all the tick labels, the line, the ticks.....
I think we need some custom data structures, like numpy objects that
look like arrays but are circular buffers, so we can push stuff onto
the end, have it drop off the front, but is transparent to naive users
like mpl (or we could use the mpl units interface to support these
objects with some custom method calls to get an "unwrapped" view of
the data) and an API for shifting big chunks of the rendered axes to
the left, drawing just the right part of the updated circular buffers,
and making sure the stitching together at the seams looks good.
Roland: if you are inclined to "roll your own" plotting library as you
suggested in your OP, I encourage you to look into adding this support
to mpl or working on a toolkit, because such functionality is sorely
needed and I would encourage all developers to help out in improving
the core to support this effort.
You may also want to look at chaco, which generally far outperforms
mpl for quasi real-time interactive plotting stuff. I am not sure if
they explicitly have support for strip charting, but would not be
surprised if they did.
JDH
From: John H. <jd...@gm...> - 2009年07月30日 01:53:54
On Wed, Jul 29, 2009 at 4:34 PM, Uri Laserson<las...@mi...> wrote:
> Hi everyone,
>
> I am trying to build the latest svn trunk version of MPL on OS X 10.5. I am
> getting the following error:
Try
 make build_osx105
 python setup.py install --prefix=~/somewhere
If that doesn't work, try
 cd release/osx
read the readme there and follow the instructions. This will build
mpl the way we do when making a release: fetch the dependencies (zlip,
png and freetype) and build them with the right flags, and then build
mpl explcitly linking to these libs.
JDH
From: John H. <jd...@gm...> - 2009年07月30日 01:43:58
On Wed, Jul 29, 2009 at 7:33 PM, Christian Lerrahn<li...@pe...> wrote:
> Hi,
> I'm trying to make a few matplotlib scripts work on a box without any
> X. However, I would like to change it as little as possible and
> therefore don't want to get rid of the pylab interface.
>
> I almost got it to work already by just using the "dummy GUI", i.e. i
> use
>
> import matplotlib as m
> m.use('Template')
> import pylab as p
Why not::
 import matplotlib
 matplotlib.use('Agg')
Then you have a full featured mpl backend w/ no GUI or X requirements.
From: John H. <jd...@gm...> - 2009年07月30日 01:10:07
On Wed, Jul 29, 2009 at 6:50 PM, Art<gre...@gm...> wrote:
> My bottleneck now is actually saving the pngs for mencoder to make into an
> avi (as with the movie_demo example on your site) using savefig. Do you also
> know of an alternative way of generating an avi of the animation? My
> animation has about 9000 frames.
No, I can't imagine there is much fat to trim in that part of the
code. We're using libpng to write the png, so no speedups there
unless you can make the pngs smaller. It looks like we are using a
memory pointer to get the rgba data from agg over to png, so no
speedups there either. Perhaps Michael has some input. Some code
that we could run and test might help produce some further
optimizations.
JDH
From: Tommy G. <tg...@ma...> - 2009年07月30日 00:53:02
On Jul 29, 2009, at 5:34 PM, Uri Laserson wrote:
> Hi everyone,
>
> I am trying to build the latest svn trunk version of MPL on OS X 
> 10.5. I am getting the following error:
>
> ld: in /Developer/SDKs/MacOSX10.4u.sdk/usr/local/lib/libPng.dylib, 
> file is not of required architecture for architecture ppc
>
>
> g++ -arch i386 -arch ppc -isysroot /Developer/SDKs/MacOSX10.4u.sdk - 
> g -bundle -undefined dynamic_lookup build/temp.macosx-10.3-i386-2.5/ 
> src/agg_py_transforms.o build/temp.macosx-10.3-i386-2.5/src/_tkagg.o 
> build/temp.macosx-10.3-i386-2.5/CXX/cxx_extensions.o build/ 
> temp.macosx-10.3-i386-2.5/CXX/cxxsupport.o build/temp.macosx-10.3- 
> i386-2.5/CXX/IndirectPythonInterface.o build/temp.macosx-10.3- 
> i386-2.5/CXX/cxxextensions.o -L/usr/local/lib -L/usr/lib -L/usr/ 
> local/lib -L/usr/lib -lstdc++ -lm -lfreetype -lz -lstdc++ -lm -o 
> build/lib.macosx-10.3-i386-2.5/matplotlib/backends/_tkagg.so - 
> framework Tcl -framework Tk
> ld: warning in /Developer/SDKs/MacOSX10.4u.sdk/usr/local/lib/ 
> libfreetype.dylib, file is not of required architecture
Look at the g++ call arguments you see that you are compiling for - 
arch i386 and -arch ppc, i.e. you are
building a universial build. To do this the .dylib libraries have to 
be universial also. So you have two
options: 1) Rebuild the required libraries; or 2) figure out how to 
remove -arch ppc from the matplotlib build.
Cheers
 Tommy
From: Christian L. <li...@pe...> - 2009年07月30日 00:34:57
Hi,
I'm trying to make a few matplotlib scripts work on a box without any
X. However, I would like to change it as little as possible and
therefore don't want to get rid of the pylab interface.
I almost got it to work already by just using the "dummy GUI", i.e. i
use
import matplotlib as m
m.use('Template')
import pylab as p
This works fine except for one little detail.
I've always had the problem that there doesn't seem to be a(n easy) way
to set the limits of a colour bar. However, as I need the colour scheme
to be constant across the different plots, I have always used the trick
of first plotting a 1x2 grid with the minimum and the maximum value and
then overwriting that with the actual plot. That way the colour bar
uses these values as it's extrema while these extrema are not
necessarily visible anywhere.
The problem I have now is that the overwriting doesn't work any more
with the trick of using the empty template for the GUI. Instead of
covering the existing pixels, they now show up in the bottom left
corner of my actual plot. If I remove that first plot, I lose my
constant colour bar but if I keep it, I have bogus pixels in my plot.
Any hints how to solve this dilemma?
Cheers,
Christian

Showing 25 results of 25

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 によって変換されたページ (->オリジナル) /