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
(27) |
2
(15) |
3
(2) |
|
4
(4) |
5
(5) |
6
(9) |
7
(15) |
8
(24) |
9
(19) |
10
(7) |
|
11
(13) |
12
(26) |
13
(27) |
14
(17) |
15
(14) |
16
(12) |
17
(9) |
|
18
(12) |
19
(17) |
20
(19) |
21
(5) |
22
(5) |
23
(7) |
24
(4) |
|
25
(1) |
26
(9) |
27
(20) |
28
(5) |
29
(10) |
30
(12) |
31
(6) |
|
From: gsal <sal...@gm...> - 2012-03-13 15:05:20
|
Say, on Windows, the mouseevent.key correctly comes in as control, shift, or a letter...on Linux, it does not....I am always getting None. is this a known problem with known solution? thanks, gsal -- View this message in context: http://old.nabble.com/matplotlib-picking-mouseevent.key%3DNone-tp33494747p33494747.html Sent from the matplotlib - users mailing list archive at Nabble.com. |
|
From: gsal <sal...@gm...> - 2012-03-13 14:59:14
|
Thanks. That did the trick. -- View this message in context: http://old.nabble.com/access-to-my-underlying-data-from-within-picker-or-pick_handler-tp33492013p33494708.html Sent from the matplotlib - users mailing list archive at Nabble.com. |
|
From: John H. <jd...@gm...> - 2012-03-13 13:17:14
|
On Mon, Mar 12, 2012 at 11:05 PM, gsal <sal...@gm...> wrote:
>
> I am trying to change the underlying data for my plot via a pick event,
> except that the matplotlib examples for picking show a couple of functions
> with predefined signatures and I can't seem to figure out how to modify my
> data from within those functions...how to do it?
>
> Here is a minimal example of what I am trying to do:
>
> [code]
> import matplotlib.pyplot as plt
>
> def pick_rlines(art,mouseevent):
> button = mouseevent.button
> key = mouseevent.key
>
> wsf.nnn = 4 # <-- how to modify wsf.nnn from here?
> print "wsf.nnn = ", wsf.nnn
> props = dict(nnn=wsf.nnn)
> return True, props
>
> def pick_handler(event):
> mouseevent = event.mouseevent
> button = mouseevent.button
> key = mouseevent.key
> art = event.artist
>
> wsf.nnn = event.nnn # <-- or from here ?
>
> class AAA():
> pass
>
> class BBB():
> def __init__(self):
> pass
>
> wsf=AAA() # when it is defined here?
> wsf.nnn=0
> GR = [1.0, 2.0, 3.0, 4.0]
>
> fig = plt.figure()
> ax = fig.add_axes([0.1,0.1,0.75,0.75])
> ax.set_aspect(1)
> rlines = ax.hlines(GR,0.0,4.0,picker=pick_rlines)
> fig.canvas.mpl_connect('pick_event', pick_handler)
> plt.show()
>
> if __name__ == '__main__':
> the = BBB()
In the code as you've written it, "the" is in the global namespace, and so
your pick event handlers can see that variable. So you could write:
def pick_rlines(art,mouseevent):
button = mouseevent.button
key = mouseevent.key
the.wsf.nnn = 4 # "the" is in the global namespace
But a cleaner design would be to make the pick handler a class method of
class "BBB", eg
class BBB:
def __init__(self):
self.fig = blah_blah...
self.fig.canvas.mpl_connect('pick_event', self.pick_handler)
self.wsf = blah_blah...
def pick_handler(self, artist, event):
self.wsf.nnn = 4 # wsf is in the class namespace
|
|
From: christophershou <chr...@cm...> - 2012-03-13 07:39:47
|
Thanks a lot, that issue has been resolved, thanks.
I manually install the missed libpng and freetype2 again, and I didn't find yum-builddep in my server(it's centos), after installed those two dependencies , compile done! Thanks again
Best regards!
Christopher Shou/Crawler Engineer
Developed by Cmarket
TEL : +86-10-5820-7077
Fax : +86-10-5820-8575
QQ : 250201619
MSN:sho...@ho...
Email : chr...@cm...
Http://www.cloump.com
-----邮件原件-----
发件人: Eric Firing [mailto:ef...@ha...]
发送时间: Tuesday, March 13, 2012 3:15 PM
收件人: mat...@li...
主题: Re: [Matplotlib-users] issue of compiling matplotlib1.1.0 on linux
On 03/12/2012 08:28 PM, christophershou wrote:
> Hi, dears
>
> I’m a beginner of matplotlib and I tried hard, but couldn’t compile it
>
> Here’s the details of my system
>
> lLinux host28 2.6.18-274.12.1.el5 #1 SMP Tue Nov 29 13:37:46 EST 2011
> x86_64 x86_64 x86_64 GNU/Linux
You are missing critical dependencies, including, but not limited to,
the freetype2 headers.
It looks like you are on a Redhat variant, so try the instructions in
the note here for using yum-builddep to get the dependencies:
http://matplotlib.sourceforge.net/users/installing.html#build-requirements
This may install an earlier version of numpy; if you have installed a
later version of numpy yourself and want to keep it, you can use the
package manager to uninstall the python-numpy package after running
yum-builddep and before building matplotlib.
Eric
>
> lNothing touched in setup.py or setupext.py
>
> lOutput of build
>
> basedirlist is: ['/usr/local', '/usr']
>
> ============================================================================
>
> BUILDING MATPLOTLIB
>
> matplotlib: 1.2.x
>
> python: 2.7.2 (default, Oct 27 2011, 14:39:41) [GCC 4.1.2
>
> 20080704 (Red Hat 4.1.2-51)]
>
> platform: linux2
>
> REQUIRED DEPENDENCIES
>
> numpy: 1.6.1
>
> freetype2: found, but unknown version (no pkg-config)
>
> * WARNING: Could not find 'freetype2' headers in any
>
> * of '/usr/local/include', '/usr/include',
>
> * '/usr/local/include', '/usr/include', '.',
>
> * '/usr/local/include/freetype2',
>
> * '/usr/include/freetype2',
>
> * '/usr/local/include/freetype2',
>
> * '/usr/include/freetype2', './freetype2'.
>
> OPTIONAL BACKEND DEPENDENCIES
>
> libpng: found, but unknown version (no pkg-config)
>
> * Could not find 'libpng' headers in any of
>
> * '/usr/local/include', '/usr/include',
>
> * '/usr/local/include', '/usr/include', '.'
>
> Tkinter: no
>
> * TKAgg requires Tkinter
>
> Gtk+: no
>
> * Building for Gtk+ requires pygtk; you must be able
>
> * to "import gtk" in your build/install environment
>
> Mac OS X native: no
>
> Qt: no
>
> Qt4: no
>
> PySide: no
>
> Cairo: no
>
> OPTIONAL DATE/TIMEZONE DEPENDENCIES
>
> datetime: present, version unknown
>
> dateutil: matplotlib will provide
>
> pytz: matplotlib will provide
>
> adding pytz
>
> OPTIONAL USETEX DEPENDENCIES
>
> dvipng: no
>
> ghostscript: 8.70
>
> latex: no
>
> pdftops: 3.00
>
> [Edit setup.cfg to suppress the above messages]
>
> ============================================================================
>
> pymods ['pylab']
>
> packages ['matplotlib', 'matplotlib.backends',
> 'matplotlib.backends.qt4_editor', 'matplotlib.projections',
> 'matplotlib.testing', 'matplotlib.testing.jpl_units',
> 'matplotlib.tests', 'mpl_toolkits', 'mpl_toolkits.mplot3d',
> 'mpl_toolkits.axes_grid', 'mpl_toolkits.axes_grid1',
> 'mpl_toolkits.axisartist', 'matplotlib.sphinxext', 'matplotlib.tri',
> 'matplotlib.delaunay', 'pytz', 'dateutil', 'dateutil.zoneinfo']
>
> ...skipping...
>
> copying lib/pytz/zoneinfo/Pacific/Guam ->
> build/lib.linux-x86_64-2.7/pytz/zoneinfo/Pacific
>
> copying lib/pytz/zoneinfo/Pacific/Pohnpei ->
> build/lib.linux-x86_64-2.7/pytz/zoneinfo/Pacific
>
> copying lib/pytz/zoneinfo/Pacific/Efate ->
> build/lib.linux-x86_64-2.7/pytz/zoneinfo/Pacific
>
> copying lib/pytz/zoneinfo/Pacific/Port_Moresby ->
> build/lib.linux-x86_64-2.7/pytz/zoneinfo/Pacific
>
> copying lib/pytz/zoneinfo/Pacific/Marquesas ->
> build/lib.linux-x86_64-2.7/pytz/zoneinfo/Pacific
>
> copying lib/pytz/zoneinfo/Pacific/Guadalcanal ->
> build/lib.linux-x86_64-2.7/pytz/zoneinfo/Pacific
>
> copying lib/pytz/zoneinfo/Pacific/Niue ->
> build/lib.linux-x86_64-2.7/pytz/zoneinfo/Pacific
>
> copying lib/pytz/zoneinfo/Pacific/Ponape ->
> build/lib.linux-x86_64-2.7/pytz/zoneinfo/Pacific
>
> copying lib/pytz/zoneinfo/Pacific/Honolulu ->
> build/lib.linux-x86_64-2.7/pytz/zoneinfo/Pacific
>
> copying lib/pytz/zoneinfo/Pacific/Yap ->
> build/lib.linux-x86_64-2.7/pytz/zoneinfo/Pacific
>
> copying lib/pytz/zoneinfo/Pacific/Tarawa ->
> build/lib.linux-x86_64-2.7/pytz/zoneinfo/Pacific
>
> copying lib/pytz/zoneinfo/Pacific/Chuuk ->
> build/lib.linux-x86_64-2.7/pytz/zoneinfo/Pacific
>
> copying lib/pytz/zoneinfo/Pacific/Kosrae ->
> build/lib.linux-x86_64-2.7/pytz/zoneinfo/Pacific
>
> copying lib/pytz/zoneinfo/Pacific/Easter ->
> build/lib.linux-x86_64-2.7/pytz/zoneinfo/Pacific
>
> copying lib/pytz/zoneinfo/Pacific/Johnston ->
> build/lib.linux-x86_64-2.7/pytz/zoneinfo/Pacific
>
> copying lib/pytz/zoneinfo/Pacific/Norfolk ->
> build/lib.linux-x86_64-2.7/pytz/zoneinfo/Pacific
>
> copying lib/pytz/zoneinfo/Pacific/Auckland ->
> build/lib.linux-x86_64-2.7/pytz/zoneinfo/Pacific
>
> copying lib/pytz/zoneinfo/Pacific/Tongatapu ->
> build/lib.linux-x86_64-2.7/pytz/zoneinfo/Pacific
>
> copying lib/pytz/zoneinfo/Pacific/Gambier ->
> build/lib.linux-x86_64-2.7/pytz/zoneinfo/Pacific
>
> copying lib/pytz/zoneinfo/Pacific/Nauru ->
> build/lib.linux-x86_64-2.7/pytz/zoneinfo/Pacific
>
> copying lib/pytz/zoneinfo/Pacific/Kwajalein ->
> build/lib.linux-x86_64-2.7/pytz/zoneinfo/Pacific
>
> copying lib/pytz/zoneinfo/Pacific/Chatham ->
> build/lib.linux-x86_64-2.7/pytz/zoneinfo/Pacific
>
> copying lib/pytz/zoneinfo/Pacific/Rarotonga ->
> build/lib.linux-x86_64-2.7/pytz/zoneinfo/Pacific
>
> copying lib/pytz/zoneinfo/Pacific/Pitcairn ->
> build/lib.linux-x86_64-2.7/pytz/zoneinfo/Pacific
>
> copying lib/pytz/zoneinfo/Pacific/Saipan ->
> build/lib.linux-x86_64-2.7/pytz/zoneinfo/Pacific
>
> copying lib/pytz/zoneinfo/Pacific/Midway ->
> build/lib.linux-x86_64-2.7/pytz/zoneinfo/Pacific
>
> copying lib/pytz/zoneinfo/Pacific/Fiji ->
> build/lib.linux-x86_64-2.7/pytz/zoneinfo/Pacific
>
> copying lib/pytz/zoneinfo/Pacific/Galapagos ->
> build/lib.linux-x86_64-2.7/pytz/zoneinfo/Pacific
>
> copying lib/pytz/zoneinfo/Pacific/Apia ->
> build/lib.linux-x86_64-2.7/pytz/zoneinfo/Pacific
>
> copying lib/pytz/zoneinfo/Pacific/Fakaofo ->
> build/lib.linux-x86_64-2.7/pytz/zoneinfo/Pacific
>
> copying lib/pytz/zoneinfo/Pacific/Noumea ->
> build/lib.linux-x86_64-2.7/pytz/zoneinfo/Pacific
>
> copying lib/pytz/zoneinfo/Pacific/Samoa ->
> build/lib.linux-x86_64-2.7/pytz/zoneinfo/Pacific
>
> copying lib/pytz/zoneinfo/Pacific/Wake ->
> build/lib.linux-x86_64-2.7/pytz/zoneinfo/Pacific
>
> copying lib/pytz/zoneinfo/Pacific/Palau ->
> build/lib.linux-x86_64-2.7/pytz/zoneinfo/Pacific
>
> copying lib/pytz/zoneinfo/Pacific/Funafuti ->
> build/lib.linux-x86_64-2.7/pytz/zoneinfo/Pacific
>
> copying lib/pytz/zoneinfo/Pacific/Majuro ->
> build/lib.linux-x86_64-2.7/pytz/zoneinfo/Pacific
>
> copying lib/pytz/zoneinfo/Pacific/Pago_Pago ->
> build/lib.linux-x86_64-2.7/pytz/zoneinfo/Pacific
>
> copying lib/pytz/zoneinfo/Pacific/Enderbury ->
> build/lib.linux-x86_64-2.7/pytz/zoneinfo/Pacific
>
> copying lib/pytz/zoneinfo/Pacific/Wallis ->
> build/lib.linux-x86_64-2.7/pytz/zoneinfo/Pacific
>
> copying lib/pytz/zoneinfo/Pacific/Tahiti ->
> build/lib.linux-x86_64-2.7/pytz/zoneinfo/Pacific
>
> copying lib/pytz/zoneinfo/Pacific/Kiritimati ->
> build/lib.linux-x86_64-2.7/pytz/zoneinfo/Pacific
>
> copying lib/pytz/zoneinfo/Pacific/Truk ->
> build/lib.linux-x86_64-2.7/pytz/zoneinfo/Pacific
>
> copying lib/dateutil/zoneinfo/zoneinfo-2010g.tar.gz ->
> build/lib.linux-x86_64-2.7/dateutil/zoneinfo
>
> running build_ext
>
> building 'matplotlib.ft2font' extension
>
> creating build/temp.linux-x86_64-2.7
>
> creating build/temp.linux-x86_64-2.7/src
>
> creating build/temp.linux-x86_64-2.7/CXX
>
> gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall
> -fPIC -DPY_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API -DPYCXX_ISO_CPP_LIB=1
> -I/usr/local/include -I/usr/include
> -I/usr/local/lib/python2.7/site-packages/numpy-1.6.1-py2.7-linux-x86_64.egg/numpy/core/include
> -I/usr/local/include -I/usr/include -I. -I/usr/local/include/freetype2
> -I/usr/include/freetype2
> -I/usr/local/lib/python2.7/site-packages/numpy-1.6.1-py2.7-linux-x86_64.egg/numpy/core/include/freetype2
> -I/usr/local/include/freetype2 -I/usr/include/freetype2 -I./freetype2
> -I/usr/local/include/python2.7 -c src/ft2font.cpp -o
> build/temp.linux-x86_64-2.7/src/ft2font.o
>
> 在包含自src/ft2font.cpp:3 的文件中:
>
> src/ft2font.h:16:22: 错误:ft2build.h:没有那个文件或目录
>
> src/ft2font.h:17:10: 错误:#include 需要"FILENAME" 或<FILENAME>
>
> src/ft2font.h:18:10: 错误:#include 需要"FILENAME" 或<FILENAME>
>
> src/ft2font.h:19:10: 错误:#include 需要"FILENAME" 或<FILENAME>
>
> src/ft2font.h:20:10: 错误:#include 需要"FILENAME" 或<FILENAME>
>
> src/ft2font.h:21:10: 错误:#include 需要"FILENAME" 或<FILENAME>
>
> src/ft2font.h:34: 错误:‘FT_Bitmap’ 未声明
>
> src/ft2font.h:34: 错误:‘FT_Int’ 未声明
>
> src/ft2font.h:34: 错误:‘FT_Int’ 未声明
>
> src/ft2font.h:86: 错误:expected ‘,’or ‘...’before ‘&’token
>
> src/ft2font.h:86: 错误:ISO C++ 不允许声明无类型的 ‘FT_Face’
>
> src/ft2font.h:131: 错误:‘FT_Face’ 没有命名一个类型
>
> src/ft2font.h:132: 错误:‘FT_Matrix’ 没有命名一个类型
>
> src/ft2font.h:133: 错误:‘FT_Vector’ 没有命名一个类型
>
> src/ft2font.h:134: 错误:‘FT_Error’ 没有命名一个类型
>
> src/ft2font.h:135: 错误:‘FT_Glyph’ 在此作用域中尚未声明
>
> src/ft2font.h:135: 错误:模板参数1 无效
>
> src/ft2font.h:135: 错误:模板参数2 无效
>
> src/ft2font.h:136: 错误:‘FT_Vector’ 在此作用域中尚未声明
>
> src/ft2font.h:136: 错误:模板参数1 无效
>
> src/ft2font.h:136: 错误:模板参数2 无效
>
> src/ft2font.h:142: 错误:‘FT_BBox’ 没有命名一个类型
>
> src/ft2font.cpp:41: 错误:‘FT_Library’ 没有命名一个类型
>
> src/ft2font.cpp:106: 错误:变量或字段 ‘draw_bitmap’ 声明为void
>
> src/ft2font.cpp:106: 错误:‘int FT2Image::draw_bitmap’ 不是 ‘class
> FT2Image’ 的静态成员
>
> src/ft2font.cpp:106: 错误:‘FT_Bitmap’ 在此作用域中尚未声明
>
> src/ft2font.cpp:106: 错误:‘bitmap’ 在此作用域中尚未声明
>
> src/ft2font.cpp:107: 错误:‘FT_Int’ 在此作用域中尚未声明
>
> src/ft2font.cpp:108: 错误:‘FT_Int’ 在此作用域中尚未声明
>
> src/ft2font.cpp:108: 错误:initializer 表达式列表被看作复合表达式
>
> src/ft2font.cpp:109: 错误:expected ‘,’or ‘;’before ‘{’token
>
> /usr/local/lib/python2.7/site-packages/numpy-1.6.1-py2.7-linux-x86_64.egg/numpy/core/include/numpy/__multiarray_api.h:1532:
> 警告:‘int _import_array()’ 定义后未使用
>
> error: command 'gcc' failed with exit status 1
>
> lgcc --version
>
> gcc (GCC) 4.1.2 20080704 (Red Hat 4.1.2-51)
>
> Copyright (C) 2006 Free Software Foundation, Inc.
>
> Anyone pls help. Thanks in advance!
>
> Best regards!
>
> Christopher Shou/Crawler Engineer
>
>
> Description: cid:A2DEDB77-4E9F-4886-A85D-C9CBDABCF4E6
>
> Developed by Cmarket
>
> TEL : +86-10-5820-7077
>
> Fax : +86-10-5820-8575
>
> QQ : 250201619
>
> MSN:sho...@ho...
>
> Email : chr...@cm...
> <https://mail.cmarket.com.cn/owa/redir.aspx?C=7ca38bf5b3dd4ec3a7505c03995c31bd&URL=mailto%3amichaelkook%40cmarket.com.cn>
>
> Http://www.cloump.com
> <https://mail.cmarket.com.cn/owa/redir.aspx?C=7ca38bf5b3dd4ec3a7505c03995c31bd&URL=http%3a%2f%2fwww.cloump.com%2f>
>
>
>
>
> ------------------------------------------------------------------------------
> Keep Your Developer Skills Current with LearnDevNow!
> The most comprehensive online learning library for Microsoft developers
> is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
> Metro Style Apps, more. Free future releases when you subscribe now!
> http://p.sf.net/sfu/learndevnow-d2d
>
>
>
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
Matplotlib-users mailing list
Mat...@li...
https://lists.sourceforge.net/lists/listinfo/matplotlib-users
-----
在此邮件中未发现病毒。
检查工具:AVG - www.avg.com
版本:2012.0.1913 / 病毒数据库:2114/4867 - 发布日期:03/12/12
|
|
From: Eric F. <ef...@ha...> - 2012-03-13 07:15:24
|
On 03/12/2012 08:28 PM, christophershou wrote: > Hi, dears > > I’m a beginner of matplotlib and I tried hard, but couldn’t compile it > > Here’s the details of my system > > lLinux host28 2.6.18-274.12.1.el5 #1 SMP Tue Nov 29 13:37:46 EST 2011 > x86_64 x86_64 x86_64 GNU/Linux You are missing critical dependencies, including, but not limited to, the freetype2 headers. It looks like you are on a Redhat variant, so try the instructions in the note here for using yum-builddep to get the dependencies: http://matplotlib.sourceforge.net/users/installing.html#build-requirements This may install an earlier version of numpy; if you have installed a later version of numpy yourself and want to keep it, you can use the package manager to uninstall the python-numpy package after running yum-builddep and before building matplotlib. Eric > > lNothing touched in setup.py or setupext.py > > lOutput of build > > basedirlist is: ['/usr/local', '/usr'] > > ============================================================================ > > BUILDING MATPLOTLIB > > matplotlib: 1.2.x > > python: 2.7.2 (default, Oct 27 2011, 14:39:41) [GCC 4.1.2 > > 20080704 (Red Hat 4.1.2-51)] > > platform: linux2 > > REQUIRED DEPENDENCIES > > numpy: 1.6.1 > > freetype2: found, but unknown version (no pkg-config) > > * WARNING: Could not find 'freetype2' headers in any > > * of '/usr/local/include', '/usr/include', > > * '/usr/local/include', '/usr/include', '.', > > * '/usr/local/include/freetype2', > > * '/usr/include/freetype2', > > * '/usr/local/include/freetype2', > > * '/usr/include/freetype2', './freetype2'. > > OPTIONAL BACKEND DEPENDENCIES > > libpng: found, but unknown version (no pkg-config) > > * Could not find 'libpng' headers in any of > > * '/usr/local/include', '/usr/include', > > * '/usr/local/include', '/usr/include', '.' > > Tkinter: no > > * TKAgg requires Tkinter > > Gtk+: no > > * Building for Gtk+ requires pygtk; you must be able > > * to "import gtk" in your build/install environment > > Mac OS X native: no > > Qt: no > > Qt4: no > > PySide: no > > Cairo: no > > OPTIONAL DATE/TIMEZONE DEPENDENCIES > > datetime: present, version unknown > > dateutil: matplotlib will provide > > pytz: matplotlib will provide > > adding pytz > > OPTIONAL USETEX DEPENDENCIES > > dvipng: no > > ghostscript: 8.70 > > latex: no > > pdftops: 3.00 > > [Edit setup.cfg to suppress the above messages] > > ============================================================================ > > pymods ['pylab'] > > packages ['matplotlib', 'matplotlib.backends', > 'matplotlib.backends.qt4_editor', 'matplotlib.projections', > 'matplotlib.testing', 'matplotlib.testing.jpl_units', > 'matplotlib.tests', 'mpl_toolkits', 'mpl_toolkits.mplot3d', > 'mpl_toolkits.axes_grid', 'mpl_toolkits.axes_grid1', > 'mpl_toolkits.axisartist', 'matplotlib.sphinxext', 'matplotlib.tri', > 'matplotlib.delaunay', 'pytz', 'dateutil', 'dateutil.zoneinfo'] > > ...skipping... > > copying lib/pytz/zoneinfo/Pacific/Guam -> > build/lib.linux-x86_64-2.7/pytz/zoneinfo/Pacific > > copying lib/pytz/zoneinfo/Pacific/Pohnpei -> > build/lib.linux-x86_64-2.7/pytz/zoneinfo/Pacific > > copying lib/pytz/zoneinfo/Pacific/Efate -> > build/lib.linux-x86_64-2.7/pytz/zoneinfo/Pacific > > copying lib/pytz/zoneinfo/Pacific/Port_Moresby -> > build/lib.linux-x86_64-2.7/pytz/zoneinfo/Pacific > > copying lib/pytz/zoneinfo/Pacific/Marquesas -> > build/lib.linux-x86_64-2.7/pytz/zoneinfo/Pacific > > copying lib/pytz/zoneinfo/Pacific/Guadalcanal -> > build/lib.linux-x86_64-2.7/pytz/zoneinfo/Pacific > > copying lib/pytz/zoneinfo/Pacific/Niue -> > build/lib.linux-x86_64-2.7/pytz/zoneinfo/Pacific > > copying lib/pytz/zoneinfo/Pacific/Ponape -> > build/lib.linux-x86_64-2.7/pytz/zoneinfo/Pacific > > copying lib/pytz/zoneinfo/Pacific/Honolulu -> > build/lib.linux-x86_64-2.7/pytz/zoneinfo/Pacific > > copying lib/pytz/zoneinfo/Pacific/Yap -> > build/lib.linux-x86_64-2.7/pytz/zoneinfo/Pacific > > copying lib/pytz/zoneinfo/Pacific/Tarawa -> > build/lib.linux-x86_64-2.7/pytz/zoneinfo/Pacific > > copying lib/pytz/zoneinfo/Pacific/Chuuk -> > build/lib.linux-x86_64-2.7/pytz/zoneinfo/Pacific > > copying lib/pytz/zoneinfo/Pacific/Kosrae -> > build/lib.linux-x86_64-2.7/pytz/zoneinfo/Pacific > > copying lib/pytz/zoneinfo/Pacific/Easter -> > build/lib.linux-x86_64-2.7/pytz/zoneinfo/Pacific > > copying lib/pytz/zoneinfo/Pacific/Johnston -> > build/lib.linux-x86_64-2.7/pytz/zoneinfo/Pacific > > copying lib/pytz/zoneinfo/Pacific/Norfolk -> > build/lib.linux-x86_64-2.7/pytz/zoneinfo/Pacific > > copying lib/pytz/zoneinfo/Pacific/Auckland -> > build/lib.linux-x86_64-2.7/pytz/zoneinfo/Pacific > > copying lib/pytz/zoneinfo/Pacific/Tongatapu -> > build/lib.linux-x86_64-2.7/pytz/zoneinfo/Pacific > > copying lib/pytz/zoneinfo/Pacific/Gambier -> > build/lib.linux-x86_64-2.7/pytz/zoneinfo/Pacific > > copying lib/pytz/zoneinfo/Pacific/Nauru -> > build/lib.linux-x86_64-2.7/pytz/zoneinfo/Pacific > > copying lib/pytz/zoneinfo/Pacific/Kwajalein -> > build/lib.linux-x86_64-2.7/pytz/zoneinfo/Pacific > > copying lib/pytz/zoneinfo/Pacific/Chatham -> > build/lib.linux-x86_64-2.7/pytz/zoneinfo/Pacific > > copying lib/pytz/zoneinfo/Pacific/Rarotonga -> > build/lib.linux-x86_64-2.7/pytz/zoneinfo/Pacific > > copying lib/pytz/zoneinfo/Pacific/Pitcairn -> > build/lib.linux-x86_64-2.7/pytz/zoneinfo/Pacific > > copying lib/pytz/zoneinfo/Pacific/Saipan -> > build/lib.linux-x86_64-2.7/pytz/zoneinfo/Pacific > > copying lib/pytz/zoneinfo/Pacific/Midway -> > build/lib.linux-x86_64-2.7/pytz/zoneinfo/Pacific > > copying lib/pytz/zoneinfo/Pacific/Fiji -> > build/lib.linux-x86_64-2.7/pytz/zoneinfo/Pacific > > copying lib/pytz/zoneinfo/Pacific/Galapagos -> > build/lib.linux-x86_64-2.7/pytz/zoneinfo/Pacific > > copying lib/pytz/zoneinfo/Pacific/Apia -> > build/lib.linux-x86_64-2.7/pytz/zoneinfo/Pacific > > copying lib/pytz/zoneinfo/Pacific/Fakaofo -> > build/lib.linux-x86_64-2.7/pytz/zoneinfo/Pacific > > copying lib/pytz/zoneinfo/Pacific/Noumea -> > build/lib.linux-x86_64-2.7/pytz/zoneinfo/Pacific > > copying lib/pytz/zoneinfo/Pacific/Samoa -> > build/lib.linux-x86_64-2.7/pytz/zoneinfo/Pacific > > copying lib/pytz/zoneinfo/Pacific/Wake -> > build/lib.linux-x86_64-2.7/pytz/zoneinfo/Pacific > > copying lib/pytz/zoneinfo/Pacific/Palau -> > build/lib.linux-x86_64-2.7/pytz/zoneinfo/Pacific > > copying lib/pytz/zoneinfo/Pacific/Funafuti -> > build/lib.linux-x86_64-2.7/pytz/zoneinfo/Pacific > > copying lib/pytz/zoneinfo/Pacific/Majuro -> > build/lib.linux-x86_64-2.7/pytz/zoneinfo/Pacific > > copying lib/pytz/zoneinfo/Pacific/Pago_Pago -> > build/lib.linux-x86_64-2.7/pytz/zoneinfo/Pacific > > copying lib/pytz/zoneinfo/Pacific/Enderbury -> > build/lib.linux-x86_64-2.7/pytz/zoneinfo/Pacific > > copying lib/pytz/zoneinfo/Pacific/Wallis -> > build/lib.linux-x86_64-2.7/pytz/zoneinfo/Pacific > > copying lib/pytz/zoneinfo/Pacific/Tahiti -> > build/lib.linux-x86_64-2.7/pytz/zoneinfo/Pacific > > copying lib/pytz/zoneinfo/Pacific/Kiritimati -> > build/lib.linux-x86_64-2.7/pytz/zoneinfo/Pacific > > copying lib/pytz/zoneinfo/Pacific/Truk -> > build/lib.linux-x86_64-2.7/pytz/zoneinfo/Pacific > > copying lib/dateutil/zoneinfo/zoneinfo-2010g.tar.gz -> > build/lib.linux-x86_64-2.7/dateutil/zoneinfo > > running build_ext > > building 'matplotlib.ft2font' extension > > creating build/temp.linux-x86_64-2.7 > > creating build/temp.linux-x86_64-2.7/src > > creating build/temp.linux-x86_64-2.7/CXX > > gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall > -fPIC -DPY_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API -DPYCXX_ISO_CPP_LIB=1 > -I/usr/local/include -I/usr/include > -I/usr/local/lib/python2.7/site-packages/numpy-1.6.1-py2.7-linux-x86_64.egg/numpy/core/include > -I/usr/local/include -I/usr/include -I. -I/usr/local/include/freetype2 > -I/usr/include/freetype2 > -I/usr/local/lib/python2.7/site-packages/numpy-1.6.1-py2.7-linux-x86_64.egg/numpy/core/include/freetype2 > -I/usr/local/include/freetype2 -I/usr/include/freetype2 -I./freetype2 > -I/usr/local/include/python2.7 -c src/ft2font.cpp -o > build/temp.linux-x86_64-2.7/src/ft2font.o > > 在包含自src/ft2font.cpp:3 的文件中: > > src/ft2font.h:16:22: 错误:ft2build.h:没有那个文件或目录 > > src/ft2font.h:17:10: 错误:#include 需要"FILENAME" 或<FILENAME> > > src/ft2font.h:18:10: 错误:#include 需要"FILENAME" 或<FILENAME> > > src/ft2font.h:19:10: 错误:#include 需要"FILENAME" 或<FILENAME> > > src/ft2font.h:20:10: 错误:#include 需要"FILENAME" 或<FILENAME> > > src/ft2font.h:21:10: 错误:#include 需要"FILENAME" 或<FILENAME> > > src/ft2font.h:34: 错误:‘FT_Bitmap’ 未声明 > > src/ft2font.h:34: 错误:‘FT_Int’ 未声明 > > src/ft2font.h:34: 错误:‘FT_Int’ 未声明 > > src/ft2font.h:86: 错误:expected ‘,’or ‘...’before ‘&’token > > src/ft2font.h:86: 错误:ISO C++ 不允许声明无类型的 ‘FT_Face’ > > src/ft2font.h:131: 错误:‘FT_Face’ 没有命名一个类型 > > src/ft2font.h:132: 错误:‘FT_Matrix’ 没有命名一个类型 > > src/ft2font.h:133: 错误:‘FT_Vector’ 没有命名一个类型 > > src/ft2font.h:134: 错误:‘FT_Error’ 没有命名一个类型 > > src/ft2font.h:135: 错误:‘FT_Glyph’ 在此作用域中尚未声明 > > src/ft2font.h:135: 错误:模板参数1 无效 > > src/ft2font.h:135: 错误:模板参数2 无效 > > src/ft2font.h:136: 错误:‘FT_Vector’ 在此作用域中尚未声明 > > src/ft2font.h:136: 错误:模板参数1 无效 > > src/ft2font.h:136: 错误:模板参数2 无效 > > src/ft2font.h:142: 错误:‘FT_BBox’ 没有命名一个类型 > > src/ft2font.cpp:41: 错误:‘FT_Library’ 没有命名一个类型 > > src/ft2font.cpp:106: 错误:变量或字段 ‘draw_bitmap’ 声明为void > > src/ft2font.cpp:106: 错误:‘int FT2Image::draw_bitmap’ 不是 ‘class > FT2Image’ 的静态成员 > > src/ft2font.cpp:106: 错误:‘FT_Bitmap’ 在此作用域中尚未声明 > > src/ft2font.cpp:106: 错误:‘bitmap’ 在此作用域中尚未声明 > > src/ft2font.cpp:107: 错误:‘FT_Int’ 在此作用域中尚未声明 > > src/ft2font.cpp:108: 错误:‘FT_Int’ 在此作用域中尚未声明 > > src/ft2font.cpp:108: 错误:initializer 表达式列表被看作复合表达式 > > src/ft2font.cpp:109: 错误:expected ‘,’or ‘;’before ‘{’token > > /usr/local/lib/python2.7/site-packages/numpy-1.6.1-py2.7-linux-x86_64.egg/numpy/core/include/numpy/__multiarray_api.h:1532: > 警告:‘int _import_array()’ 定义后未使用 > > error: command 'gcc' failed with exit status 1 > > lgcc --version > > gcc (GCC) 4.1.2 20080704 (Red Hat 4.1.2-51) > > Copyright (C) 2006 Free Software Foundation, Inc. > > Anyone pls help. Thanks in advance! > > Best regards! > > Christopher Shou/Crawler Engineer > > > Description: cid:A2DEDB77-4E9F-4886-A85D-C9CBDABCF4E6 > > Developed by Cmarket > > TEL : +86-10-5820-7077 > > Fax : +86-10-5820-8575 > > QQ : 250201619 > > MSN:sho...@ho... > > Email : chr...@cm... > <https://mail.cmarket.com.cn/owa/redir.aspx?C=7ca38bf5b3dd4ec3a7505c03995c31bd&URL=mailto%3amichaelkook%40cmarket.com.cn> > > Http://www.cloump.com > <https://mail.cmarket.com.cn/owa/redir.aspx?C=7ca38bf5b3dd4ec3a7505c03995c31bd&URL=http%3a%2f%2fwww.cloump.com%2f> > > > > > ------------------------------------------------------------------------------ > Keep Your Developer Skills Current with LearnDevNow! > The most comprehensive online learning library for Microsoft developers > is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, > Metro Style Apps, more. Free future releases when you subscribe now! > http://p.sf.net/sfu/learndevnow-d2d > > > > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users |
|
From: gsal <sal...@gm...> - 2012-03-13 04:05:31
|
I am trying to change the underlying data for my plot via a pick event,
except that the matplotlib examples for picking show a couple of functions
with predefined signatures and I can't seem to figure out how to modify my
data from within those functions...how to do it?
Here is a minimal example of what I am trying to do:
[code]
import matplotlib.pyplot as plt
def pick_rlines(art,mouseevent):
button = mouseevent.button
key = mouseevent.key
wsf.nnn = 4 # <-- how to modify wsf.nnn from here?
print "wsf.nnn = ", wsf.nnn
props = dict(nnn=wsf.nnn)
return True, props
def pick_handler(event):
mouseevent = event.mouseevent
button = mouseevent.button
key = mouseevent.key
art = event.artist
wsf.nnn = event.nnn # <-- or from here ?
class AAA():
pass
class BBB():
def __init__(self):
pass
wsf=AAA() # when it is defined here?
wsf.nnn=0
GR = [1.0, 2.0, 3.0, 4.0]
fig = plt.figure()
ax = fig.add_axes([0.1,0.1,0.75,0.75])
ax.set_aspect(1)
rlines = ax.hlines(GR,0.0,4.0,picker=pick_rlines)
fig.canvas.mpl_connect('pick_event', pick_handler)
plt.show()
if __name__ == '__main__':
the = BBB()
[/code]
thanks in advance for any pointers.
--
View this message in context: http://old.nabble.com/access-to-my-underlying-data-from-picker-of-pick_handler-tp33492013p33492013.html
Sent from the matplotlib - users mailing list archive at Nabble.com.
|
|
From: Federico A. <ari...@gm...> - 2012-03-12 23:25:54
|
Hi Working on my little experiment (backend with edition capabilities https://github.com/fariza/MPL-Experimental-Backend) I want to turn visibility on and off for lines. I can not use the visible property, using it the autolimits "relim" keeps considering the lines as being there. As consequence the limits are wrong (if we think only on the visible lines). So I resorted to remove the line from its axes by line.remove() The question is: If I do not want to use another variable to keep track of this line, how can I find it again from the figure instance (or somewhere else)? get_children gets me nowhere.... or maybe? ################# import matplotlib.pylab as plt fig = plt.figure() ax = fig.add_subplot(111) line = ax.plot(range(100)) print line[0] in ax.lines line[0].remove() print line[0] in ax.lines plt.show() ################# Thanks Federico -- Y yo que culpa tengo de que ellas se crean todo lo que yo les digo? -- Antonio Alducin -- |
|
From: questions a. <que...@gm...> - 2012-03-12 22:25:24
|
Thanks for responding. I do think the error is with how I prepare the data (importing as a numpy array) because I have used matplotlib a million time with no problems. Maybe I should be taking this question elsewhere about importing the data but thought I would add some more info. The data in the txt file looks like this when I open it in notepad: ncols 886 nrows 691 xllcorner 111.975 yllcorner -44.525 cellsize 0.05 NODATA_value -9999 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 and some of the info I received with it: General Category:Gridded daily data Geographic Bounding Box See Below North Bounding Latitude -9.975 South Bounding Latitude -44.525 East Bounding Longitude 156.275 West Bounding Longitude 111.975 Stored Data Format Arc/Info grids–all Australia Available Format Type ASCII row major I am currently using: f=N.genfromtxt(inputfile, skip_header=6, dtype=float, names=True) with the output looking like: [ (0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0. Is this how the data should look when it has been imported from an ascii to a numpy array? thanks On Fri, Mar 9, 2012 at 5:27 PM, Benjamin Root <ben...@ou...> wrote: > > > On Wednesday, March 7, 2012, questions anon <que...@gm...> > wrote: > > Hi all, > > I am still having a problem with the same code. I am not sure if maybe > the problem is how I read the data in as numpy.genfromtxt > > Is there a step I need to take to convert the data to numpy array to > then read into matplotlib? > > Sorry for the delay. > > As far as I can tell, you are doing everything correctly. The error you > are getting would seem to indicate something wrong with your EPD install, > or perhaps a conflict with another install on numpy or mpl. > > I would suggest completely clearing out your python and EPD install and > reinstalling it fresh. > > Ben Root |
|
From: Eric F. <ef...@ha...> - 2012-03-12 22:21:53
|
On 03/12/2012 10:57 AM, Gias Uddin wrote: > If I understand, this should have given me "TkAgg". > so, the backend is not working properly. No, the backend is fine, it is just the wrong one. Most likely, when you built mpl, the libraries for the gui backends were not found. Try: sudo apt-get build-dep python-matplotlib and then try building and installing mpl again. Eric > > On Mon, Mar 12, 2012 at 4:49 PM, Gias Uddin <gi...@gm... > <mailto:gi...@gm...>> wrote: > > >>> plt.get_backend() > 'agg' > > > > On Mon, Mar 12, 2012 at 4:00 PM, Goyo <goy...@gm... > <mailto:goy...@gm...>> wrote: > > El día 12 de marzo de 2012 17:05, Gias Uddin <gi...@gm... > <mailto:gi...@gm...>> escribió: > > I have posted the following message in StackOverflow about my > problem with > > graph plotting using python nltk using Matplotlib and numpy. > > Advices will be tremendously helpful. Thanks in advance. > > > > > http://stackoverflow.com/questions/9661909/python-nltk-plots-are-not-showing-up > > This usually happens when you're using a non interactive backend. > What's the output of plt.get_backend()? > > Goyo > > > > > > ------------------------------------------------------------------------------ > Try before you buy = See our experts in action! > The most comprehensive online learning library for Microsoft developers > is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, > Metro Style Apps, more. Free future releases when you subscribe now! > http://p.sf.net/sfu/learndevnow-dev2 > > > > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users |
|
From: Sourabh B. <sb...@gm...> - 2012-03-12 22:07:55
|
It is a problem with the dialog, if you set the option DontUseNativeDialog. then it works fine. I guess that the problem is with Ubuntu 11.10. On Mon, Mar 12, 2012 at 5:37 PM, Ray Osborn <RO...@an...> wrote: > I think that QtGui.QFileDialog.getSaveFileName returns a tuple, the first > element of which is the file name. You can ignore the second element by > using: > > fname, _ = QtGui.QFileDialog.getSaveFileName(self, 'Save file', > '/home/untitled.png', 'Images (*.png *.xpm *.jpg)') > > Ray > > On Mar 12, 2012, at 4:24 PM, Darren Dale wrote: > > > On Mon, Mar 12, 2012 at 4:30 PM, Sourabh Bajaj <sb...@gm...> wrote: > >> I am getting a segmentation fault when I try to declare a new image > name. I > >> can replace a existing image correctly. Why am I getting the error at > the > >> getSaveFileName dialog ?? > > [...] > >> fname = QtGui.QFileDialog.getSaveFileName(self, 'Save file', > >> '/home/untitled.png', 'Images (*.png *.xpm *.jpg)') > > > > Here is the call signature: > > > > QString getSaveFileName (QWidget parent = None, QString caption = > > QString(), QString directory = QString(), QString filter = QString(), > > Options options = 0) > > > > You are passing a file name to a function argument that is expecting a > > directory. Maybe that has something to do with it. Although, I don't > > know why that would cause a crash, unless there is a bug in Qt/PyQt. > > > > Darren > > > > > ------------------------------------------------------------------------------ > > Try before you buy = See our experts in action! > > The most comprehensive online learning library for Microsoft developers > > is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, > > Metro Style Apps, more. Free future releases when you subscribe now! > > http://p.sf.net/sfu/learndevnow-dev2 > > _______________________________________________ > > Matplotlib-users mailing list > > Mat...@li... > > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > -- > Ray Osborn > Materials Science Division > Argonne National Laboratory > Argonne, IL 60439, USA > Phone: +1 (630) 252-9011 > Email: RO...@an... > > > > |
|
From: Ray O. <RO...@an...> - 2012-03-12 21:37:41
|
I think that QtGui.QFileDialog.getSaveFileName returns a tuple, the first element of which is the file name. You can ignore the second element by using: fname, _ = QtGui.QFileDialog.getSaveFileName(self, 'Save file', '/home/untitled.png', 'Images (*.png *.xpm *.jpg)') Ray On Mar 12, 2012, at 4:24 PM, Darren Dale wrote: > On Mon, Mar 12, 2012 at 4:30 PM, Sourabh Bajaj <sb...@gm...> wrote: >> I am getting a segmentation fault when I try to declare a new image name. I >> can replace a existing image correctly. Why am I getting the error at the >> getSaveFileName dialog ?? > [...] >> fname = QtGui.QFileDialog.getSaveFileName(self, 'Save file', >> '/home/untitled.png', 'Images (*.png *.xpm *.jpg)') > > Here is the call signature: > > QString getSaveFileName (QWidget parent = None, QString caption = > QString(), QString directory = QString(), QString filter = QString(), > Options options = 0) > > You are passing a file name to a function argument that is expecting a > directory. Maybe that has something to do with it. Although, I don't > know why that would cause a crash, unless there is a bug in Qt/PyQt. > > Darren > > ------------------------------------------------------------------------------ > Try before you buy = See our experts in action! > The most comprehensive online learning library for Microsoft developers > is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, > Metro Style Apps, more. Free future releases when you subscribe now! > http://p.sf.net/sfu/learndevnow-dev2 > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users -- Ray Osborn Materials Science Division Argonne National Laboratory Argonne, IL 60439, USA Phone: +1 (630) 252-9011 Email: RO...@an... |
|
From: Darren D. <dsd...@gm...> - 2012-03-12 21:24:47
|
On Mon, Mar 12, 2012 at 4:30 PM, Sourabh Bajaj <sb...@gm...> wrote: > I am getting a segmentation fault when I try to declare a new image name. I > can replace a existing image correctly. Why am I getting the error at the > getSaveFileName dialog ?? [...] > fname = QtGui.QFileDialog.getSaveFileName(self, 'Save file', > '/home/untitled.png', 'Images (*.png *.xpm *.jpg)') Here is the call signature: QString getSaveFileName (QWidget parent = None, QString caption = QString(), QString directory = QString(), QString filter = QString(), Options options = 0) You are passing a file name to a function argument that is expecting a directory. Maybe that has something to do with it. Although, I don't know why that would cause a crash, unless there is a bug in Qt/PyQt. Darren |
|
From: Gias U. <gi...@gm...> - 2012-03-12 20:57:32
|
If I understand, this should have given me "TkAgg". so, the backend is not working properly. On Mon, Mar 12, 2012 at 4:49 PM, Gias Uddin <gi...@gm...> wrote: > >>> plt.get_backend() > 'agg' > > > > On Mon, Mar 12, 2012 at 4:00 PM, Goyo <goy...@gm...> wrote: > >> El día 12 de marzo de 2012 17:05, Gias Uddin <gi...@gm...> escribió: >> > I have posted the following message in StackOverflow about my problem >> with >> > graph plotting using python nltk using Matplotlib and numpy. >> > Advices will be tremendously helpful. Thanks in advance. >> > >> > >> http://stackoverflow.com/questions/9661909/python-nltk-plots-are-not-showing-up >> >> This usually happens when you're using a non interactive backend. >> What's the output of plt.get_backend()? >> >> Goyo >> > > |
|
From: Benjamin R. <ben...@ou...> - 2012-03-12 20:51:42
|
On Fri, Mar 9, 2012 at 1:14 PM, Wolfgang Draxinger < wdr...@dr...> wrote: > On Fri, 9 Mar 2012 11:19:15 -0600 > Benjamin Root <ben...@ou...> wrote: > > > Can I have the data you used to produce these errorbars so I can test > > this bug? > > Here's the data > > # Fluence.... -sigma Signal... -sigma area > 1127 48.32 9.114 10.31 0.1318 > 1.127e+04 482.9 35.96 16.15 0.4994 > 1.127e+05 4829 231.2 101.1 2.568 > 1.127e+06 4.829e+04 4631 1689 12.22 > > Ah, finally figured it out. The issue is that your y-value for that error bar is 9.114, but you want to plot error bars that are +/-10.31. That line gets thrown out by matplotlib because you can't plot at negative values for log scale. There is a trick that might work. The set_yscale method has a kwarg "nonposy" which could be set to "clip". You could also try setting to the "symlog" scale which might let you get away with a negative value. I hope that helps! Ben Root |
|
From: Gias U. <gi...@gm...> - 2012-03-12 20:50:22
|
>>> plt.get_backend() 'agg' On Mon, Mar 12, 2012 at 4:00 PM, Goyo <goy...@gm...> wrote: > El día 12 de marzo de 2012 17:05, Gias Uddin <gi...@gm...> escribió: > > I have posted the following message in StackOverflow about my problem > with > > graph plotting using python nltk using Matplotlib and numpy. > > Advices will be tremendously helpful. Thanks in advance. > > > > > http://stackoverflow.com/questions/9661909/python-nltk-plots-are-not-showing-up > > This usually happens when you're using a non interactive backend. > What's the output of plt.get_backend()? > > Goyo > |
|
From: Sourabh B. <sb...@gm...> - 2012-03-12 20:30:17
|
I am getting a segmentation fault when I try to declare a new image name. I
can replace a existing image correctly. Why am I getting the error at the
getSaveFileName dialog ??
Can anyone help me with the code.
import sys
from PyQt4 import QtGui, QtCore, Qt
import numpy as np
from matplotlib.figure import Figure
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D
from matplotlib.backends.backend_qt4agg import FigureCanvasQTAgg as
FigureCanvas
from matplotlib.backends.backend_qt4agg import NavigationToolbar2QTAgg as
NavigationToolbar
def randrange(n, vmin, vmax):
return (vmax-vmin)*np.random.rand(n) + vmin
class Example(QtGui.QWidget):
def __init__(self):
super(Example, self).__init__()
self.initUI()
def initUI(self):
self.main_frame = QtGui.QWidget()
self.dpi=100
self.i=1
self.fig = Figure((5.0, 5.0), dpi=self.dpi)
self.scatterpts = []
self.canvas = FigureCanvas(self.fig)
self.canvas.setParent(self.main_frame)
self.ax = self.fig.gca(projection='3d')
self.mpl_toolbar = NavigationToolbar(self.canvas, self.main_frame)
self.btn = QtGui.QPushButton('Button', self)
self.btn.resize(self.btn.sizeHint())
self.btn.clicked.connect(self.drawplot)
self.btn1 = QtGui.QPushButton('Save', self)
self.btn1.resize(self.btn.sizeHint())
self.btn1.clicked.connect(self.saveplot)
self.setWindowTitle('Tooltips')
Box =QtGui.QVBoxLayout()
Box.addWidget(self.canvas)
Box.addWidget(self.btn)
Box.addWidget(self.btn1)
Box.addWidget(self.mpl_toolbar)
self.main_frame.setLayout(Box)
self.main_frame.show()
def drawplot(self):
if self.i==0:
for pt in self.scatterpts :
pt.remove()
self.scatterpts = []
n = 500
for c, m, zl, zh in [('r', 'o', -50, -25), ('b', '^', -30, -5)]:
xs = randrange(n, 23, 32)
ys = randrange(n, 0, 100)
zs = randrange(n, zl, zh)
pt = self.ax.scatter(xs, ys, zs, c=c, marker=m, s=40)
self.scatterpts.append(pt)
self.ax.set_xlabel('X Label')
self.ax.set_ylabel('Y Label')
self.ax.set_zlabel('Z Label')
self.canvas.draw()
self.canvas.print_figure('trial.png', dpi=self.dpi)
self.i=0
def saveplot(self):
fname = QtGui.QFileDialog.getSaveFileName(self, 'Save file',
'/home/untitled.png', 'Images (*.png *.xpm *.jpg)')
self.canvas.print_figure(fname, dpi=100)
def main():
app = QtGui.QApplication(sys.argv)
ex = Example()
sys.exit(app.exec_())
if __name__ == '__main__':
main()
|
|
From: Eric F. <ef...@ha...> - 2012-03-12 20:01:26
|
On 03/12/2012 06:05 AM, Gias Uddin wrote: > I have posted the following message in StackOverflow about my problem > with graph plotting using python nltk using Matplotlib and numpy. > Advices will be tremendously helpful. Thanks in advance. > > http://stackoverflow.com/questions/9661909/python-nltk-plots-are-not-showing-up What is the result of: python -c "import matplotlib; print matplotlib.get_backend()" python -c "import matplotlib; print matplotlib.matplotlib_fname()" And when you run setup.py build, what is the first block of output showing all the libraries and dependencies? For whatever reason, it sounds like your mpl backend is not an interactive backend. Eric |
|
From: Goyo <goy...@gm...> - 2012-03-12 20:00:17
|
El día 12 de marzo de 2012 17:05, Gias Uddin <gi...@gm...> escribió: > I have posted the following message in StackOverflow about my problem with > graph plotting using python nltk using Matplotlib and numpy. > Advices will be tremendously helpful. Thanks in advance. > > http://stackoverflow.com/questions/9661909/python-nltk-plots-are-not-showing-up This usually happens when you're using a non interactive backend. What's the output of plt.get_backend()? Goyo |
|
From: Alberto D. D. <ti...@gm...> - 2012-03-12 19:13:04
|
Dear matplotlib-users, I was wondering if it is possible to plot with matplotlib an errorbar figure using color maps. Basically, I want to get a similar plot to scatter(x,y,c=z,cmap=cmap) where z is an array of numbers, but with the error bars showing the same color than their data points. Any idea, please? Thanks a lot, Alberto |
|
From: Tony Yu <ts...@gm...> - 2012-03-12 18:28:41
|
On Sun, Mar 11, 2012 at 2:13 PM, Tony Yu <ts...@gm...> wrote:
> Is it possible to draw an arrow with a dashed line?
>
> I tried using a fancy arrow patch and set the linestyle:
>
> #~~~
> import matplotlib.pyplot as plt
>
> fix, ax = plt.subplots()
> ax.set_xlim((-1,5))
> ax.set_ylim((-5,3))
>
> ax.annotate('simple', xy=(2., -1), xycoords='data',
> xytext=(100, 60), textcoords='offset points',
> size=20,
> arrowprops=dict(arrowstyle="simple",
> fc="0.6", ec="none", linestyle='dashed',
> connectionstyle="arc3,rad=0.3"),
> )
> plt.show()
> #~~~
>
> But the linestyle argument just gets ignored.
>
> Is there a way to grab the connection path object and then change that to
> a dashed line? Actually, I'm not even sure it's possible to set a linestyle
> for a Path (since dashed lines are normally Line2D). Suggestions?
>
> Thanks,
> -Tony
>
Nevermind: I though arrowstyle='simple' and arrowstyle='-|>' were the same
thing, but apparently not (I guess one draws the line as a patch, and the
other as a line). So the following works as expected:
#~~~~
import matplotlib.pyplot as plt
fix, ax = plt.subplots()
ax.set_xlim((-1,5))
ax.set_ylim((-5,3))
ax.annotate('simple', xy=(2., -1), xycoords='data',
xytext=(100, 60), textcoords='offset points',
size=20,
arrowprops=dict(arrowstyle="-|>",
fc="k", ec="k", linestyle='dashed',
connectionstyle="arc3,rad=0.3"),
)
plt.show()
#~~~
|
|
From: Eric F. <ef...@ha...> - 2012-03-12 17:59:02
|
On 03/11/2012 05:06 AM, aa wrote:
> How to Get symmetric plotting in pylab....
> i tried this code:
> # -*- coding: utf-8 -*-
>
> """
>
> Created on Sat Mar 10 20:33:32 2012
>
> @author: fajar
>
> """
>
> from numpy import linspace, meshgrid, array
>
> import matplotlib.pyplot as pl
>
> import matplotlib.ticker as tc
>
> from scipy.integrate import odeint
>
> # membuat vektor
>
> u = linspace(-5,5,25)
>
> v = linspace(-5,5,25)
>
> U,V = meshgrid(u,v)
>
> def fu(u,v): return 2*u-2*v
>
> def fv(u,v): return 2*u-3*v
>
> FU = fu(U,V)
>
> FV = fv(U,V)
>
> # sistem Persamaan:
>
> def g(x,t):
>
> y1 = 2*x[0]-1*x[1]
>
> y2 = 1*x[0]-2*x[1]
>
> return [y1, y2]
>
> time = linspace(-1,-.6,100)
>
> con = array([[1,2],[1.5,-3],[-1.5,3],[-1.5,-3]])
>
> pl.figure()
>
> Q = pl.quiver(U,V,FU,FV, units='height', hold=True)
Try using the pivot kwarg, which tells which part of the arrow will be
at the specified position. The default is "tail". You can use "middle"
to center the arrows, or "tip" to have the arrows end at your FU, FV points.
Eric
>
> #sol = odeint(g, con[0], time)
>
> #pl.plot(sol[:,0], sol[:,1], linewidth=2.1 , color='y')
>
> #
>
> #sol = odeint(g, con[1], time)
>
> #pl.plot(sol[:,0], sol[:,1], linewidth=2.1,color='b')
>
> #
>
> #sol = odeint(g, con[2], time)
>
> #pl.plot(sol[:,0], sol[:,1], linewidth=2.1 , color='m')
>
> #
>
> #sol = odeint(g, con[3], time)
>
> #pl.plot(sol[:,0], sol[:,1], linewidth=2.1 , color='r')
>
> #
>
> pl.autoscale(enable=True,axis='Both', tight=True)
>
> #tc.AutoLocator()
>
> tc.MaxNLocator(9,symmetric=True)
>
> #pl.xlabel('u', weight='bold')
>
> #pl.ylabel('v', weight='bold')
>
> #pl.title('u\'=u dan v\'=-2v',weight='bold')
>
> #pl.autoscale()z
>
> pl.show()
>
>
> ---
> but i get picture like in this attach... (aa.png)
> what i need is to Make side of figure stright... not oblique...
> like this attach (ab.png)...
> with coresponding code:
> # -*- coding: utf-8 -*-
>
> """
>
> Created on Sat Mar 10 20:33:32 2012
>
> @author: fajar
>
> """
>
> from numpy import linspace, meshgrid, array
>
> import pylab as pl
>
> from scipy.integrate import odeint
>
> # membuat vektor
>
> u = linspace(-5,5,21)
>
> v = linspace(-5,5,21)
>
> U,V = meshgrid(u,v)
>
> def fu(u,v):return u
>
> def fv(u,v):return -2*v
>
> FU = fu(U,V)
>
> FV = fv(U,V)
>
> # sistem Persamaan:
>
> def g(x,t):
>
> y1 = x[0]
>
> y2 = -2*x[1]
>
> return [y1, y2]
>
> time = linspace(0,1,100)
>
> con = array([[1.5,3],[1.5,-3],[-1.5,3],[-1.5,-3]])
>
> pl.figure()
>
> Q = pl.quiver(U,V,FU,FV, units='height', hold=True)
>
> sol = odeint(g, con[0], time)
>
> pl.plot(sol[:,0], sol[:,1], linewidth=2.1 , color='y')
>
> sol = odeint(g, con[1], time)
>
> pl.plot(sol[:,0], sol[:,1], linewidth=2.1,color='b')
>
> sol = odeint(g, con[2], time)
>
> pl.plot(sol[:,0], sol[:,1], linewidth=2.1 , color='m')
>
> sol = odeint(g, con[3], time)
>
> pl.plot(sol[:,0], sol[:,1], linewidth=2.1 , color='r')
>
> pl.autoscale(enable=True,axis='Both', tight =True)
>
> pl.xlabel('u', weight='bold')
>
> pl.ylabel('v', weight='bold')
>
> pl.title('u\'=u dan v\'=-2v',weight='bold')
>
> pl.show()
> --
> i'm sorry, i didn't well to speak english, but i guess you know what
> mean... thanks before.... :)
>
>
>
>
>
> ------------------------------------------------------------------------------
> Try before you buy = See our experts in action!
> The most comprehensive online learning library for Microsoft developers
> is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
> Metro Style Apps, more. Free future releases when you subscribe now!
> http://p.sf.net/sfu/learndevnow-dev2
>
>
>
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
|
|
From: Gias U. <gi...@gm...> - 2012-03-12 16:05:49
|
I have posted the following message in StackOverflow about my problem with graph plotting using python nltk using Matplotlib and numpy. Advices will be tremendously helpful. Thanks in advance. http://stackoverflow.com/questions/9661909/python-nltk-plots-are-not-showing-up |
|
From: Darren D. <dsd...@gm...> - 2012-03-12 15:57:17
|
Have you tried running with older checkouts on the master branch to see when the problem was introduced? You can do something like: git log --oneline --graph lib/matplotlib/backends/backend_qt4.py # or backend_qt4agg.py to see what commits were applied to master but not v1.0.x. Try bisecting the commit history to find the commit that introduced the problem (which you might want to describe in a little more detail.) Darren On Mon, Mar 12, 2012 at 10:13 AM, Keith Hughitt <kei...@gm...> wrote: > *bump* > > Anyone else encountering this problem? > > > On Tue, Mar 6, 2012 at 4:06 PM, Keith Hughitt <kei...@gm...> > wrote: >> >> Hey all, >> >> Anyone know what has changed from Maplotlib 1.0.x to 1.1.x that might >> cause a PyQt4 application to segfault? >> >> Here is the code I'm working >> on: https://github.com/sunpy/sunpy/blob/master/doc/examples/rgb_composite/rgb_composite.py >> >> It works fine with earlier versions of Matplotlib (0.99 and 1.0.x) but >> when I try and run the demo with Matplotlib 1.1 I get a segfault. >> >> Any ideas? >> >> Thanks, >> Keith >> > > > ------------------------------------------------------------------------------ > Try before you buy = See our experts in action! > The most comprehensive online learning library for Microsoft developers > is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, > Metro Style Apps, more. Free future releases when you subscribe now! > http://p.sf.net/sfu/learndevnow-dev2 > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > |
|
From: Keith H. <kei...@gm...> - 2012-03-12 14:13:30
|
*bump* Anyone else encountering this problem? On Tue, Mar 6, 2012 at 4:06 PM, Keith Hughitt <kei...@gm...>wrote: > Hey all, > > Anyone know what has changed from Maplotlib 1.0.x to 1.1.x that might > cause a PyQt4 application to segfault? > > Here is the code I'm working on: > https://github.com/sunpy/sunpy/blob/master/doc/examples/rgb_composite/rgb_composite.py > > It works fine with earlier versions of Matplotlib (0.99 and 1.0.x) but > when I try and run the demo with Matplotlib 1.1 I get a segfault. > > Any ideas? > > Thanks, > Keith > > |
|
From: John H. <jd...@gm...> - 2012-03-12 13:47:12
|
On Mon, Mar 12, 2012 at 8:04 AM, Neal Becker <ndb...@gm...> wrote: > I have a figure with a semilogy plot. I need to make more room on the > bottom to > add a bunch of figtext, which is 4 lines of text. > > With the defaults, the text overprints the x-axis. > > What is a suggested way to fix this? (Ideally, mpl would calculate the > appropriate sizes for me so things don't overprint). > > Set fig.tight_layout to automatically make room. Note there is a bug in the latest released matplotlib in which tight layout doesn't include all text objects, but this is fixed in git v1.1.x branch and will be included in the next release. You can also use the "subplots_adjust" functionality to increase the default spacing between your axes http://matplotlib.sourceforge.net/api/figure_api.html#matplotlib.figure.Figure.subplots_adjust eg, fig.subplots_adjust(left=0.3, wspace=0.2) JDH |