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



Showing results of 280

<< < 1 .. 4 5 6 7 8 .. 12 > >> (Page 6 of 12)
From: Darren D. <dd...@co...> - 2005年08月16日 19:10:34
On Tuesday 16 August 2005 5:50 am, Henry Proudhon wrote:
> Hi everyone,
>
> When you draw a picture with subplots, you can control the vertical and
> horizontal spaces between thanks to the "configure subplots" button in
> the toolbar.
> I'm sure there is a way to set the values of wspace and hspace manually
> but could'nt find it. That does not seems to be reported (yet) in the
> documentation.
>
> any clue ?
Try the axes([left, bottom, width height]) command to manually place your 
axes.
Darren
From: <cgl...@lk...> - 2005年08月16日 18:51:34
I am having a problem saving figures with any of the Agg backends.
Below is a sample of code and the resulting output. I receive the same
type of errors with any of the Agg backends ie WxAgg, TkAgg ect. With
SVG, or GD it does save. I am running python 2.3 under windows XP
matplotlib .83.2. Can you provide some guidance as to what I may have
configured wrong with the Agg backends?
Sample code run with -dAgg
 
 
 
 #!/usr/bin/env python 
 from pylab import * 
 
 plot(arange(10), color='#006400') 
 xlabel('this is a xlabel\n(with newlines!)') 
 ylabel('this is vertical\ntest', multialignment='center') 
 #ylabel('this is another!') 
 text(2, 7,'this is\nyet another test', 
 rotation=45, 
 horizontalalignment = 'center', 
 verticalalignment = 'top', 
 multialignment = 'center') 
 savefig('c:\multiline.jpg') 
 
 
 Debug output 
 
 
 loaded rc file C:\Python23\share\matplotlib\matplotlibrc 
 matplotlib version 0.83.2 
 verbose.level debug-annoying 
 interactive is False 
 platform is win32 
 loaded modules: ['pylab', '__future__', 'copy_reg', 'sre_compile', 
 'cm', 'locale', '_sre', '__main__', 'site', '__builtin__', 
 'datetime', 'thread', 'colors', 'numerix', 'encodings', 'os.path', 
 'encodings.encodings', 'matplotlib.sys', 'distutils.string', 
 'dateutil', 'matplotlib.datetime', 'strop', '_random', 'tempfile', 
 'errno', 'matplotlib.warnings', 'encodings.codecs', 'sre_constants', 
 're', 'ntpath', 'pytz.sys', 'UserDict', 'distutils.sysconfig', 
 'encodings.exceptions', 'nt', 'pytz.sets', 'math', 'stat', 
 'zipimport', 'string', 'warnings', 'encodings.types', '_codecs', 
 'sets', 'numerix.os', 'distutils.os', 'matplotlib', 
 'encodings.cp1252', 'sys', 'pytz.tzinfo', 'pytz', 'pytz.datetime', 
 'matplotlib.__future__', 'codecs', 'distutils.re', 
 'matplotlib.pytz', 'types', 'numerix.sys', 'matplotlib.dateutil', 
 '_locale', 'matplotlib.os', 'distutils', 'sre', 'bisect', 
 'matplotlib.distutils', 'signal', 'distutils.errors', 'random', 
 'linecache', 'itertools', 'time', 'exceptions', 'sre_parse', 
 'pytz.bisect', 'distutils.sys', 'os', 'matplotlib.tempfile'] 
 numerix Numeric 23.8 
 numerix Numeric 23.8 
 font search path ['C:\\Python23\\share\\matplotlib'] 
 trying fontname C:\Python23\share\matplotlib\cmex10.ttf 
 trying fontname C:\Python23\share\matplotlib\cmmi10.ttf 
 trying fontname C:\Python23\share\matplotlib\cmr10.ttf 
 trying fontname C:\Python23\share\matplotlib\VeraMono.ttf 
 trying fontname C:\Python23\share\matplotlib\cmsy10.ttf 
 trying fontname C:\Python23\share\matplotlib\VeraSeBd.ttf 
 trying fontname C:\Python23\share\matplotlib\cmtt10.ttf 
 trying fontname C:\Python23\share\matplotlib\Vera.ttf 
 $HOME=C:\Documents and Settings\cglackin 
 CONFIGDIR=C:\Documents and Settings\cglackin\.matplotlib 
 loaded ttfcache file C:\Documents and 
 Settings\cglackin\.matplotlib\ttffont.cache 
 font search path ['C:\\Python23\\share\\matplotlib'] 
 trying fontname C:\Python23\share\matplotlib\cmex10.ttf 
 trying fontname C:\Python23\share\matplotlib\cmmi10.ttf 
 trying fontname C:\Python23\share\matplotlib\cmr10.ttf 
 trying fontname C:\Python23\share\matplotlib\VeraMono.ttf 
 trying fontname C:\Python23\share\matplotlib\cmsy10.ttf 
 trying fontname C:\Python23\share\matplotlib\VeraSeBd.ttf 
 trying fontname C:\Python23\share\matplotlib\cmtt10.ttf 
 trying fontname C:\Python23\share\matplotlib\Vera.ttf 
 loaded ttfcache file C:\Documents and 
 Settings\cglackin\.matplotlib\ttffont.cache 
 matplotlib data path C:\Python23\share\matplotlib 
 backend Agg version v2.2 
 backend_agg.new_figure_manager 
 FigureCanvasAgg.print_figure 
 FigureCanvasAgg.draw 
 RendererAgg.__init__ 
 RendererAgg._get_agg_font 
 findfont failed Lucida Grande 
 findfont found Verdana, normal, normal 500, normal, 12.0 
 findfont returning C:\WINDOWS\Fonts\VERDANA.TTF 
 RendererAgg._get_agg_font 
 RendererAgg.draw_text 
 RendererAgg._get_agg_font 
 Traceback (most recent call last): 
 RendererAgg.points_to_pixels 
 File "C:\python projects\External Files\multiline.py", line 13, in 
 ? 
 savefig('c:\multiline.jpg') 
 File "C:\Python23\Lib\site-packages\matplotlib\pylab.py", line 
 773, in savefig 
 return fig.savefig(*args, **kwargs) 
 File "C:\Python23\Lib\site-packages\matplotlib\figure.py", line 
 636, in savefig 
 self.canvas.print_figure(*args, **kwargs) 
 File 
 "C:\Python23\Lib\site-packages\matplotlib\backends\backend_agg.py", 
 line 444, in print_figure 
 self.draw() 
 File 
 "C:\Python23\Lib\site-packages\matplotlib\backends\backend_agg.py", 
 line 381, in draw 
 self.figure.draw(renderer) 
 File "C:\Python23\Lib\site-packages\matplotlib\figure.py", line 
 511, in draw 
 for a in self.axes: a.draw(renderer) 
 File "C:\Python23\Lib\site-packages\matplotlib\axes.py", line 
 1387, in draw 
 self.xaxis.draw(renderer) 
 File "C:\Python23\Lib\site-packages\matplotlib\axis.py", line 552, 
 in draw 
 tick.draw(renderer) 
 File "C:\Python23\Lib\site-packages\matplotlib\axis.py", line 148, 
 in draw 
 if self.tick1On: self.tick1line.draw(renderer) 
 File "C:\Python23\Lib\site-packages\matplotlib\lines.py", line 
 399, in draw 
 markerFunc(renderer, gc, xt, yt) 
 File "C:\Python23\Lib\site-packages\matplotlib\lines.py", line 
 999, in _draw_tickup 
 path.move_to(-0.5, 0) 
 File "C:\Python23\Lib\site-packages\matplotlib\agg.py", line 809, 
 in move_to 
 def move_to(*args): return _agg.path_storage_move_to(*args) 
 TypeError: argument number 1: a 'path_t *' is expected, 
 'path_storagePtr(<agg.path_storagePtr; proxy of C++ 
 agg::path_storage instance at _208aa401_p_agg__path_storage>)' is 
 received 
 
 
CSG
______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
______________________________________________________________________
From: Henry P. <hen...@in...> - 2005年08月16日 18:50:05
Hi everyone,
When you draw a picture with subplots, you can control the vertical and 
horizontal spaces between thanks to the "configure subplots" button in 
the toolbar.
I'm sure there is a way to set the values of wspace and hspace manually 
but could'nt find it. That does not seems to be reported (yet) in the 
documentation.
any clue ?
-- 
Henry Proudhon
Postdoc Fellow
Materials Engineering
The University of British Columbia
309-3650 Stores Road
V6T-1Z4 Vancouver B.C. (Canada)
From: W. P. <w.p...@tu...> - 2005年08月16日 14:59:02
Hi,
I really like the possibility to create labels with tex support. 
Unfortunately, using this feature, svg export seems to be no longer 
available. This is sad, because creating svg's was one of my major reasons 
using matplotlib. Using latex most of the time, it was possible to create 
high quality vector based images with the possibility to change them later 
(e.g. with inkscape). I use this feature mostly for language changings of 
labels or titles.
The error message:
Traceback (most recent call last):
 File 
"/usr/lib/python2.4/site-packages/matplotlib/backends/backend_gtk.py", 
li ne 
602, in save_figure
 self.canvas.print_figure(fname)
 File 
