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
(11) |
2
(2) |
3
(2) |
|
4
|
5
(1) |
6
(6) |
7
(9) |
8
(5) |
9
(1) |
10
(1) |
|
11
(1) |
12
(7) |
13
(6) |
14
(3) |
15
(1) |
16
(10) |
17
(1) |
|
18
(2) |
19
(3) |
20
(14) |
21
(14) |
22
(18) |
23
(5) |
24
(5) |
|
25
(1) |
26
(22) |
27
(5) |
28
(21) |
29
(25) |
30
(3) |
|
|
From: Greg W. <gr...@th...> - 2004-04-07 23:02:36
|
I'm not sure if this is a bug or a feature, but limits set before plotting aren't kept >>> sp = subplot(111) >>> sp.set_xlim([-5,5]) >>> sp.plot(arange(-10,10),arange(-10,10)) displays from -10 to 9. Axes.plot calls xaxis.autoscale_view() which undoes any previously set limits. I haven't used matlab so I can't say what it does, but I'd expect it to honor them (I think most plotting packages do). I looked to alter Axis.plot to basically say if xaxis.autoscale: xaxis.autoscale_view() but currently there doesn't seem to be a way to discern whether the current xaxis.viewlim was manually set or is the result of autoscale. Should this be a feature (set_xlim "sticks")? Does Axis need an autoscale attribute to enable this? This is version 0.52 (which btw has matplotlib.version set to '0.51'). Thanks, Greg |
|
From: Flavio C. C. <fcc...@ci...> - 2004-04-07 16:59:03
|
You've got to do this: >>> from Numeric import * >>> a=3Darray([1,2]) >>> b=3Darray([2,3]) >>> a+b array([3, 5]) easy isn't it? cheers, Fl=E1vio On Wed, 2004-04-07 at 16:49, Randy Heiland wrote: > Apologies for this simplistic question - how can I add 2 arrays > elm-wise, i.e, > a=3D[1,2] > b=3D[2,3] > a+b =3D [3,5] >=20 > --Randy >=20 >=20 >=20 > ------------------------------------------------------- > This SF.Net email is sponsored by: IBM Linux Tutorials > Free Linux tutorial presented by Daniel Robbins, President and CEO of > GenToo technologies. Learn everything from fundamentals to system > administration.http://ads.osdn.com/?ad_id=3D1470&alloc_id=3D3638&op=3Dcli= ck > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users |
|
From: Randy H. <he...@in...> - 2004-04-07 16:49:53
|
Apologies for this simplistic question - how can I add 2 arrays elm-wise, i.e, a=[1,2] b=[2,3] a+b = [3,5] --Randy |
|
From: John N S G. <jn...@eu...> - 2004-04-07 15:19:23
|
> I will - they look nice! If you add more to it, be sure to send me > the updated version. > > John Gill has written a Cell class for his Table class which is > basically a rectangular box with a text instance inside. It might be > nice to generalize that code to allow multiple lines of text to be > added > > cell.add_line(t1) > cell.add_line(t2) > > Cell already handles autosizing of the box to surround the text, and > you wouldn't have to mess with turning off the ticks, etc.... John > might be willing to do this, and it could be wrapped in a nice > interface command textbox. I will take a look at this when i get some time. It might be a week or two though -- i do this stuff commuting on the train, but unfortunately my laptop recently had a hard drive failure, so I'm out of action for a while. Looking forward to getting the latest matplotlib stuff up and running and trying out all this Agg stuff. John |
|
From: John H. <jdh...@ac...> - 2004-04-07 14:54:13
|
>>>>> "Flavio" == Flavio Codeco Coelho <fcc...@ci...> writes:
Flavio> Is this code already in the 0.52 release? if So, I'll take
Flavio> a look at it!
No, it doesn't exist yet; it's just an idea that John Gill may want to
pursue.
Flavio> That would be a nice idea not to move away from standard
Flavio> TeX syntax...
Agreed.
Flavio> Ok, TeX has a whole range of space commands that are
Flavio> import to tweak the layout of math expressions.
Flavio> Does mathtext support formatting multiline strings? waht
Flavio> about TeX's line break command '\\'?
None of the above, but I'll try and get some of them in when the more
pressing concerns (fixing the known layout bugs, porting to PS,
improving the parser to handle nested subscripts) are taken care of.
Flavio> Thanks again John, mathtext is a great piece of software,
Flavio> and a life saver for people like me that need to include
Flavio> math symbols in their software. I wish I could use it on
Flavio> other parts of my GUI such as menus, window titles and
Flavio> etc.
Well, if wx supports drawing to any of these from freetype fonts or
bitmapped rasters, you probably can. I can help you with this if the
basic support is in wx.
JDH
|
|
From: Flavio C. C. <fcc...@ci...> - 2004-04-07 14:26:07
|
Hi John,
On Wed, 2004-04-07 at 13:16, John Hunter wrote:
> >>>>> "Flavio" == Flavio Codeco Coelho <fcc...@ci...> writes:
>
> Hi Flavio,
>
> On an unrelated note, you will be happy to know that wxagg will be
> included in the next release, probably early next week.
That's great news! I really need to include that equation box in my wx
app.
>
> Flavio> \frac and \dfrac would be a nice addition too...
>
> Agreed. And I guess asking for &=& array layout will be coming soon
> :-)
That would be great too!!
> I will - they look nice! If you add more to it, be sure to send me
> the updated version.
I surely will since this was just a simple draft, to see if it worked.
>
> John Gill has written a Cell class for his Table class which is
> basically a rectangular box with a text instance inside. It might be
> nice to generalize that code to allow multiple lines of text to be
> added
>
> cell.add_line(t1)
> cell.add_line(t2)
>
> Cell already handles autosizing of the box to surround the text, and
> you wouldn't have to mess with turning off the ticks, etc.... John
> might be willing to do this, and it could be wrapped in a nice
> interface command textbox.
Is this code already in the 0.52 release? if So, I'll take a look at
it!
>
> Flavio> Flavio """ This script create a box with a series of
> Flavio> equations
>
> Your code revealed one bug unrelated to the sqrt problem you
> described, but you need to make the change below to have your example
> render properly. In mathtext.py, in the function math_parse_s, change
>
> maxoy = max(oys)
>
> to
> maxoy = abs(max(oys))
>
> Now on to your script. A couple of minor comments first
>
> text(1,9,r'$dx/dt = \alpha y^{2}$', fontsize=15)
>
> the brackets for superscripts are not required; eg, the following is
> ok
>
> text(1,9,r'$dx/dt = \alpha y^2$', fontsize=15)
In TeX, the curly brackets are necessary when you want more than one
character in the subscript or subscript. That's why I had them there
since I was, at first tryin to do a more complex example.
>
> Normally math functions like sin, cos, exp are in roman type, so I
> would use
>
> text(1,7,r'$dz/dt = \gamma x^2+\rm{sin}(2\pi y+\phi)$', fontsize=15)
>
>
You are right, thanks.
> As for sqrt, the mathtext syntax differs from TeX. The main reason is
> that I don't draw an overbar with the sqrt symbol group, though this
> is something I can add (probably when I get around to dealing with
> frac, etc, all of which require some additional drawing and layout).
> The point is, you can't use the curly brackets with sqrt or you get a
> (silent) parse error. I'll try and amend the parser to allow the
> group.
That would be a nice idea not to move away from standard TeX syntax...
>
> In the meantime, just do
>
> text(1,5,r'$\phi = zy + \Sqrt\alpha\beta $', fontsize=15)
>
> I noticed there is a small clipping bug with sqrt. There are still
> some hacks in the way I layout the cmex fonts which are discussed in
> the mathtext documentation - the clipping problem likely arises from
> this hack.
>
> Also, note that spaces are respected in font mode, so a hackish way to
> include them is \rm{ }. I've put adding the TeX small space command
> \/ on the (growing at an alarming rate) TODO list. So if you want a
> space after zy, you can do
Ok, TeX has a whole range of space commands that are import to tweak the
layout of math expressions.
Does mathtext support formatting multiline strings? waht about TeX's
line break command '\\'?
>
> text(1,5,r'$\phi = zy\rm{ } + \sqrt\alpha\beta $', fontsize=15)
>
> That's it; here is the modified script that looks great!
Thanks again John, mathtext is a great piece of software, and a life
saver for people like me that need to include math symbols in their
software. I wish I could use it on other parts of my GUI such as menus,
window titles and etc.
>
> from matplotlib.matlab import *
> figure(1, figsize=(5,5), dpi=100)
> subplot(111)
> plot([0])
>
> a=axis([0,10,0,10])
> title('Equation Box')
> set(gca(),'xticklabels',[])
> set(gca(),'yticklabels',[])
> set(gca(),'xticks',[])
> set(gca(),'yticks',[])
>
> text(1,9,r'$dx/dt = \alpha y^2$', fontsize=15)
> text(1,8,r'$dy/dt = \beta x^2$', fontsize=15)
> text(1,7,r'$dz/dt = \gamma x^2+\rm{sin}(2\pi y+\phi)$', fontsize=15)
> text(1,5,r'$\phi = zy\rm{ } + \sqrt\alpha\beta $', fontsize=15)
>
>
> show()
>
|
|
From: John H. <jdh...@ac...> - 2004-04-07 13:39:07
|
>>>>> "Flavio" == Flavio Codeco Coelho <fcc...@ci...> writes:
Hi Flavio,
On an unrelated note, you will be happy to know that wxagg will be
included in the next release, probably early next week. It's
currently in CVS if you want to get started right away. font support
has been thoroughly revised and improved by Paul Barrett, and these
changes are not currently documented, so be don't be surprised if you
get some unexpected font warnings in the CVS version.
Flavio> Hi john , I was doing a pure TeX plot (a bunch of
Flavio> equations inside a box) and I noticed that the
Flavio> \sqrt{}command does not work even though it listed in the
Flavio> help page for mathtext.
Flavio> \frac and \dfrac would be a nice addition too...
Agreed. And I guess asking for &=& array layout will be coming soon
:-)
Flavio> feel free to used this little script as an example of
Flavio> another use of mathtext...
I will - they look nice! If you add more to it, be sure to send me
the updated version.
John Gill has written a Cell class for his Table class which is
basically a rectangular box with a text instance inside. It might be
nice to generalize that code to allow multiple lines of text to be
added
cell.add_line(t1)
cell.add_line(t2)
Cell already handles autosizing of the box to surround the text, and
you wouldn't have to mess with turning off the ticks, etc.... John
might be willing to do this, and it could be wrapped in a nice
interface command textbox.
Flavio> Flavio """ This script create a box with a series of
Flavio> equations
Your code revealed one bug unrelated to the sqrt problem you
described, but you need to make the change below to have your example
render properly. In mathtext.py, in the function math_parse_s, change
maxoy = max(oys)
to
maxoy = abs(max(oys))
Now on to your script. A couple of minor comments first
text(1,9,r'$dx/dt = \alpha y^{2}$', fontsize=15)
the brackets for superscripts are not required; eg, the following is
ok
text(1,9,r'$dx/dt = \alpha y^2$', fontsize=15)
Normally math functions like sin, cos, exp are in roman type, so I
would use
text(1,7,r'$dz/dt = \gamma x^2+\rm{sin}(2\pi y+\phi)$', fontsize=15)
As for sqrt, the mathtext syntax differs from TeX. The main reason is
that I don't draw an overbar with the sqrt symbol group, though this
is something I can add (probably when I get around to dealing with
frac, etc, all of which require some additional drawing and layout).
The point is, you can't use the curly brackets with sqrt or you get a
(silent) parse error. I'll try and amend the parser to allow the
group.
In the meantime, just do
text(1,5,r'$\phi = zy + \Sqrt\alpha\beta $', fontsize=15)
I noticed there is a small clipping bug with sqrt. There are still
some hacks in the way I layout the cmex fonts which are discussed in
the mathtext documentation - the clipping problem likely arises from
this hack.
Also, note that spaces are respected in font mode, so a hackish way to
include them is \rm{ }. I've put adding the TeX small space command
\/ on the (growing at an alarming rate) TODO list. So if you want a
space after zy, you can do
text(1,5,r'$\phi = zy\rm{ } + \sqrt\alpha\beta $', fontsize=15)
That's it; here is the modified script that looks great!
from matplotlib.matlab import *
figure(1, figsize=(5,5), dpi=100)
subplot(111)
plot([0])
a=axis([0,10,0,10])
title('Equation Box')
set(gca(),'xticklabels',[])
set(gca(),'yticklabels',[])
set(gca(),'xticks',[])
set(gca(),'yticks',[])
text(1,9,r'$dx/dt = \alpha y^2$', fontsize=15)
text(1,8,r'$dy/dt = \beta x^2$', fontsize=15)
text(1,7,r'$dz/dt = \gamma x^2+\rm{sin}(2\pi y+\phi)$', fontsize=15)
text(1,5,r'$\phi = zy\rm{ } + \sqrt\alpha\beta $', fontsize=15)
show()
|
|
From: Greg W. <gr...@th...> - 2004-04-07 11:42:26
|
I assume that's a typo and is supposed to be "f(x)=-5 for [15,18]. Is
this what you want?
plot([0,5,5,15,15,18],
[1,1,9, 9,-5,-5])
On Wed, 2004-04-07 at 05:12, Vincent BOYER wrote:
> Hi everybody.
>
> Related to this discussion, here is something else that could be very
> useful for me :
>
> Let's say
>
> t =[0,5,15,18]
> s = [1,9,-5]
>
> I'd like to plot a curve f(x) using s and t in a way that :
> - f(x)=1 for x in [0,5]
> - f(x)=9 for x in [5,15]
> - f(x)=-51 for x in [5,18]
>
> Is there already a simple way to do that using Matplotlib, and if not, would it be possible to add it?
>
> Thanx
> Vincent
>
>
>
> John Hunter wrote:
>
> >>>>>>"Peter" == Peter Groszkowski <pgr...@ge...> writes:
> >>>>>>
> >
> > Peter> Hi everyone: I was wondering whether it is possible to tell
> > Peter> matplotlib how/when to connect data points. Consider this
> > Peter> simple script:
> >
> > Peter> from matplotlib.matlab import * figure(1) t =
> > Peter> [0,1,2,3,4,5,105,106,107] s = [1,4,5,3,9,11,-5,-8,3]
> > Peter> plot(t, s, antialiased=False) grid(True) show()
> >
> >
> > Peter> There are no data points between t=5 and t=105. By default
> > Peter> the points (5,11) and (105,-5) are connected, but I would
> > Peter> like to tell matplotlib NOT to do so. In my case I would
> > Peter> like to pass the plot function a variable telling it what
> > Peter> to do. So for example would have:
> >
> > Peter> plot(t, s, max_delta=40)
> >
> > Peter> This would mean that the points are only to be connected if
> > Peter> the difference between the adjacent t values is less than
> > Peter> 40. In my case this is relevant because sometimes there
> > Peter> are "holes" in my data, and connecting the points makes the
> > Peter> plots look very messy.
> >
> > Peter> Would anyone find something like this useful? Would it be
> > Peter> difficult to implement?
> >
> >Certainly not difficult, and probably useful enough to put in the
> >standard distro. Eg, in a stock market trading example, you would
> >have lots of quotes, minute by minute, punctuated by long intervals
> >overnight where the market is closed. If you set maxdelta
> >appropriately, you could draw connected lines only within trading
> >days.
> >
> >Here is a sample implementation
> >
> >from matplotlib.matlab import *
> >def segplot(x, y, fmt, maxdelta, **kwargs):
> > """
> > Plot x versus y, breaking the plot at any point where x[i] -
> > x[i-1] > maxdelta. kwargs are passed on to plot
> > """
> > x = asarray(x)
> > y = asarray(y)
> > d = diff(x)
> > lines = []
> > ind = nonzero(greater(d, maxdelta))
> > ind = ind+1
> > if not len(ind):
> > lines.extend( plot(x,y,fmt,**kwargs) )
> > else:
> > allind = [0]
> > allind.extend(ind)
> > allind.append(len(x))
> > for i1,i2 in zip(allind[:-1], allind[1:]):
> > lines.extend( plot(x[i1:i2], y[i1:i2], fmt, **kwargs) )
> > return lines
> >
> >t = [0,1,2,3,4,5,105,106,107,187, 200, 212, 300, 320]
> >s = [1,4,5,3,9,11,-5,-8,3,12, 15, 12, -1, 3]
> >segplot(t, s, 'b-o', 40, antialiased=False)
> >grid(True)
> >show()
> >
> >I'm inclined not to make this part of plot, since plot processes a
> >variable number of arguments it makes it a little difficult.
> >Certainly doable, but I'm hesitant to put too much on plot because it
> >might become unwieldy. But a new function, like segment plot, would
> >be easy enough to include.
> >
> >Any suggestions for a name, or additional functionality?
> >
> >JDH
> >
> >
> >-------------------------------------------------------
> >This SF.Net email is sponsored by: IBM Linux Tutorials
> >Free Linux tutorial presented by Daniel Robbins, President and CEO of
> >GenToo technologies. Learn everything from fundamentals to system
> >administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
> >_______________________________________________
> >Matplotlib-users mailing list
> >Mat...@li...
> >https://lists.sourceforge.net/lists/listinfo/matplotlib-users
> >
> >
>
>
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by: IBM Linux Tutorials
> Free Linux tutorial presented by Daniel Robbins, President and CEO of
> GenToo technologies. Learn everything from fundamentals to system
> administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
--
Greg Whittier <gr...@th...>
|
|
From: Vincent B. <bo...@cl...> - 2004-04-07 09:12:17
|
Hi everybody. Related to this discussion, here is something else that could be very useful for me : Let's say t =[0,5,15,18] s = [1,9,-5] I'd like to plot a curve f(x) using s and t in a way that : - f(x)=1 for x in [0,5] - f(x)=9 for x in [5,15] - f(x)=-51 for x in [5,18] Is there already a simple way to do that using Matplotlib, and if not, would it be possible to add it? Thanx Vincent John Hunter wrote: >>>>>>"Peter" == Peter Groszkowski <pgr...@ge...> writes: >>>>>> > > Peter> Hi everyone: I was wondering whether it is possible to tell > Peter> matplotlib how/when to connect data points. Consider this > Peter> simple script: > > Peter> from matplotlib.matlab import * figure(1) t = > Peter> [0,1,2,3,4,5,105,106,107] s = [1,4,5,3,9,11,-5,-8,3] > Peter> plot(t, s, antialiased=False) grid(True) show() > > > Peter> There are no data points between t=5 and t=105. By default > Peter> the points (5,11) and (105,-5) are connected, but I would > Peter> like to tell matplotlib NOT to do so. In my case I would > Peter> like to pass the plot function a variable telling it what > Peter> to do. So for example would have: > > Peter> plot(t, s, max_delta=40) > > Peter> This would mean that the points are only to be connected if > Peter> the difference between the adjacent t values is less than > Peter> 40. In my case this is relevant because sometimes there > Peter> are "holes" in my data, and connecting the points makes the > Peter> plots look very messy. > > Peter> Would anyone find something like this useful? Would it be > Peter> difficult to implement? > >Certainly not difficult, and probably useful enough to put in the >standard distro. Eg, in a stock market trading example, you would >have lots of quotes, minute by minute, punctuated by long intervals >overnight where the market is closed. If you set maxdelta >appropriately, you could draw connected lines only within trading >days. > >Here is a sample implementation > >from matplotlib.matlab import * >def segplot(x, y, fmt, maxdelta, **kwargs): > """ > Plot x versus y, breaking the plot at any point where x[i] - > x[i-1] > maxdelta. kwargs are passed on to plot > """ > x = asarray(x) > y = asarray(y) > d = diff(x) > lines = [] > ind = nonzero(greater(d, maxdelta)) > ind = ind+1 > if not len(ind): > lines.extend( plot(x,y,fmt,**kwargs) ) > else: > allind = [0] > allind.extend(ind) > allind.append(len(x)) > for i1,i2 in zip(allind[:-1], allind[1:]): > lines.extend( plot(x[i1:i2], y[i1:i2], fmt, **kwargs) ) > return lines > >t = [0,1,2,3,4,5,105,106,107,187, 200, 212, 300, 320] >s = [1,4,5,3,9,11,-5,-8,3,12, 15, 12, -1, 3] >segplot(t, s, 'b-o', 40, antialiased=False) >grid(True) >show() > >I'm inclined not to make this part of plot, since plot processes a >variable number of arguments it makes it a little difficult. >Certainly doable, but I'm hesitant to put too much on plot because it >might become unwieldy. But a new function, like segment plot, would >be easy enough to include. > >Any suggestions for a name, or additional functionality? > >JDH > > >------------------------------------------------------- >This SF.Net email is sponsored by: IBM Linux Tutorials >Free Linux tutorial presented by Daniel Robbins, President and CEO of >GenToo technologies. Learn everything from fundamentals to system >administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click >_______________________________________________ >Matplotlib-users mailing list >Mat...@li... >https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > |