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

Showing results of 295

<< < 1 .. 4 5 6 7 8 .. 12 > >> (Page 6 of 12)
From: Ryan M. <rm...@gm...> - 2009年02月20日 17:18:54
On Fri, Feb 20, 2009 at 8:11 AM, Armin Moser
<arm...@st...>wrote:
> Hi,
>
> I would like to interpolate an array of shape (801,676) to regularily
> spaced datapoints using griddata. This interpolation is quick if the
> (x,y) supporting points are computed as X,Y = meshgrid(x,y). If this
> condition is not fullfilled the delaunay triangulation is extremely
> slow, i.e. not useable. Is this a known property of the used
> triangulation? The triangulation can be performed with matlab without
> any problems.
>
If you're not using meshgrid, how do you compute x,y? A small complete
example would be helpful.
Ryan
-- 
Ryan May
Graduate Research Assistant
School of Meteorology
University of Oklahoma
Sent from: Norman Oklahoma United States.
From: Jeff W. <js...@fa...> - 2009年02月20日 15:52:56
Armin Moser wrote:
> Hi,
>
> I would like to interpolate an array of shape (801,676) to regularily
> spaced datapoints using griddata. This interpolation is quick if the
> (x,y) supporting points are computed as X,Y = meshgrid(x,y). If this
> condition is not fullfilled the delaunay triangulation is extremely
> slow, i.e. not useable. Is this a known property of the used
> triangulation? The triangulation can be performed with matlab without
> any problems.
>
> Armin
> 
Armin: You could try installing the natgrid toolkit and see if that 
speeds up griddata at all. If not, please post a test script with data 
and maybe we can figure out what is going on.
-Jeff
-- 
Jeffrey S. Whitaker Phone : (303)497-6313
Meteorologist FAX : (303)497-6449
NOAA/OAR/PSD R/PSD1 Email : Jef...@no...
325 Broadway Office : Skaggs Research Cntr 1D-113
Boulder, CO, USA 80303-3328 Web : http://tinyurl.com/5telg
From: Armin M. <arm...@st...> - 2009年02月20日 14:53:10
Hi,
I would like to interpolate an array of shape (801,676) to regularily
spaced datapoints using griddata. This interpolation is quick if the
(x,y) supporting points are computed as X,Y = meshgrid(x,y). If this
condition is not fullfilled the delaunay triangulation is extremely
slow, i.e. not useable. Is this a known property of the used
triangulation? The triangulation can be performed with matlab without
any problems.
Armin
From: G. A. <gio...@gm...> - 2009年02月20日 11:02:20
Thanks Andrew, conceptually it's clear. Now I have to code it :)
I will have a look to SimPy, and also to SciPy/NumPy
I will let you know how it's going on.
2009年2月20日 Andrew Straw <str...@as...>:
> G. Allegri wrote:
>>
>> Hi Andrew.
>> With dist(point_i,polynomial_curve) do you mean point_i belonging to
>> the Line 2 set of points and pol_curve as Line 1?
>
> yes
>
>> In this case it
>> could be reasonably ok for me. How can I derive the closed form for
>> dist()? Excuse my ignorance with geometry....
>>
>
> Take the equation for line 1parameterized by s. Something like f(s) = (x,y)
> = (as**2 + bs +c, ds**2 + es + f ) for your polynomial model. Now, the
> distance for that point on line 1 from point i is dist(point_i, f(s)), where
> dist can be Euclidean distance, for example.
>
> So, the question is what value of s minimizes the distance. Since this
> function will be smallest at an inflection, just take the derivative of your
> distance function and solve for it to be equal to zero. Hopefully this
> function will be convex and you'll have only one zero, which will tell you
> the value of s where distance is a minimum. Otherwise, pick the inflection
> at the closest distance. Finally, repeat for all points i and sum the
> results.
>
> Hopefully that helps on the conceptual side. Sympy will be more useful than
> matplotlib on the coding side...
>
From: Andrew S. <str...@as...> - 2009年02月20日 10:32:43
G. Allegri wrote:
> Hi Andrew.
> With dist(point_i,polynomial_curve) do you mean point_i belonging to
> the Line 2 set of points and pol_curve as Line 1?
yes
> In this case it
> could be reasonably ok for me. How can I derive the closed form for
> dist()? Excuse my ignorance with geometry....
> 
Take the equation for line 1parameterized by s. Something like f(s) = 
(x,y) = (as**2 + bs +c, ds**2 + es + f ) for your polynomial model. Now, 
the distance for that point on line 1 from point i is dist(point_i, 
f(s)), where dist can be Euclidean distance, for example.
So, the question is what value of s minimizes the distance. Since this 
function will be smallest at an inflection, just take the derivative of 
your distance function and solve for it to be equal to zero. Hopefully 
this function will be convex and you'll have only one zero, which will 
tell you the value of s where distance is a minimum. Otherwise, pick the 
inflection at the closest distance. Finally, repeat for all points i and 
sum the results.
Hopefully that helps on the conceptual side. Sympy will be more useful 
than matplotlib on the coding side...
From: G. A. <gio...@gm...> - 2009年02月20日 08:51:26
Hi Andrew.
With dist(point_i,polynomial_curve) do you mean point_i belonging to
the Line 2 set of points and pol_curve as Line 1? In this case it
could be reasonably ok for me. How can I derive the closed form for
dist()? Excuse my ignorance with geometry....
From: Andrew S. <str...@as...> - 2009年02月20日 06:21:36
G. Allegri wrote:
> Hello list,
> I'm completely new to matplotlib and I'm not a computer scientist (not
> a good starting point!) but I need to solve a geometric/graphical
> problem.
> I've been asked to find a method, in Python, to find the distance
> between a 2D polynomial curve, derived from least squares
> interpolation on a set of points, and a curve locallly interpolating
> another set of points.
Do you really need the distance to be relative to the interpolated 
curve? Why not to the points which are being interpolated? Then the 
answer is just:
Sum_i dist(point_i,polynomial_curve)
Where dist() can be arrived at in closed form...
Otherwise, I guess it would depend on the interpolation, which you 
didn't really specify.
> 
> - the starting line is a smooth line, while the second should
> describe a path passing exactly thorugh the given points.
> - the distance should be the one along the normal to the first line
> 
> I attach a sketch to explain this.
> 
> Is there an heuristic, an algorithm, to solve this problem in an
> efficient way (I have to apply it to thousands couples of sets from
> sonar and seismic acquisitions)? Is the mapltolip API useful for this?
> 
> Thanks in advance,
> Giovanni
> 
> 
> ------------------------------------------------------------------------
> 
> 
> ------------------------------------------------------------------------
> 
> ------------------------------------------------------------------------------
> Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
> -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
> -Strategies to boost innovation and cut costs with open source participation
> -Receive a 600ドル discount off the registration fee with the source code: SFAD
> http://p.sf.net/sfu/XcvMzF8H
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
From: Eric F. <ef...@ha...> - 2009年02月20日 01:16:52
per freem wrote:
> hi all,
> 
> when plotting a simple scatter plot in matlab, points that overlap will 
> cross in each other -- if i plot
> 
> scatter(randn(1,1000),randn(1,1000))
> 
> then no point will be fully "on top" of the other -- if they overlap, 
> then their edges will cross and they will look like tiny venn diagrams.
> 
> in matplotlib, this is not the case, and points that overlap are placed 
> on top of each other. for example if i use:
> x = randn(1,1000)
> plot(x, x, 'bo')
> 
> how can i fix it so that it looks like matlab and points cross?
So you want the interiors of the points to be transparent? Add the 
keyword argument mfc='none'. I may be misunderstanding the desired 
effect, however.
> 
> more importantly, the above command in matplotlib generates many many 
> line objects and takes forever to render. if i don't specify 'bo' and 
Again, you are using 2-D arrays when you should be using 1-D. In 
matlab, everything is a 2-D matrix (or it used to be, until higher 
dimensions were clumsily patched in). Numpy is designed to use as many 
or as few dimensions as you need. Mpl plot(x, y) with x and y being MxN 
is assuming each of the N columns is a line, so it is plotting N 
lines--as well as cycling through the colors, one per "line", if you 
don't explicitly give a color.
> simply call plot(x, x, 'o') it makes every point in a *different color*. 
> why is that? how can i change that? i feel like i must be doing 
> something wrong here.
It's just a Matlab hangover--a common malady, painful but rarely fatal.
Eric
From: Eric F. <ef...@ha...> - 2009年02月20日 01:03:20
per freem wrote:
> hi all,
> 
> i'm trying to do something extremely simple, namely print a scatter plot 
> of two random arrays:
> 
> import matplotlib.plt as plt
> from numpy.random import *
> 
> x = rand(1,10)
> scatter(x, x)
> 
> this fails with the error:
> 
> ValueError: Offsets array must be Nx2
> 
> what is happening here? are arrays somehow weird? do they not behave 
> like lists? any info on this will be greatly appreciated.
Your "x" is 2-D; what you want is rand(10); or you can do 
scatter(x.ravel(), x.ravel()).
Your example does point to a bug in scatter, however; it should not be 
failing with an obscure error message like that. (In mpl from svn trunk 
it still fails, but with a different obscure error message.) I don't 
know any good reason why it should not be able to handle the 2-D inputs. 
 I will take a look.
Eric
> 
> thank you.
> 
> 
> ------------------------------------------------------------------------
> 
> ------------------------------------------------------------------------------
> Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
> -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
> -Strategies to boost innovation and cut costs with open source participation
> -Receive a 600ドル discount off the registration fee with the source code: SFAD
> http://p.sf.net/sfu/XcvMzF8H
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
From: per f. <per...@gm...> - 2009年02月20日 00:26:55
hi all,
when plotting a simple scatter plot in matlab, points that overlap will
cross in each other -- if i plot
scatter(randn(1,1000),randn(1,1000))
then no point will be fully "on top" of the other -- if they overlap, then
their edges will cross and they will look like tiny venn diagrams.
in matplotlib, this is not the case, and points that overlap are placed on
top of each other. for example if i use:
x = randn(1,1000)
plot(x, x, 'bo')
how can i fix it so that it looks like matlab and points cross?
more importantly, the above command in matplotlib generates many many line
objects and takes forever to render. if i don't specify 'bo' and simply call
plot(x, x, 'o') it makes every point in a *different color*. why is that?
how can i change that? i feel like i must be doing something wrong here.
 thanks.
From: per f. <per...@gm...> - 2009年02月19日 23:51:14
hi all,
i'm trying to do something extremely simple, namely print a scatter plot of
two random arrays:
import matplotlib.plt as plt
from numpy.random import *
x = rand(1,10)
scatter(x, x)
this fails with the error:
ValueError: Offsets array must be Nx2
what is happening here? are arrays somehow weird? do they not behave like
lists? any info on this will be greatly appreciated.
thank you.
From: Craig F. <oa...@ya...> - 2009年02月19日 23:32:29
I am using matplotlib-0.98.5.2 and getting a strange crash when trying to show() a window with semilog or log-log axes. Here is a simple script that will cause the crash:
import pylab
from numpy import *
x = arange(1., 10., 0.1)
y = x**2
pylab.semilogx(x,y)
pylab.show()
At the end of this message is a sample of the output. I had to cut it down because it's apparently stuck in a loop in pyparsing.py and keeps outputting the same repetitive message. Did I find a bug here? Any suggestions would be appreciated.
 Craig
Sample output:
------------------------------------------------------
 File "//usr/lib/python2.4/site-packages/matplotlib/backends/backend_gtk.py", line 352, in expose_event
 self._render_figure(self._pixmap, w, h)
 File "//usr/lib/python2.4/site-packages/matplotlib/backends/backend_gtkagg.py", line 75, in _render_figure
 FigureCanvasAgg.draw(self)
 File "//usr/lib/python2.4/site-packages/matplotlib/backends/backend_agg.py", line 279, in draw
 self.figure.draw(self.renderer)
 File "//usr/lib/python2.4/site-packages/matplotlib/figure.py", line 772, in draw
 for a in self.axes: a.draw(renderer)
 File "//usr/lib/python2.4/site-packages/matplotlib/axes.py", line 1601, in draw
 a.draw(renderer)
 File "//usr/lib/python2.4/site-packages/matplotlib/axis.py", line 710, in draw
 tick.draw(renderer)
 File "//usr/lib/python2.4/site-packages/matplotlib/axis.py", line 193, in draw
 self.label1.draw(renderer)
 File "//usr/lib/python2.4/site-packages/matplotlib/text.py", line 452, in draw
 bbox, info = self._get_layout(renderer)
 File "//usr/lib/python2.4/site-packages/matplotlib/text.py", line 252, in _get_layout
 w, h, d = renderer.get_text_width_height_descent(
 File "//usr/lib/python2.4/site-packages/matplotlib/backends/backend_agg.py", line 152, in get_text_width_height_descent
 ox, oy, width, height, descent, fonts, used_characters = \
 File "//usr/lib/python2.4/site-packages/matplotlib/mathtext.py", line 2808, in parse
 box = self._parser.parse(s, font_output, fontsize, dpi)
 File "//usr/lib/python2.4/site-packages/matplotlib/mathtext.py", line 2259, in parse
 self._expression.parseString(s)
 File "/usr/lib/python2.4/site-packages/pyparsing.py", line 1065, in parseString
 loc, tokens = self._parse( instring, 0 )
 File "/usr/lib/python2.4/site-packages/pyparsing.py", line 998, in _parseCache
 value = self._parseNoCache( instring, loc, doActions, callPreParse )
 File "/usr/lib/python2.4/site-packages/pyparsing.py", line 941, in _parseNoCache
 loc,tokens = self.parseImpl( instring, preloc, doActions )
 File "/usr/lib/python2.4/site-packages/pyparsing.py", line 2577, in parseImpl
 return self.expr._parse( instring, loc, doActions, callPreParse=False )
 File "/usr/lib/python2.4/site-packages/pyparsing.py", line 998, in _parseCache
 value = self._parseNoCache( instring, loc, doActions, callPreParse )
 File "/usr/lib/python2.4/site-packages/pyparsing.py", line 941, in _parseNoCache
 loc,tokens = self.parseImpl( instring, preloc, doActions )
 File "/usr/lib/python2.4/site-packages/pyparsing.py", line 2325, in parseImpl
 loc, exprtokens = e._parse( instring, loc, doActions )
 File "/usr/lib/python2.4/site-packages/pyparsing.py", line 998, in _parseCache
 value = self._parseNoCache( instring, loc, doActions, callPreParse )
 File "/usr/lib/python2.4/site-packages/pyparsing.py", line 941, in _parseNoCache
 loc,tokens = self.parseImpl( instring, preloc, doActions )
 File "/usr/lib/python2.4/site-packages/pyparsing.py", line 2690, in parseImpl
 loc, tokens = self.expr._parse( instring, loc, doActions, callPreParse=False )
 File "/usr/lib/python2.4/site-packages/pyparsing.py", line 998, in _parseCache
 value = self._parseNoCache( instring, loc, doActions, callPreParse )
 File "/usr/lib/python2.4/site-packages/pyparsing.py", line 941, in _parseNoCache
 loc,tokens = self.parseImpl( instring, preloc, doActions )
 File "/usr/lib/python2.4/site-packages/pyparsing.py", line 2325, in parseImpl
 loc, exprtokens = e._parse( instring, loc, doActions )
 File "/usr/lib/python2.4/site-packages/pyparsing.py", line 998, in _parseCache
 value = self._parseNoCache( instring, loc, doActions, callPreParse )
 File "/usr/lib/python2.4/site-packages/pyparsing.py", line 941, in _parseNoCache
------------- snip -------------
File "/usr/lib/python2.4/site-packages/pyparsing.py", line 2309, in parseImpl
 loc, resultlist = self.exprs[0]._parse( instring, loc, doActions, callPreParse=False )
 File "/usr/lib/python2.4/site-packages/pyparsing.py", line 998, in _parseCache
 value = self._parseNoCache( instring, loc, doActions, callPreParse )
 File "/usr/lib/python2.4/site-packages/pyparsing.py", line 941, in _parseNoCache
 loc,tokens = self.parseImpl( instring, preloc, doActions )
 File "/usr/lib/python2.4/site-packages/pyparsing.py", line 2321, in parseImpl
 raise ParseSyntaxException(pe)
 File "/usr/lib/python2.4/site-packages/pyparsing.py", line 230, in __init__
 super(ParseSyntaxException, self).__init__(
TypeError: super() argument 1 must be type, not classobj
 
From: G. A. <gio...@gm...> - 2009年02月19日 13:35:49
Attachments: linesnormalsketch.png
Hello list,
I'm completely new to matplotlib and I'm not a computer scientist (not
a good starting point!) but I need to solve a geometric/graphical
problem.
I've been asked to find a method, in Python, to find the distance
between a 2D polynomial curve, derived from least squares
interpolation on a set of points, and a curve locallly interpolating
another set of points.
 - the starting line is a smooth line, while the second should
describe a path passing exactly thorugh the given points.
 - the distance should be the one along the normal to the first line
I attach a sketch to explain this.
Is there an heuristic, an algorithm, to solve this problem in an
efficient way (I have to apply it to thousands couples of sets from
sonar and seismic acquisitions)? Is the mapltolip API useful for this?
Thanks in advance,
Giovanni
From: Jouni K. S. <jk...@ik...> - 2009年02月19日 05:47:02
Afshin Eskandari <a_e...@ya...> writes:
> I upgraded my OS from fedora 6 to fedora 10. everything seems ok
> except for that when I save a figure in eps format, the quality of the
> resulting figure is poor and the size in also smaller than what it is
> supposed to be.
Just a guess: I think the default dpi value changed quite some time ago.
Does e.g. savefig('foo.eps', dpi=300) create a better-quality, larger
file?
-- 
Jouni K. Seppänen
http://www.iki.fi/jks
From: Afshin E. <a_e...@ya...> - 2009年02月18日 20:27:09
hi everybody,
I have been using matplotlib for some months without any problem and I am very happy with it until recently when I upgraded my OS from fedora 6 to fedora 10. everything seems ok except for that when I save a figure in eps format, the quality of the resulting figure is poor and the size in also smaller than what it is supposed to be.
Is there anybody to help me with this respect?
I appreciate in advance,
sean
 
From: Jeff W. <js...@fa...> - 2009年02月18日 20:10:09
Davide Lazzati wrote:
> I installed atk, gtk2, pango, and cairo from macports. Then I
> installed pygobject-2.16.0, pycairo-1.8.2, and pygtk-2.12.1 from the
> sources.
>
> All the installations seemed smooth.
>
> However, when I import pylab using GTKAgg as a backend, ipython tells
> me that there is not pygtk (see below for the whole error message).
>
> Any insight?
>
> Davide
> 
Davide: You installed pygtk into macports python - so you have to use 
macports python to import it.
-Jeff
> ---------------------------------------------------------------------------
> ImportError Traceback (most recent call last)
>
> /Users/dlazzat/<ipython console> in <module>()
>
> /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib-0.98.5.2-py2.5-macosx-10.3-i386.egg/pylab.py
> in <module>()
> ----> 1 from matplotlib.pylab import *
> 2 import matplotlib.pylab
> 3 __doc__ = matplotlib.pylab.__doc__
>
> /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib-0.98.5.2-py2.5-macosx-10.3-i386.egg/matplotlib/pylab.py
> in <module>()
> 251
> 252
> --> 253 from matplotlib.pyplot import *
> 254
> 255 # provide the recommended module abbrevs in the pylab namespace
>
> /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib-0.98.5.2-py2.5-macosx-10.3-i386.egg/matplotlib/pyplot.py
> in <module>()
> 73
> 74 from matplotlib.backends import pylab_setup
> ---> 75 new_figure_manager, draw_if_interactive, show = pylab_setup()
> 76
> 77
>
> /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib-0.98.5.2-py2.5-macosx-10.3-i386.egg/matplotlib/backends/__init__.pyc
> in pylab_setup()
> 23 backend_name = 'matplotlib.backends.%s'%backend_name.lower()
> 24 backend_mod = __import__(backend_name,
> ---> 25 globals(),locals(),[backend_name])
> 26
> 27 # Things we pull in from all backends
>
> /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib-0.98.5.2-py2.5-macosx-10.3-i386.egg/matplotlib/backends/backend_gtkagg.py
> in <module>()
> 8 from matplotlib.figure import Figure
> 9 from matplotlib.backends.backend_agg import FigureCanvasAgg
> ---> 10 from matplotlib.backends.backend_gtk import gtk,
> FigureManagerGTK, FigureCanvasGTK,\
> 11 show, draw_if_interactive,\
> 12 error_msg_gtk, NavigationToolbar, PIXELS_PER_INCH,
> backend_version, \
>
> /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib-0.98.5.2-py2.5-macosx-10.3-i386.egg/matplotlib/backends/backend_gtk.py
> in <module>()
> 9 import pango
> 10 except ImportError:
> ---> 11 raise ImportError("Gtk* backend requires pygtk to be installed.")
> 12
> 13 pygtk_version_required = (2,2,0)
>
> ImportError: Gtk* backend requires pygtk to be installed.
>
>
>
> On Tue, Feb 17, 2009 at 1:11 PM, Jeff Whitaker <js...@fa...> wrote:
> 
>> Davide Lazzati wrote:
>> 
>>> On Mon, Feb 16, 2009 at 8:13 PM, Jeff Whitaker <js...@fa...> wrote:
>>>
>>> 
>>>> Davide Lazzati wrote:
>>>>
>>>> 
>>>>> Hi,
>>>>>
>>>>> I'm trying to rum python and matlpotlib on a remote mac host from my
>>>>> mac laptop. Both have Mac OS/X 10.5.6 and I'm using ssh -Y ...
>>>>>
>>>>> However, the graphic window does not appear and, when I run p.show()
>>>>> everything gets stuck.
>>>>>
>>>>> Any insight?
>>>>>
>>>>> Thanks
>>>>>
>>>>>
>>>>> 
>>>> Davide: This will only work if you use an X11-based backend (like GTK
>>>> Agg),
>>>> since only X11 is forwarded over SSH. If you're using a mac-native
>>>> backend,
>>>> the window is popping up on your mac's screen when you do show().
>>>>
>>>> -Jeff
>>>>
>>>> 
>>> I've tried to use GTKAgg and it gives me an error message . I'm now
>>> running on the MacOSX backend and the graphic window appears on the
>>> remote screen (where pyton is running) rather than on the local one
>>> (in front of which I am sitting). Any idea on how to open the graphic
>>> window with a MacOSX or TkAgg backends on the local screen while
>>> python is running remote?
>>>
>>> Thanks again
>>> Davide
>>>
>>>
>>>
>>>
>>> 
>> Davide: As I said before, you have to use a backend compiled with X11
>> support if you want to ssh to run matplotlib remotely. You probably don't
>> have one, since TkAgg is native OS X and you probably don't have the
>> pre-requisites installed to build the GTKAgg backend. You have two choices:
>>
>> 1) install all the pre-requisites for the GTKAgg backend (don't know what
>> they are offhand, but they include at least gtk2, glib and pygtk2). Package
>> management systems like fink or macports can help with this.
>>
>> 2) use the screen-sharing feature of Leopard to remote control your mac
>> instead of ssh. Then you will see exactly what is on the screen of the
>> remote mac. This will work with any backend, but may be slow and/or
>> complicated if you have firewalls in between the macs.
>>
>> I do this routinely by using the python, pygtk2 and matplotlib packages
>> installed by macports, Never had much luck with remote screen sharing
>> because of firewall issues.
>>
>> -Jeff
>>
>> --
>> Jeffrey S. Whitaker Phone : (303)497-6313
>> Meteorologist FAX : (303)497-6449
>> NOAA/OAR/PSD R/PSD1 Email : Jef...@no...
>> 325 Broadway Office : Skaggs Research Cntr 1D-113
>> Boulder, CO, USA 80303-3328 Web : http://tinyurl.com/5telg
>>
>>
>> 
>
> ------------------------------------------------------------------------------
> Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
> -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
> -Strategies to boost innovation and cut costs with open source participation
> -Receive a 600ドル discount off the registration fee with the source code: SFAD
> http://p.sf.net/sfu/XcvMzF8H
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
> 
-- 
Jeffrey S. Whitaker Phone : (303)497-6313
Meteorologist FAX : (303)497-6449
NOAA/OAR/PSD R/PSD1 Email : Jef...@no...
325 Broadway Office : Skaggs Research Cntr 1D-113
Boulder, CO, USA 80303-3328 Web : http://tinyurl.com/5telg
From: Davide L. <dla...@gm...> - 2009年02月18日 19:55:03
I installed atk, gtk2, pango, and cairo from macports. Then I
installed pygobject-2.16.0, pycairo-1.8.2, and pygtk-2.12.1 from the
sources.
All the installations seemed smooth.
However, when I import pylab using GTKAgg as a backend, ipython tells
me that there is not pygtk (see below for the whole error message).
Any insight?
Davide
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
/Users/dlazzat/<ipython console> in <module>()
/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib-0.98.5.2-py2.5-macosx-10.3-i386.egg/pylab.py
in <module>()
----> 1 from matplotlib.pylab import *
 2 import matplotlib.pylab
 3 __doc__ = matplotlib.pylab.__doc__
/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib-0.98.5.2-py2.5-macosx-10.3-i386.egg/matplotlib/pylab.py
in <module>()
 251
 252
--> 253 from matplotlib.pyplot import *
 254
 255 # provide the recommended module abbrevs in the pylab namespace
/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib-0.98.5.2-py2.5-macosx-10.3-i386.egg/matplotlib/pyplot.py
in <module>()
 73
 74 from matplotlib.backends import pylab_setup
---> 75 new_figure_manager, draw_if_interactive, show = pylab_setup()
 76
 77
/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib-0.98.5.2-py2.5-macosx-10.3-i386.egg/matplotlib/backends/__init__.pyc
in pylab_setup()
 23 backend_name = 'matplotlib.backends.%s'%backend_name.lower()
 24 backend_mod = __import__(backend_name,
---> 25 globals(),locals(),[backend_name])
 26
 27 # Things we pull in from all backends
/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib-0.98.5.2-py2.5-macosx-10.3-i386.egg/matplotlib/backends/backend_gtkagg.py
in <module>()
 8 from matplotlib.figure import Figure
 9 from matplotlib.backends.backend_agg import FigureCanvasAgg
---> 10 from matplotlib.backends.backend_gtk import gtk,
FigureManagerGTK, FigureCanvasGTK,\
 11 show, draw_if_interactive,\
 12 error_msg_gtk, NavigationToolbar, PIXELS_PER_INCH,