"/usr/lib/python2.4/site-packages/matplotlib/backends/backend_gtkagg.py", 
line 114, in print_figure
 try: agg.print_figure(filename, dpi, facecolor, edgecolor, orientation)
 File 
"/usr/lib/python2.4/site-packages/matplotlib/backends/backend_agg.py", 
li ne 
458, in print_figure
 svg.print_figure(filename, dpi, facecolor, edgecolor, orientation)
 File 
"/usr/lib/python2.4/site-packages/matplotlib/backends/backend_svg.py", 
li ne 
315, in print_figure
 self.figure.draw(renderer)
 File "/usr/lib/python2.4/site-packages/matplotlib/figure.py", line 498, 
in dra w
 for a in self.axes: a.draw(renderer)
 File "/usr/lib/python2.4/site-packages/matplotlib/axes.py", line 1361, 
in draw
 self.xaxis.draw(renderer)
 File "/usr/lib/python2.4/site-packages/matplotlib/axis.py", line 544, in 
draw
 tick.draw(renderer)
 File "/usr/lib/python2.4/site-packages/matplotlib/axis.py", line 147, in 
draw
 if self.label1On: self.label1.draw(renderer)
 File "/usr/lib/python2.4/site-packages/matplotlib/text.py", line 847, in 
draw
 self._mytext.draw(renderer)
 File "/usr/lib/python2.4/site-packages/matplotlib/text.py", line 342, in 
draw
 renderer.draw_tex(gc, x, y, line,
AttributeError: RendererSVG instance has no attribute 'draw_tex'
Any idea, how to bring svg export back to work again ?
Regards
Werner
From: Nils W. <nw...@me...> - 2005年08月16日 07:30:17
Hi all,
How do I install the missing software ?
/usr/lib/python2.4/site-packages/matplotlib/backends/backend_gtk.py:990:
GtkWarning: Could not find the icon 'gnome-fs-home'. The 'hicolor' theme
was not found either, perhaps you need to install it.
You can get a copy from:
 http://freedesktop.org/Software/icon-theme/releases
 buttons)
Nils
From: John H. <jdh...@ac...> - 2005年08月15日 15:28:11
>>>>> "Darren" == Darren Dale <dd...@co...> writes:
 Darren> You can set the formatter back to the old behavior like
 Darren> this:
 Darren> from ticker import OldScalarFormatter a=axes()
 Darren> a.yaxis.set_major_formatter(OldScalarFormatter())
