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
(2) |
2
(5) |
3
(8) |
4
(6) |
5
(9) |
6
(7) |
|
7
(6) |
8
(10) |
9
(27) |
10
(7) |
11
(22) |
12
(13) |
13
(7) |
|
14
(4) |
15
(12) |
16
(32) |
17
(26) |
18
(14) |
19
(1) |
20
(11) |
|
21
(6) |
22
(11) |
23
(17) |
24
(18) |
25
(28) |
26
(11) |
27
(6) |
|
28
(1) |
29
(10) |
30
(12) |
|
|
|
|
|
From: charles r. <cha...@gm...> - 2008-09-20 19:17:05
|
That does the trick! Thanks Eric. ========== The 2nd Law of Thermodynamics... If you think things are a mess now, JUST WAIT! On Sat, Sep 20, 2008 at 12:47 PM, Eric Firing <ef...@ha...> wrote: > charles reid wrote: > >> Hi there - >> >> I'm wondering if there is a way to do this, since I haven't found anything >> online or in the mailing list archives that covers it. I'd like to draw a >> line from inside the plot area to outside the plot area (see attached image >> - the blue line is what I plot, but I'd like to know how to create something >> like the red line, which goes beyond the axes of the plot). I'm guessing I >> would create an additional layer in the same figure, but make a layer >> without axes. However, I'm not exactly sure what I should do - add an >> additional canvas? a new renderer? If you can point me to the right >> documentation or give me some idea of how I should be doing this, I would >> really appreciate it. >> > > You can turn off the clipping to the axes box on a per-artist basis. > Something like this: > > import matplotlib.pyplot as plt > import numpy as np > x = np.arange(10) > y = np.ones_like(x) > ll = plt.plot(x,y) # returns a sequence of line objects > ll[0].set_clip_on(False) > plt.axis([0,3,0,3]) > plt.show() > > Eric > > > >> >> Charles >> >> ========== >> >> The 2nd Law of Thermodynamics... If you think things are a mess now, JUST >> WAIT! >> >> ------------------------------------------------------------------------ >> >> >> ------------------------------------------------------------------------ >> >> ------------------------------------------------------------------------- >> This SF.Net email is sponsored by the Moblin Your Move Developer's >> challenge >> Build the coolest Linux based applications with Moblin SDK & win great >> prizes >> Grand prize is a trip for two to an Open Source event anywhere in the >> world >> http://moblin-contest.org/redirect.php?banner_id=100&url=/ >> >> >> ------------------------------------------------------------------------ >> >> _______________________________________________ >> Matplotlib-users mailing list >> Mat...@li... >> https://lists.sourceforge.net/lists/listinfo/matplotlib-users >> > > |
|
From: Eric F. <ef...@ha...> - 2008-09-20 18:47:35
|
charles reid wrote: > Hi there - > > I'm wondering if there is a way to do this, since I haven't found > anything online or in the mailing list archives that covers it. I'd > like to draw a line from inside the plot area to outside the plot area > (see attached image - the blue line is what I plot, but I'd like to know > how to create something like the red line, which goes beyond the axes of > the plot). I'm guessing I would create an additional layer in the same > figure, but make a layer without axes. However, I'm not exactly sure > what I should do - add an additional canvas? a new renderer? If you > can point me to the right documentation or give me some idea of how I > should be doing this, I would really appreciate it. You can turn off the clipping to the axes box on a per-artist basis. Something like this: import matplotlib.pyplot as plt import numpy as np x = np.arange(10) y = np.ones_like(x) ll = plt.plot(x,y) # returns a sequence of line objects ll[0].set_clip_on(False) plt.axis([0,3,0,3]) plt.show() Eric > > > Charles > > ========== > > The 2nd Law of Thermodynamics... If you think things are a mess now, > JUST WAIT! > > ------------------------------------------------------------------------ > > > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's challenge > Build the coolest Linux based applications with Moblin SDK & win great prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > > > ------------------------------------------------------------------------ > > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users |
|
From: Laurent D. <lau...@gm...> - 2008-09-20 14:29:46
|
Excellent! That's was EXACTLY what I needed! Thanks a lot Friedrich! :) 2008/9/20 Friedrich Hagedorn <fri...@gm...>: > On Sat, Sep 20, 2008 at 04:06:36PM +0200, Laurent Dufrechou wrote: >> Hello all, >> I'm trying to show to a friend matplotlib features via pylab interface. >> (thus to replace matlab/scilab) >> I've a little problem while I'm trying to display plots into subplots here >> under vista. >> If I add a pylab.xlabel to the subplots they are masked by the underlying >> subplot. >> To workaround it I need to change the window size. >> I used for myself add_axes([0.1,0.8,0.75,.15]) but that's not that easy. > > That's right (but sometimes I did the same :-) > >> Do I miss one important thing or must I go trought add_axes functions each >> time I call pylab.subplot? > > Yes, you can adjust the space between the subplot with > > subplots_adjust() > > Look at the docstring with > > In [1]: subplots-adjust? > > in ipython shell. Try to see the difference between > > figure() > subplot(211) > subplot(212) > show() > > and > > figure() > subplots_adjust(hspace=0.4) # standard: 0.2 > subplot(211) > subplot(212) > show() > > By, > > Friedrich > |
|
From: Friedrich H. <fri...@gm...> - 2008-09-20 14:24:18
|
On Sat, Sep 20, 2008 at 04:06:36PM +0200, Laurent Dufrechou wrote: > Hello all, > I'm trying to show to a friend matplotlib features via pylab interface. > (thus to replace matlab/scilab) > I've a little problem while I'm trying to display plots into subplots here > under vista. > If I add a pylab.xlabel to the subplots they are masked by the underlying > subplot. > To workaround it I need to change the window size. > I used for myself add_axes([0.1,0.8,0.75,.15]) but that's not that easy. That's right (but sometimes I did the same :-) > Do I miss one important thing or must I go trought add_axes functions each > time I call pylab.subplot? Yes, you can adjust the space between the subplot with subplots_adjust() Look at the docstring with In [1]: subplots-adjust? in ipython shell. Try to see the difference between figure() subplot(211) subplot(212) show() and figure() subplots_adjust(hspace=0.4) # standard: 0.2 subplot(211) subplot(212) show() By, Friedrich |
|
From: Laurent D. <lau...@gm...> - 2008-09-20 14:06:55
|
Hello all, I'm trying to show to a friend matplotlib features via pylab interface. (thus to replace matlab/scilab) I've a little problem while I'm trying to display plots into subplots here under vista. If I add a pylab.xlabel to the subplots they are masked by the underlying subplot. To workaround it I need to change the window size. I used for myself add_axes([0.1,0.8,0.75,.15]) but that's not that easy. Do I miss one important thing or must I go trought add_axes functions each time I call pylab.subplot? Thx for any idea! Laurent |
|
From: Goyo <goy...@gm...> - 2008-09-20 12:19:25
|
Try something like this:
import pylab as pl
head = ((0, 0, 10),
(1, 0, 13),
(2, 0, 11),
(3, 0, 12),
(1, 2, 11))
x, y, z = zip(*head)
xi, yi = pl.arange(0, 4, 0.1), pl.arange(0, 3, 0.1)
g = pl.griddata(x, y, z, xi, yi)
pl.scatter(x, y)
pl.contour(xi, yi, g)
Level values are automatically chosen in this example but you can
provide the number of values or a sequence of them.
Note that no extrapolation is done outside convex hull defined by input
data.
Goyo
El sáb, 20-09-2008 a las 11:13 +0200, Oz Nahum escribió:
> I'm trying again to understand how to plot scattered data from array into
> contour graph.
> I looked at
> http://www.scipy.org/Cookbook/Matplotlib/Gridding_irregularly_spaced_data
> and I understand I have to grid my data. However, in most samples the plot
> is of a function.
> Let's say I want to plot some geological data, suppose water table head, and
> I have the following 3D aray
> x y head
> head = ((0, 0, 10),
> (1, 0, 13),
> (2, 0, 11),
> (3, 0, 12),
> (1, 2, 11))
> matplotlib has lot's of restrictions about how I can plot and interpolate
> the data, which causes a lot of confusion in my side...
> I'll be happy if someone could supply me a clue of how to plot contours of
> data which comes in arrays or raster format and not an equation.
> Thanks,
> Oz
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
> Build the coolest Linux based applications with Moblin SDK & win great prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
|
|
From: Oz N. <na...@gm...> - 2008-09-20 09:14:09
|
I'm trying again to understand how to plot scattered data from array into contour graph. I looked at http://www.scipy.org/Cookbook/Matplotlib/Gridding_irregularly_spaced_data and I understand I have to grid my data. However, in most samples the plot is of a function. Let's say I want to plot some geological data, suppose water table head, and I have the following 3D aray x y head head = ((0, 0, 10), (1, 0, 13), (2, 0, 11), (3, 0, 12), (1, 2, 11)) matplotlib has lot's of restrictions about how I can plot and interpolate the data, which causes a lot of confusion in my side... I'll be happy if someone could supply me a clue of how to plot contours of data which comes in arrays or raster format and not an equation. Thanks, Oz |
|
From: Eric F. <ef...@ha...> - 2008-09-20 04:08:50
|
jas...@cr... wrote:
> Eric Firing wrote:
>>>> Well, the easiest way is to build mpl from svn; a few minutes ago I
>>>> added this capability to quiver, selectable with an "angles" kwarg.
>
> Eric,
>
> I tried just copying the quiver.py SVN version 6114 into my existing
> matplotlib install and numpy 1.1.1. When running my example posted
> earlier with the angles='xy' keyword added to the quiver call, I get the
> following error:
So do I. I'll have to track down the bug.
Eric
>
> In [10]: show()
> ---------------------------------------------------------------------------
> <type 'exceptions.ValueError'> Traceback (most recent call last)
>
> /usr/lib/python2.5/site-packages/matplotlib/backends/backend_gtk.py in
> expose_event(self, widget, event)
> 331 x, y, w, h = self.allocation
> 332 self._pixmap_prepare (w, h)
> --> 333 self._render_figure(self._pixmap, w, h)
> 334 self._need_redraw = False
> 335
>
> /usr/lib/python2.5/site-packages/matplotlib/backends/backend_gtkagg.py
> in _render_figure(self, pixmap, width, height)
> 73 def _render_figure(self, pixmap, width, height):
> 74 if DEBUG: print 'FigureCanvasGTKAgg.render_figure'
> ---> 75 FigureCanvasAgg.draw(self)
> 76 if DEBUG: print 'FigureCanvasGTKAgg.render_figure
> pixmap', pixmap
> 77 #agg_to_gtk_drawable(pixmap, self.renderer._renderer, None)
>
> /usr/lib/python2.5/site-packages/matplotlib/backends/backend_agg.py in
> draw(self)
> 259
> 260 self.renderer = self.get_renderer()
> --> 261 self.figure.draw(self.renderer)
> 262
> 263 def get_renderer(self):
>
> /usr/lib/python2.5/site-packages/matplotlib/figure.py in draw(self,
> renderer)
> 757
> 758 # render the axes
> --> 759 for a in self.axes: a.draw(renderer)
> 760
> 761 # render the figure text
>
> /usr/lib/python2.5/site-packages/matplotlib/axes.py in draw(self,
> renderer, inframe)
> 1521
> 1522 for zorder, i, a in dsu:
> -> 1523 a.draw(renderer)
> 1524
> 1525 renderer.close_group('axes')
>
> /usr/lib/python2.5/site-packages/matplotlib/quiver.py in draw(self,
> renderer)
> 423 self._init()
> 424 if self._new_UV or self.angles == 'xy':
> --> 425 verts = self._make_verts(self.U, self.V)
> 426 self.set_verts(verts, closed=False)
> 427 self._new_UV = False
>
> /usr/lib/python2.5/site-packages/matplotlib/quiver.py in
> _make_verts(self, U, V)
> 483 else:
> 484 theta = ma.asarray(self.angles*np.pi/180.0).filled(0)
> --> 485 xy = (X+Y*1j) * np.exp(1j*theta)*self.width
> 486 xy = xy[:,:,np.newaxis]
> 487 XY = ma.concatenate((xy.real, xy.imag), axis=2)
>
> /usr/lib/python2.5/site-packages/numpy/ma/core.py in __mul__(self, other)
> 1710 def __mul__(self, other):
> 1711 "Multiply other by self, and return a new masked array."
> -> 1712 return multiply(self, other)
> 1713 #
> 1714 def __div__(self, other):
>
> /usr/lib/python2.5/site-packages/numpy/ma/core.py in __call__(self, a,
> b, *args, **kwargs)
> 513 m = mask_or(getmask(a), getmask(b))
> 514 (d1, d2) = (get_data(a), get_data(b))
> --> 515 result = self.f(d1, d2, *args,
> **kwargs).view(get_masked_subclass(a, b))
> 516 if result.size > 1:
> 517 if m is not nomask:
>
> <type 'exceptions.ValueError'>: shape mismatch: objects cannot be
> broadcast to a single shape
>
>
>
> Do you know if this is caused by trying to use the new quiver.py in
> 0.98.3? Does my example before (copied below for convenience) work for
> you?
>
> from pylab import *
>
> X,Y = meshgrid( arange(0,1,.2),arange(0,1,.2) )
> def yprime(x,y):
> return 1
>
> U,V = meshgrid([1]*len(X), [1]*len(Y))
>
> figure()
> Q = quiver(X,Y,U, V, angles='xy')
>
> # This is a solution to the differential equation y'=1, but it doesn't
> # look like it because the slopes do not respect the aspect ratio of
> # the plot. What should happen is the arrows should point along the
> # line.
> plot([0,1],[0,1])
>
> axis([0,1,0,0.5])
>
> title("Slope Field for $dy/dx=1$")
> show()
>
>
> Thanks,
>
> Jason
>
|
|
From: <jas...@cr...> - 2008-09-20 03:26:02
|
Eric Firing wrote:
>>> Well, the easiest way is to build mpl from svn; a few minutes ago I
>>> added this capability to quiver, selectable with an "angles" kwarg.
Eric,
I tried just copying the quiver.py SVN version 6114 into my existing
matplotlib install and numpy 1.1.1. When running my example posted
earlier with the angles='xy' keyword added to the quiver call, I get the
following error:
In [10]: show()
---------------------------------------------------------------------------
<type 'exceptions.ValueError'> Traceback (most recent call last)
/usr/lib/python2.5/site-packages/matplotlib/backends/backend_gtk.py in
expose_event(self, widget, event)
331 x, y, w, h = self.allocation
332 self._pixmap_prepare (w, h)
--> 333 self._render_figure(self._pixmap, w, h)
334 self._need_redraw = False
335
/usr/lib/python2.5/site-packages/matplotlib/backends/backend_gtkagg.py
in _render_figure(self, pixmap, width, height)
73 def _render_figure(self, pixmap, width, height):
74 if DEBUG: print 'FigureCanvasGTKAgg.render_figure'
---> 75 FigureCanvasAgg.draw(self)
76 if DEBUG: print 'FigureCanvasGTKAgg.render_figure
pixmap', pixmap
77 #agg_to_gtk_drawable(pixmap, self.renderer._renderer, None)
/usr/lib/python2.5/site-packages/matplotlib/backends/backend_agg.py in
draw(self)
259
260 self.renderer = self.get_renderer()
--> 261 self.figure.draw(self.renderer)
262
263 def get_renderer(self):
/usr/lib/python2.5/site-packages/matplotlib/figure.py in draw(self,
renderer)
757
758 # render the axes
--> 759 for a in self.axes: a.draw(renderer)
760
761 # render the figure text
/usr/lib/python2.5/site-packages/matplotlib/axes.py in draw(self,
renderer, inframe)
1521
1522 for zorder, i, a in dsu:
-> 1523 a.draw(renderer)
1524
1525 renderer.close_group('axes')
/usr/lib/python2.5/site-packages/matplotlib/quiver.py in draw(self,
renderer)
423 self._init()
424 if self._new_UV or self.angles == 'xy':
--> 425 verts = self._make_verts(self.U, self.V)
426 self.set_verts(verts, closed=False)
427 self._new_UV = False
/usr/lib/python2.5/site-packages/matplotlib/quiver.py in
_make_verts(self, U, V)
483 else:
484 theta = ma.asarray(self.angles*np.pi/180.0).filled(0)
--> 485 xy = (X+Y*1j) * np.exp(1j*theta)*self.width
486 xy = xy[:,:,np.newaxis]
487 XY = ma.concatenate((xy.real, xy.imag), axis=2)
/usr/lib/python2.5/site-packages/numpy/ma/core.py in __mul__(self, other)
1710 def __mul__(self, other):
1711 "Multiply other by self, and return a new masked array."
-> 1712 return multiply(self, other)
1713 #
1714 def __div__(self, other):
/usr/lib/python2.5/site-packages/numpy/ma/core.py in __call__(self, a,
b, *args, **kwargs)
513 m = mask_or(getmask(a), getmask(b))
514 (d1, d2) = (get_data(a), get_data(b))
--> 515 result = self.f(d1, d2, *args,
**kwargs).view(get_masked_subclass(a, b))
516 if result.size > 1:
517 if m is not nomask:
<type 'exceptions.ValueError'>: shape mismatch: objects cannot be
broadcast to a single shape
Do you know if this is caused by trying to use the new quiver.py in
0.98.3? Does my example before (copied below for convenience) work for you?
from pylab import *
X,Y = meshgrid( arange(0,1,.2),arange(0,1,.2) )
def yprime(x,y):
return 1
U,V = meshgrid([1]*len(X), [1]*len(Y))
figure()
Q = quiver(X,Y,U, V, angles='xy')
# This is a solution to the differential equation y'=1, but it doesn't
# look like it because the slopes do not respect the aspect ratio of
# the plot. What should happen is the arrows should point along the
# line.
plot([0,1],[0,1])
axis([0,1,0,0.5])
title("Slope Field for $dy/dx=1$")
show()
Thanks,
Jason
|
|
From: Eric F. <ef...@ha...> - 2008-09-20 03:24:46
|
jas...@cr... wrote:
> Eric Firing wrote:
>>>> Well, the easiest way is to build mpl from svn; a few minutes ago I
>>>> added this capability to quiver, selectable with an "angles" kwarg.
>
> Eric,
>
> I tried just copying the quiver.py SVN version 6114 into my existing
> matplotlib install and numpy 1.1.1. When running my example posted
> earlier with the angles='xy' keyword added to the quiver call, I get the
> following error:
Fixed in svn 6115. Sorry I didn't catch it initially. It was a pretty
basic bug.
Eric
>
> In [10]: show()
> ---------------------------------------------------------------------------
> <type 'exceptions.ValueError'> Traceback (most recent call last)
>
> /usr/lib/python2.5/site-packages/matplotlib/backends/backend_gtk.py in
> expose_event(self, widget, event)
> 331 x, y, w, h = self.allocation
> 332 self._pixmap_prepare (w, h)
> --> 333 self._render_figure(self._pixmap, w, h)
> 334 self._need_redraw = False
> 335
>
> /usr/lib/python2.5/site-packages/matplotlib/backends/backend_gtkagg.py
> in _render_figure(self, pixmap, width, height)
> 73 def _render_figure(self, pixmap, width, height):
> 74 if DEBUG: print 'FigureCanvasGTKAgg.render_figure'
> ---> 75 FigureCanvasAgg.draw(self)
> 76 if DEBUG: print 'FigureCanvasGTKAgg.render_figure
> pixmap', pixmap
> 77 #agg_to_gtk_drawable(pixmap, self.renderer._renderer, None)
>
> /usr/lib/python2.5/site-packages/matplotlib/backends/backend_agg.py in
> draw(self)
> 259
> 260 self.renderer = self.get_renderer()
> --> 261 self.figure.draw(self.renderer)
> 262
> 263 def get_renderer(self):
>
> /usr/lib/python2.5/site-packages/matplotlib/figure.py in draw(self,
> renderer)
> 757
> 758 # render the axes
> --> 759 for a in self.axes: a.draw(renderer)
> 760
> 761 # render the figure text
>
> /usr/lib/python2.5/site-packages/matplotlib/axes.py in draw(self,
> renderer, inframe)
> 1521
> 1522 for zorder, i, a in dsu:
> -> 1523 a.draw(renderer)
> 1524
> 1525 renderer.close_group('axes')
>
> /usr/lib/python2.5/site-packages/matplotlib/quiver.py in draw(self,
> renderer)
> 423 self._init()
> 424 if self._new_UV or self.angles == 'xy':
> --> 425 verts = self._make_verts(self.U, self.V)
> 426 self.set_verts(verts, closed=False)
> 427 self._new_UV = False
>
> /usr/lib/python2.5/site-packages/matplotlib/quiver.py in
> _make_verts(self, U, V)
> 483 else:
> 484 theta = ma.asarray(self.angles*np.pi/180.0).filled(0)
> --> 485 xy = (X+Y*1j) * np.exp(1j*theta)*self.width
> 486 xy = xy[:,:,np.newaxis]
> 487 XY = ma.concatenate((xy.real, xy.imag), axis=2)
>
> /usr/lib/python2.5/site-packages/numpy/ma/core.py in __mul__(self, other)
> 1710 def __mul__(self, other):
> 1711 "Multiply other by self, and return a new masked array."
> -> 1712 return multiply(self, other)
> 1713 #
> 1714 def __div__(self, other):
>
> /usr/lib/python2.5/site-packages/numpy/ma/core.py in __call__(self, a,
> b, *args, **kwargs)
> 513 m = mask_or(getmask(a), getmask(b))
> 514 (d1, d2) = (get_data(a), get_data(b))
> --> 515 result = self.f(d1, d2, *args,
> **kwargs).view(get_masked_subclass(a, b))
> 516 if result.size > 1:
> 517 if m is not nomask:
>
> <type 'exceptions.ValueError'>: shape mismatch: objects cannot be
> broadcast to a single shape
>
>
>
> Do you know if this is caused by trying to use the new quiver.py in
> 0.98.3? Does my example before (copied below for convenience) work for
> you?
>
> from pylab import *
>
> X,Y = meshgrid( arange(0,1,.2),arange(0,1,.2) )
> def yprime(x,y):
> return 1
>
> U,V = meshgrid([1]*len(X), [1]*len(Y))
>
> figure()
> Q = quiver(X,Y,U, V, angles='xy')
>
> # This is a solution to the differential equation y'=1, but it doesn't
> # look like it because the slopes do not respect the aspect ratio of
> # the plot. What should happen is the arrows should point along the
> # line.
> plot([0,1],[0,1])
>
> axis([0,1,0,0.5])
>
> title("Slope Field for $dy/dx=1$")
> show()
>
>
> Thanks,
>
> Jason
>
|