backend_version, \
/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib-0.98.5.2-py2.5-macosx-10.3-i386.egg/matplotlib/backends/backend_gtk.py
in <module>()
 9 import pango
 10 except ImportError:
---> 11 raise ImportError("Gtk* backend requires pygtk to be installed.")
 12
 13 pygtk_version_required = (2,2,0)
ImportError: Gtk* backend requires pygtk to be installed.
On Tue, Feb 17, 2009 at 1:11 PM, Jeff Whitaker <js...@fa...> wrote:
> Davide Lazzati wrote:
>>
>> On Mon, Feb 16, 2009 at 8:13 PM, Jeff Whitaker <js...@fa...> wrote:
>>
>>>
>>> Davide Lazzati wrote:
>>>
>>>>
>>>> Hi,
>>>>
>>>> I'm trying to rum python and matlpotlib on a remote mac host from my
>>>> mac laptop. Both have Mac OS/X 10.5.6 and I'm using ssh -Y ...
>>>>
>>>> However, the graphic window does not appear and, when I run p.show()
>>>> everything gets stuck.
>>>>
>>>> Any insight?
>>>>
>>>> Thanks
>>>>
>>>>
>>>
>>> Davide: This will only work if you use an X11-based backend (like GTK
>>> Agg),
>>> since only X11 is forwarded over SSH. If you're using a mac-native
>>> backend,
>>> the window is popping up on your mac's screen when you do show().
>>>
>>> -Jeff
>>>
>>
>> I've tried to use GTKAgg and it gives me an error message . I'm now
>> running on the MacOSX backend and the graphic window appears on the
>> remote screen (where pyton is running) rather than on the local one
>> (in front of which I am sitting). Any idea on how to open the graphic
>> window with a MacOSX or TkAgg backends on the local screen while
>> python is running remote?
>>
>> Thanks again
>> Davide
>>
>>
>>
>>
>
> Davide: As I said before, you have to use a backend compiled with X11
> support if you want to ssh to run matplotlib remotely. You probably don't
> have one, since TkAgg is native OS X and you probably don't have the
> pre-requisites installed to build the GTKAgg backend. You have two choices:
>
> 1) install all the pre-requisites for the GTKAgg backend (don't know what
> they are offhand, but they include at least gtk2, glib and pygtk2). Package
> management systems like fink or macports can help with this.
>
> 2) use the screen-sharing feature of Leopard to remote control your mac
> instead of ssh. Then you will see exactly what is on the screen of the
> remote mac. This will work with any backend, but may be slow and/or
> complicated if you have firewalls in between the macs.
>
> I do this routinely by using the python, pygtk2 and matplotlib packages
> installed by macports, Never had much luck with remote screen sharing
> because of firewall issues.
>
> -Jeff
>
> --
> Jeffrey S. Whitaker Phone : (303)497-6313
> Meteorologist FAX : (303)497-6449
> NOAA/OAR/PSD R/PSD1 Email : Jef...@no...
> 325 Broadway Office : Skaggs Research Cntr 1D-113
> Boulder, CO, USA 80303-3328 Web : http://tinyurl.com/5telg
>
>
From: Ryan M. <rm...@gm...> - 2009年02月18日 19:32:25
On Wed, Feb 18, 2009 at 1:13 PM, Nicholas Stephens <
Nic...@un...> wrote:
> Hi all,
>
> I am creating what I would call a simple plot and up until now i have
> had no complaints. What I need is the ability to place a realtively
> small horizontal rectangle on the x-axis having never previously used
> the patches lib's. 8 hours and a slight sense of humour faliure later
> I am here. I have tried a number of methods now so i am convinced that
> there is a problem with my matplotlib setup or I am doing something
> incredably stupid, which I understand from previous experience is the
> more likely option :-)
>
> The problem is that I am also getting no output with simpler examples
> I am creating either. So the question is: I would like to add a simple
> rectangular box (12,0.01) on a plot similar to that shown below (I
> have used an example from ipython as I was trying to simplify things),
> so how would somebody else add a rectangular patch?
>
>
>
>
> from pylab import *
> from matplotlib.patches import Rectangle
>
> a=load('NC_figure4.dat', skiprows=(1))
> b=load('mean_NC_figure4.dat', skiprows=(1))
>
> ax=a[:,0]
> bx=b[:,0]
> # ay1=N:C
> ay1=a[:,1]
> # ay2=average N:C
> by1=b[:,1]
> # by1=N:C
> ay2=a[:,2]
> # by2=average N:C
> by2=b[:,2]
> # cy=difference
> cy=b[:,3]
>
> xx1 = subplot(111)
> t = arange(0.01, 10.0, 0.01)
> scatter(ax, ay1, s=10, c='k', marker='o')
> scatter(ax, ay2, s=10, c='b', marker='^')
> plot (bx,by1,'k-',markersize=8)
> plot (bx,by2,'b-',markersize=8)
> plot (bx,cy,'r-',markersize=8)
> xlim(-2,48)
> ylim(0,0.22)
> xlabel('Time [h]',fontsize=20)
> ylabel('Elemental N:C [gN/gC]',fontsize=20)
> text (32,0.06,'Dark treated',color='k',fontsize=20)
> text (32,0.13,'Control',color='b',fontsize=20)
> text (32,0.03,'Difference',color='r',fontsize=20)
>
Replace these:
>
> Rectangle((12,0.01),12,0.01,fill=True, fc='k', visible=True)
> show()
>
With these:
rect = Rectangle((12,0.01),12,0.01,fill=True, fc='k', visible=True)
xx1.add_patch(rect)
show()
Rectangle isn't like the pylab function. It is a class that creates a
Rectangle patch. You need to then manually add this patch to the axes
object (xx1 in your script).
Ryan
-- 
Ryan May
Graduate Research Assistant
School of Meteorology
University of Oklahoma
From: Nicholas S. <Nic...@un...> - 2009年02月18日 19:13:27
Hi all,
I am creating what I would call a simple plot and up until now i have 
had no complaints. What I need is the ability to place a realtively 
small horizontal rectangle on the x-axis having never previously used 
the patches lib's. 8 hours and a slight sense of humour faliure later 
I am here. I have tried a number of methods now so i am convinced that 
there is a problem with my matplotlib setup or I am doing something 
incredably stupid, which I understand from previous experience is the 
more likely option :-)
The problem is that I am also getting no output with simpler examples 
I am creating either. So the question is: I would like to add a simple 
rectangular box (12,0.01) on a plot similar to that shown below (I 
have used an example from ipython as I was trying to simplify things), 
so how would somebody else add a rectangular patch?
from pylab import *
from matplotlib.patches import Rectangle
a=load('NC_figure4.dat', skiprows=(1))
b=load('mean_NC_figure4.dat', skiprows=(1))
ax=a[:,0]
bx=b[:,0]
# ay1=N:C
ay1=a[:,1]
# ay2=average N:C
by1=b[:,1]
# by1=N:C
ay2=a[:,2]
# by2=average N:C
by2=b[:,2]
# cy=difference
cy=b[:,3]
xx1 = subplot(111)
t = arange(0.01, 10.0, 0.01)
scatter(ax, ay1, s=10, c='k', marker='o')
scatter(ax, ay2, s=10, c='b', marker='^')
plot (bx,by1,'k-',markersize=8)
plot (bx,by2,'b-',markersize=8)
plot (bx,cy,'r-',markersize=8)
xlim(-2,48)
ylim(0,0.22)
xlabel('Time [h]',fontsize=20)
ylabel('Elemental N:C [gN/gC]',fontsize=20)
text (32,0.06,'Dark treated',color='k',fontsize=20)
text (32,0.13,'Control',color='b',fontsize=20)
text (32,0.03,'Difference',color='r',fontsize=20)
Rectangle((12,0.01),12,0.01,fill=True, fc='k', visible=True)
show()
From: marcusantonius <mar...@st...> - 2009年02月18日 16:49:03
You are right, this solved my problem. Thank you very much.
mh
Jae-Joon Lee wrote:
> 
> I believe that it does not actually change the y scale of the first
> axes, but simply the
> y tickmarks of the second axes gets visible again. It seems to me a
> bug, though. Anyhow, I guess inserting following line after
> ax2.set_yscale("log") should solve your problem.
> 
> ax2.yaxis.tick_right()
> 
> -JJ
> 
> 
> On Wed, Feb 18, 2009 at 11:21 AM, marcusantonius
> <mar...@st...> wrote:
>>
>> Hi everybody,
>>
>> I want to include different data into one plot using a common xaxis but
>> two
>> yaxis. One of these axis should be log scaled. The problem is, that this
>> automatically changes the scaling (or just the ticks) of first yaxis,
>> which
>> should be linear to log. I assume this is a bug, but its also possible
>> that
>> I didn't understand how to do it. Here my code:
>>
>> fig=figure()
>> ax1=fig.add_subplot(111)
>> p1=ax1.plot(A0,data[:,11])
>> ax1.set_yscale('linear')
>> setp(p1,color='blue',ms=3.0,marker='.',alpha=1.,ls='')
>> ylim(ymax=1.1)
>> xlabel(r'$m_{16} \ (\mathrm{GeV})$')
>> ylabel(r'$R$')
>> #savefig('p30.pdf')
>> ax2=ax1.twinx()
>> p2=ax2.plot(A0,data[:,33])
>> ax2.set_yscale('log')
>> ax1.set_yscale('linear')
>> ylim(ymax=10)
>> axhline(y=0.136, xmin=0., xmax=1, color='black',ls=':')
>> axhline(y=0.094, xmin=0., xmax=1, color='black',ls=':')
>> setp(p2,color='orange',ms=3.0,marker='.',alpha=0.3,ls='')
>> savefig('p33.png')
>> clf()
>>
>> Thanks for your help
>> --
>> View this message in context:
>> http://www.nabble.com/Two-y-axis-with-twinx%2C-only-one-of-them-logscale-tp22082290p22082290.html
>> Sent from the matplotlib - users mailing list archive at Nabble.com.
>>
>>
>> ------------------------------------------------------------------------------
>> Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco,
>> CA
>> -OSBC tackles the biggest issue in open source: Open Sourcing the
>> Enterprise
>> -Strategies to boost innovation and cut costs with open source
>> participation
>> -Receive a 600ドル discount off the registration fee with the source code:
>> SFAD
>> http://p.sf.net/sfu/XcvMzF8H
>> _______________________________________________
>> Matplotlib-users mailing list
>> Mat...@li...
>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>>
> 
> ------------------------------------------------------------------------------
> Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco,
> CA
> -OSBC tackles the biggest issue in open source: Open Sourcing the
> Enterprise
> -Strategies to boost innovation and cut costs with open source
> participation
> -Receive a 600ドル discount off the registration fee with the source code:
> SFAD
> http://p.sf.net/sfu/XcvMzF8H
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
> 
> 
-- 
View this message in context: http://www.nabble.com/Two-y-axis-with-twinx%2C-only-one-of-them-logscale-tp22082290p22082961.html
Sent from the matplotlib - users mailing list archive at Nabble.com.
From: Jae-Joon L. <lee...@gm...> - 2009年02月18日 16:42:26
I believe that it does not actually change the y scale of the first
axes, but simply the
y tickmarks of the second axes gets visible again. It seems to me a
bug, though. Anyhow, I guess inserting following line after
ax2.set_yscale("log") should solve your problem.
ax2.yaxis.tick_right()
-JJ
On Wed, Feb 18, 2009 at 11:21 AM, marcusantonius
<mar...@st...> wrote:
>
> Hi everybody,
>
> I want to include different data into one plot using a common xaxis but two
> yaxis. One of these axis should be log scaled. The problem is, that this
> automatically changes the scaling (or just the ticks) of first yaxis, which
> should be linear to log. I assume this is a bug, but its also possible that
> I didn't understand how to do it. Here my code:
>
> fig=figure()
> ax1=fig.add_subplot(111)
> p1=ax1.plot(A0,data[:,11])
> ax1.set_yscale('linear')
> setp(p1,color='blue',ms=3.0,marker='.',alpha=1.,ls='')
> ylim(ymax=1.1)
> xlabel(r'$m_{16} \ (\mathrm{GeV})$')
> ylabel(r'$R$')
> #savefig('p30.pdf')
> ax2=ax1.twinx()
> p2=ax2.plot(A0,data[:,33])
> ax2.set_yscale('log')
> ax1.set_yscale('linear')
> ylim(ymax=10)
> axhline(y=0.136, xmin=0., xmax=1, color='black',ls=':')
> axhline(y=0.094, xmin=0., xmax=1, color='black',ls=':')
> setp(p2,color='orange',ms=3.0,marker='.',alpha=0.3,ls='')
> savefig('p33.png')
> clf()
>
> Thanks for your help
> --
> View this message in context: http://www.nabble.com/Two-y-axis-with-twinx%2C-only-one-of-them-logscale-tp22082290p22082290.html
> Sent from the matplotlib - users mailing list archive at Nabble.com.
>
>
> ------------------------------------------------------------------------------
> Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
> -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
> -Strategies to boost innovation and cut costs with open source participation
> -Receive a 600ドル discount off the registration fee with the source code: SFAD
> http://p.sf.net/sfu/XcvMzF8H
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
From: marcusantonius <mar...@st...> - 2009年02月18日 16:21:09
Hi everybody,
I want to include different data into one plot using a common xaxis but two
yaxis. One of these axis should be log scaled. The problem is, that this
automatically changes the scaling (or just the ticks) of first yaxis, which
should be linear to log. I assume this is a bug, but its also possible that
I didn't understand how to do it. Here my code:
fig=figure()
ax1=fig.add_subplot(111)
p1=ax1.plot(A0,data[:,11])
ax1.set_yscale('linear')
setp(p1,color='blue',ms=3.0,marker='.',alpha=1.,ls='')
ylim(ymax=1.1)
xlabel(r'$m_{16} \ (\mathrm{GeV})$')
ylabel(r'$R$')
#savefig('p30.pdf')
ax2=ax1.twinx()
p2=ax2.plot(A0,data[:,33])
ax2.set_yscale('log')
ax1.set_yscale('linear')
ylim(ymax=10)
axhline(y=0.136, xmin=0., xmax=1, color='black',ls=':')
axhline(y=0.094, xmin=0., xmax=1, color='black',ls=':')
setp(p2,color='orange',ms=3.0,marker='.',alpha=0.3,ls='')
savefig('p33.png')
clf()
Thanks for your help
-- 
View this message in context: http://www.nabble.com/Two-y-axis-with-twinx%2C-only-one-of-them-logscale-tp22082290p22082290.html
Sent from the matplotlib - users mailing list archive at Nabble.com.
From: Zunbeltz I. <zun...@gm...> - 2009年02月18日 14:07:34
Dear all,
If I am not wrong it is not possible to set the rotation and alignament 
options of xlabel and ylabel in the rcParam. I think this would be a 
nice idea. If there is nobody working on that I can have a look. Could
you please outline what classes/method should I look in the matplotlib
source code?
Regards
Zunbelz
-- 
Dr. Zunbeltz Izaola
Helmholtz-Zentrum Berlin für Materialien und Energie GmbH
Methods and Instruments (SF1)
Glienicker Str. 100
D-14109 Berlin
Tel (030) 8062-3179 
Fax (030) 8062-2523 
Room A 349 
From: Manuel M. <mm...@as...> - 2009年02月18日 13:37:58
Ryan May wrote:
> On Mon, Feb 16, 2009 at 7:22 AM, Manuel Metz <mm...@as...>wrote:
> 
>> Attached is a very simple example that shows how to do something similar
>> to scatterhist in matplotlib
>>
>>
> That's a nice example. Are you going to check that into SVN?
Yes, soon ...
> Ryan
> 
From: Jae-Joon L. <lee...@gm...> - 2009年02月17日 19:19:16
When you say "own axes", I presume you're using subplots.
You need to create your axes with different sizes (subplot creates
axes with same size), so that the height of images are equal when they
shrink to to fit in the axes box. You may create an axes with a given
size with following command
fig.add_axes([0.2, 0.08, 0.6, 0.04])
where the input list specifies the position of the axes in the
normalized figure coordinate.
But you need to manually calculate the correct axes position.
In the example directory of the mpl svn, there are little helper
classes I wrote (axes_grid.py, axes_divider.py).
The link below shows a little example how you can use them.
http://abitofpythonabitofastronomy.blogspot.com/2009/02/images-side-by-side-in-mpl.html
-JJ
On Tue, Feb 17, 2009 at 9:43 AM, Eric Jonas <jo...@mi...> wrote:
> I searched for a considerable amount of time this weekend, but have yet
> to figure out how to do the following:
>
> I want to plot several M_i x N images side-by-side on a figure. In
> particular, something like follows:
>
>
> |-----------------| |--------| |---|
> | | | | | |
> | | | | | |
> | | | | | |
> | | | | | |
> | | | | | |
> | | | | | |
> | | | | | |
> | | | | | |
> ------------------- ---------- -----
>
> That is, while each image has the same height, the widths
> (in pixel values) are different. At the moment, I am plotting
> each image in its own axes, but the problem appears to be that
> the "fatter" image is being scaled down to the point
> of being too small (and so that all subfigure sections are roughly the
> same size).
>
> I want each image to eventually have independent sets of labels
> along the X axis, so I can't just combine them all into one big image.
> Might anyone have any idea how to pull this off?
> ...Eric
>
>
>
> ------------------------------------------------------------------------------
> Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
> -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
> -Strategies to boost innovation and cut costs with open source participation
> -Receive a 600ドル discount off the registration fee with the source code: SFAD
> http://p.sf.net/sfu/XcvMzF8H
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
6 messages has been excluded from this view by a project administrator.

Showing results of 295

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