But will that help? It will still fall over to exponential notation
at 1e4. Perhaps a custom formatter will work better for you, eg
examples/custom_ticker1.py.
JDH
From: Darren D. <dd...@co...> - 2005年08月15日 15:05:27
On Monday 15 August 2005 10:18 am, Maria Khomenko wrote:
> Hi,
>
> I noticed that the default scalar formatter turns on scientific notation
> once the numbers are over 10000. I was wondering if there is a way to turn
> off this option
> or at least change the settings to give matplotlib a different cut-off
> point for switching into scientific notation.
>
> I would appreciate some help with this,
You can set the formatter back to the old behavior like this:
from ticker import OldScalarFormatter
a=axes()
a.yaxis.set_major_formatter(OldScalarFormatter())
-- 
Darren S. Dale
Bard Hall
Department of Materials Science and Engineering
Cornell University
Ithaca, NY. 14850
dd...@co...
http://people.ccmr.cornell.edu/~dd55/
From: Maria K. <mar...@ut...> - 2005年08月15日 14:18:50
Hi,
I noticed that the default scalar formatter turns on scientific notation once
the numbers are over 10000. I was wondering if there is a way to turn off this
option 
or at least change the settings to give matplotlib a different cut-off point for
switching into scientific notation. 
I would appreciate some help with this,
Thanks,
Maria
From: Ryan K. <rya...@co...> - 2005年08月15日 01:54:39
Sorry, I answered this one but did not reply to all, so it didn't go to 
the list. The equivalent matplotlib functions are xlim and ylim.
Ryan
John Hunter wrote:
>>>>>>"Nils" == Nils Wagner <nw...@me...> writes:
> 
> 
> Nils> Hi all, How can I replace xplt.limits(xl,xu,yl,yu) in
> Nils> matplotlib ?
> 
> Can you describe how this function performs and what the arguments
> mean? Not all matplotlib users know scipy.xplt.
> 
> JDH
> 
> 
> -------------------------------------------------------
> SF.Net email is Sponsored by the Better Software Conference & EXPO
> September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
> Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
> Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
> 
From: Henry P. <hen...@in...> - 2005年08月14日 23:12:05
Hi Michael,
I'd the same kind of error installing pygtk on my Mandriva 10.2 (I'm a 
happy new linux user :-) )
The error occured checking Glib, and I had to specify the path of the 
.pc file manually by doing (I'm using bash):
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig/
where the file pygtk.pc was (it previously looked in /usr/lib/pkgconfig/)...
That solved the problem, I don't know if it can help you there, looks 
like you tried already, but it seemed to me it is a very similar problem...
Henry
Michael Nandris a écrit :
> Greetings, I have tried installing matplotlib from source, and also 
> from debian packages, and get the same error:
>
> >>> import pylab
>
> No module named pygtk
>
> PyGTK version 1.99.16 or greater is required to run the GTK Matplotlib 
> backends
>
> After sucessfully installing glib and atk using checkinstall, I tried 
> installing pygtk:
>
> ./configure
>
> .... lots of output...
>
> ... ...
>
> checking for GLIB - version >= 2.4.0... yes (version 2.6.3) <--- (so 
> checkinstall works)
>
> checking for atk >= 1.0.0... Package atk was not found in the 
> pkg-config search path.
>
> Perhaps you should add the directory containing `atk.pc' to the 
> PKG_CONFIG_PATH environment variable
>
> No package 'atk' found <--- ?
>
> configure: error: maybe you want the pygtk-2-2 branch?
>
> atk is installed and registered under dpkg -l, and after running 
> updatedb, atk.pc was found in /usr/local/lib/pkgconfig/atk.pc but is 
> not picked up by pkgconfig (same error as above).
>
> I temporarily set PKG_CONFIG_PATH=/usr/local/lib/pkgconfig followed by 
> ./configure and got exactly the same error as above (!*??!@!!!)
>
> pkg-config 0.15.0-4 is registered as a package, but I haven't got a 
> clue what it does or how to use it.
>
> Help, I need to get away from windows!
>
> Any advice?
>
> appreciations in advance
>
> Michael Nandris
>
> ------------------------------------------------------------------------
> Start your day with Yahoo! - make it your home page 
> <http://us.rd.yahoo.com/evt=34442/*http://www.yahoo.com/r/hs> 
-- 
Henry Proudhon
Postdoc Fellow
Materials Engineering
The University of British Columbia
309-3650 Stores Road
V6T-1Z4 Vancouver B.C. (Canada)
From: John H. <jdh...@ac...> - 2005年08月14日 21:34:29
>>>>> "Nils" == Nils Wagner <nw...@me...> writes:
 Nils> Hi all, How can I replace xplt.limits(xl,xu,yl,yu) in
 Nils> matplotlib ?
Can you describe how this function performs and what the arguments
mean? Not all matplotlib users know scipy.xplt.
JDH
From: John H. <jdh...@ac...> - 2005年08月13日 13:34:56
>>>>> "Michael" == Michael Nandris <sui...@ya...> writes:
 Michael> Greetings, I have tried installing matplotlib from
 Michael> source, and also from debian packages, and get the same
 Michael> error:
It is easy to get the wrong debian package. Did you do this:
 Add the following to /etc/apt/sources.list
 deb http://anakonda.altervista.org/debian packages/
 deb-src http://anakonda.altervista.org/debian sources/
 And then run:
 > sudo apt-get update
 > sudo apt-get install python-matplotlib python-matplotlib-doc
If you have a successful install, you should be able to do
 >>> import matplotlib
 >>> print matplotlib.__version__
and get 0.82
 >>>> import pylab
 Michael> No module named pygtk
 Michael> PyGTK version 1.99.16 or greater is required to run the
 Michael> GTK Matplotlib backends
Note, matplotlib uses GTKAgg as the default backend, but I if you are
having trouble, I suggest trying the TkAgg, QtAgg or WXAgg backends,
which usew Tkinter, pyqt, and wxpython. I suspect all of these are
available in your debian distribution. See
http://matplotlib.sf.net/matplotlibrc for more information -- this is
where you choose your backend. To make matters a little confusing,
between matplotlib 0.82 and 0.83 we changed the default location for
the rc file. 
 0.82: ~/.matplotlibrc
 0.83: ~/.matplotlib/matplotlibrc
Make sure you name it accordingly.
 Michael> After sucessfully installing glib and atk using
 Michael> checkinstall, I tried installing pygtk:
 Michael> checking for atk >= 1.0.0... Package atk was not found in
 Michael> the pkg-config search path.
I wonder if you also need all the -dev packages, eg gtk2-dev and so
forth.
Before you go and install a bunch of gtk stuff from src, you may want
to pursue getting the debian stuff working for you. I know from
experience that it is easy to get a system out of whack if you have
some gtk stuff in /usr, more recent versions in /usr/local, and if you
are not very careful you are soon in a world of pain and considering a
clean reinstall. Especially if you are not an experienced linux user,
as you indicated below.
 Michael> Help, I need to get away from windows! 
I use ubuntu linux -- if you are just getting started with linux and
haven't fully committed to a distribution I highly recommend it. It's
an easy install, has good hardware support, a very modern desktop, and
so on. It also has a good live/boot CD so you can test it out without
committing to it.
I maintain my own ubuntu debian packages for matplotlib and other
scientific computing packages for use on my own computers -- most of
the stuff I do typically requires having CVS versions of everything so
using the standard debs is not an option for me. If you end up going
with ubuntu, let me know and I'll send you the repository information.
JDH
From: Michael N. <sui...@ya...> - 2005年08月13日 12:37:41
Greetings, I have tried installing matplotlib from source, and also from debian packages, and get the same error:
>>> import pylab
No module named pygtk
PyGTK version 1.99.16 or greater is required to run the GTK Matplotlib backends
After sucessfully installing glib and atk using checkinstall, I tried installing pygtk:
./configure
.... lots of output...
... ...
checking for GLIB - version >= 2.4.0... yes (version 2.6.3) <--- (so checkinstall works)
checking for atk >= 1.0.0... Package atk was not found in the pkg-config search path.
Perhaps you should add the directory containing `atk.pc' to the PKG_CONFIG_PATH environment variable
No package 'atk' found <--- ?
configure: error: maybe you want the pygtk-2-2 branch?
atk is installed and registered under dpkg -l, and after running updatedb, atk.pc was found in /usr/local/lib/pkgconfig/atk.pc but is not picked up by pkgconfig (same error as above). 
I temporarily set PKG_CONFIG_PATH=/usr/local/lib/pkgconfig followed by ./configure and got exactly the same error as above (!*??!@!!!)
pkg-config 0.15.0-4 is registered as a package, but I haven't got a clue what it does or how to use it. 
Help, I need to get away from windows! 
Any advice?
appreciations in advance
Michael Nandris
		
---------------------------------
 Start your day with Yahoo! - make it your home page 
From: Alan G I. <ai...@am...> - 2005年08月12日 21:29:40
On 2005年8月12日, Gary apparently wrote: 
> TeX strings are 
> sometimes not rendered correctly unless I specify 
> a fontsize parameter: xlabel(r'Real part $\nu_r$', > fontsize=16) 
I added your comment to the Wiki list of hangups:
http://www.scipy.org/wikis/topical_software/UsingTex
Cheers,
Alan Isaac
From: John H. <jdh...@ac...> - 2005年08月12日 18:55:59
>>>>> "Nils" == Nils Wagner <nw...@me...> writes:
 Nils> Hi all, I have some problems with xlabel. Sometimes the text
 Nils> is rotated (see ex3.png), but for what reason ?
 Nils> figure(3) plot(real(data_eig),imag(data_eig),'b.')
 Nils> xlabel(r'Real part $\nu_r$') ylabel(r'Imaginary $\nu_i$')
 Nils> savefig('ex3.png')
Hi Nils,
After thinking about this and reading through the matplotlib src code,
I have been able to infer that you
 * are working with a *Agg backend
 * have set the rc param usetex=True in your rc file or called
 rc('text', usetex=True) before the indicated commands
 * you have previously called code (perhaps in figure(1) or figure(2)
 not shown) with the x and y axes labels reversed. 
The reason for the bug is that backend agg caches the dvipng
information, and the key to this dictionary cache is not using the
angle (it should). The following code reproduces the bug in *Agg
 rc('text', usetex=True)
 plot(rand(10), rand(10), 'b.')
 xlabel(r'Real part $\nu_r$')
 ylabel(r'Imaginary $\nu_i$')
 ylabel(r'Real part $\nu_r$')
 xlabel(r'Imaginary $\nu_i$')
 
The fix: in matplotlib/backends/backend_agg.py on or around line 268,
replace
 key = s, size, dpi, rgb
 im = self.texd.get(key)
with 
 key = s, size, dpi, rgb, angle
 im = self.texd.get(key)
And next time, provide enough information that someone with less than
superhuman inferential powers can reproduce the bug. A complete
example which reproduces it with any non-standard rc settings and the
output of your script run with --verbose-helpful would be much
obliged.
JDH
From: John B. <by...@bu...> - 2005年08月12日 18:38:13
Attachments: matplotlib_question.py
Hello all,
I'm attempting to overlay a vector field over an image. I have a vector
for every pixel. I'd like to be able to be able to only plot a subset of
those vectors. For example, only plot every fifth vector in its place.
I've attached code that plots every vector. Any suggestions on how to
modify it to plot every Nth vector? 
Thanks!!
JB
--
John Byrnes (by...@bu...)
Graduate Student
Electrical Engineering
Boston University
From: Gary <pa...@in...> - 2005年08月12日 16:06:46
I can't reproduce this behavior, but I have found that TeX strings are 
sometimes not rendered correctly unless I specify a fontsize parameter: 
 xlabel(r'Real part $\nu_r$', fontsize=16) for example.
-gary
Nils Wagner wrote:
>Hi all,
>
>I have some problems with xlabel. Sometimes the text is rotated (see
>ex3.png), but for what reason ?
>
>figure(3)
>plot(real(data_eig),imag(data_eig),'b.')
>xlabel(r'Real part $\nu_r$')
>ylabel(r'Imaginary $\nu_i$')
>savefig('ex3.png')
>
>Nils
>
> 
>
> 
>
>
> ------------------------------------------------------------------------
>
From: Nils W. <nw...@me...> - 2005年08月12日 14:18:59
Hi all,
How can I replace xplt.limits(xl,xu,yl,yu) in matplotlib ?
Nils
 
From: Nils W. <nw...@me...> - 2005年08月12日 14:10:14
Attachments: ex3.png
Hi all,
I have some problems with xlabel. Sometimes the text is rotated (see
ex3.png), but for what reason ?
figure(3)
plot(real(data_eig),imag(data_eig),'b.')
xlabel(r'Real part $\nu_r$')
ylabel(r'Imaginary $\nu_i$')
savefig('ex3.png')
Nils
 
From: Carlos P. <ca...@li...> - 2005年08月12日 13:43:53
>> It works almost ok, but there are some quirks when repainting the 
>> window, (i) sometimes
>> the rulers are not erased and (ii) they are not redrawn when the 
>> window is fully repainted,
>> for example after being covered/discovered by other window. I want to 
>> put the
>> ruler redrawing routine into the paint event handler in order to see 
>> if this solves the
>> problem (which is caused by odd sequences of xor or invert -in my 
>> case- line plots).
>
> I suspect that this is exactly what you need to do to solve the 
> problem. My approach in wxmpl has been to stop drawing the crosshairs 
> when the mouse is outside of the plot panel, which has allowed me to 
> sidestep this particular problem.
I have been experimenting a little using Blit() in the PaintDC to save 
the rulers
background to a MemoryDC before drawing them and then restoring this
buffer again via the "inverse" Blit(). It works pretty well, don't have the
odd-xor-sequence problem and the lines' colours are not altered by xoring
with the colours below.
Once I decide how to implement my widget (which include the rulers
and some map-coordination between two function plots) I will send you
my code as an example. Perhaps it could be useful for someone.
Regards,
Carlos
	
	
		
___________________________________________________________ 
1GB gratis, Antivirus y Antispam 
Correo Yahoo!, el mejor correo web del mundo 
http://correo.yahoo.com.ar 
From: Jeff W. <js...@fa...> - 2005年08月12日 13:15:24
zxo102 wrote:
> Hi there,
> I would like to unsubscribe matplotlib. Anybody knows how to do 
> that? Thanks
> 
> Ouyang
Follow the instructions at 
http://lists.sourceforge.net/lists/listinfo/matplotlib-users 
(specifically, at the bottom of the page where it says 'Matplotlib-users 
Subscribers').
-Jeff
-- 
Jeffrey S. Whitaker Phone : (303)497-6313
NOAA/OAR/CDC R/CDC1 FAX : (303)497-6449
325 Broadway Web : http://www.cdc.noaa.gov/~jsw
Boulder, CO, USA 80305-3328 Office: Skaggs Research Cntr 1D-124
From: zxo102 <zx...@ya...> - 2005年08月12日 00:53:03
Hi there,
 I would like to unsubscribe matplotlib. Anybody knows how to do that? Thanks
 
Ouyang
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
From: Ken M. <mc...@ii...> - 2005年08月11日 21:29:31
On Aug 10, 2005, at 2:54 PM, Jeff Peery wrote:
> Hello, I am running WXAgg in a wxPython application.=A0 Within my=20
> application I have embedded a python shell.=A0 =46rom within the shell =
I=20
> want to run pyla. Will this conflict with WXAgg running in my WXApp?=20=
> Thanks.
I think everything should work okay, so long as you setup matplotlib to=20=
use WXAgg as the backend before pylab is imported:
	import matplotlib
	matplotlib.use('WXAgg')
	import pylab
However, pylab will manage its figure windows separately from the=20
FigureCanvasWxAgg instances you embed in your application. If you need=20=
tighter integration (e.g. opening new figures in tabs of a window you=20
control), you'll need to write your own subclass of FigureManagerWx and=20=
make the WXAgg backend use it. I'm not quite clear as to how you go=20
about doing so, but I'll be happy to help if I can.
Another caveat is that there is no way to make the figure frames=20
children of another frame (e.g. the main window of your application). =20=
wxPython applications usually hang around until all of the parentless=20
frames have been closed, so you could end up with an application that=20
stays open until all of the figure frames have been closed. To prevent=20=
this, you'll need configure your wxApp instance to exit when the top=20
window is closed:
	class MyApp(wx.PySimpleApp):
		def OnInit(self):
			wx.PySimpleApp.OnInit(self)
			frame =3D MyMainFrame() # create the main window
			self.SetTopWindow(frame)
			self.SetExitOnFrameDelete(True)
Ken=
From: John H. <jdh...@ac...> - 2005年08月11日 20:54:53
>>>>> "Ken" == Ken McIvor <mc...@ii...> writes:
 Ken> Since you're using wxPython, you've given my a plumb
 Ken> opportunity to repeat what is in danger of becoming my
 Ken> litany:
 Ken> 	You should check out Matt Newville's MPlot package and
 Ken> my wxmpl module, both of which exist to simply embedding
 Ken> matplotlib in wxPython applications. Both of them provide
 Ken> user interaction bells and whistles, including crosshairs
 Ken> around the mouse position.
Perhaps a wiki entry on using mpl with wx would be helpful.
 http://www.scipy.org/wikis/topical_software/MatplotlibCookbook
JDH
From: Ken M. <mc...@ii...> - 2005年08月11日 19:10:11
On Aug 10, 2005, at 1:41 PM, Carlos Pita wrote:
>> The other alternative is to use GUI native drawing on top of the
>> matplotlib FigureCanvas; for the wx backend, there is an example
>> illustrating this in examples/wxcursor_demo.py.
Since you're using wxPython, you've given my a plumb opportunity to 
repeat what is in danger of becoming my litany:
	You should check out Matt Newville's MPlot package and my wxmpl 
module, both of which exist to 	simply embedding matplotlib in wxPython 
applications. Both of them provide user interaction 	bells and 
whistles, including crosshairs around the mouse position.
Each of the libraries takes a different approach to plotting and has 
different benefits and drawbacks, so I encourage you to evaluate each 
of them and select the one that best meets your needs. Even if neither 
of them fit the bill, you'll hopefully be able to learn something from 
looking through the source.
> It works almost ok, but there are some quirks when repainting the 
> window, (i) sometimes
> the rulers are not erased and (ii) they are not redrawn when the 
> window is fully repainted,
> for example after being covered/discovered by other window. I want to 
> put the
> ruler redrawing routine into the paint event handler in order to see 
> if this solves the
> problem (which is caused by odd sequences of xor or invert -in my 
> case- line plots).
I suspect that this is exactly what you need to do to solve the 
problem. My approach in wxmpl has been to stop drawing the crosshairs 
when the mouse is outside of the plot panel, which has allowed me to 
sidestep this particular problem.
> The wx canvas implements its paint event hadler as a private _OnPaint 
> method.
> As long as encapsulation is a concern I wouldn't invoke it directly.
While I appreciate your concerns about breaking encapsulation, I don't 
think you'll have any problems overriding _OnPaint() to draw your 
crosshairs after the plot has been repainted. As I indicated earlier, 
there are ways to design around needing to do so, but they entail not 
drawing crosshairs when the mouse is not in the window.
Ken
3 messages has been excluded from this view by a project administrator.

Showing results of 280

<< < 1 .. 4 5 6 7 8 .. 12 > >> (Page 6 of 12)
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 によって変換されたページ (->オリジナル) /