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
(13) |
3
(5) |
4
(5) |
5
(21) |
6
(10) |
7
(9) |
|
8
(4) |
9
(11) |
10
(9) |
11
(11) |
12
(25) |
13
(5) |
14
(2) |
|
15
(5) |
16
(8) |
17
(16) |
18
(11) |
19
(15) |
20
(5) |
21
(8) |
|
22
(4) |
23
(24) |
24
(9) |
25
(14) |
26
(5) |
27
(28) |
28
(2) |
|
29
(13) |
30
(14) |
31
(11) |
|
|
|
|
|
From: Paul I. <piv...@gm...> - 2012-01-10 23:07:04
|
Thanks for the report, Ethan, Ethan Swint, on 2012-01-10 16:34, wrote: > Can anyone else reproduce? Confirming, this is a bug. We need to change the matplotlib code, but I'm not sure how to proceed. I've filed it as the ominously numbered matplotlib issue #666 https://github.com/matplotlib/matplotlib/issues/666 > It seems that 'xi,yi = np.meshgrid(xi,yi)' from line 2766 of mlab.py > doesn't always produce uniformly spaced data, as the test for uniform > data fails at line 2779. Ignoring the error, however, results in > satisfactory evaluation of interp() on 2783. That's not quite the issue here, as meshgrid simply reshapes and repeats the data that you hand it. At first I was going to blame linspace, because a similar issue came up on this list late last year, and in that example, simply using arange instead of linspace resolved the issue: http://old.nabble.com/constant-spacing-with-griddata-td33007330.html#a33007330 There, I considered the possibility that either (or both) the numpy and mpl code should be changed. With your example, I'm convinced now the MPL code needs to change, since here, linspace and arange produce identical results. The reason I'm not sure how to proceed is that the difference between dx.max() and dx.min() can be an order of magnitude greater than the epsx value it is compared against. Here's a modification to your example that does this In [155]: xi = np.linspace(0,603,100);dx =np.diff(xi); dx.ptp() Out[155]: 0.00000000000011368684 In [157]: zi = griddata(x,y,z,xi,yi,interp='linear') --error-- In [158]: debug > /home/pi/usr/local/lib/python2.6/site-packages/matplotlib/mlab.py(2780)griddata() 2779 if dx.max()-dx.min() > epsx or dy.max()-dy.min() > epsy: -> 2780 raise ValueError("output grid must have constant spacing" 2781 " when using interp='linear'") ipdb> dx.ptp() 1.1368683772161603e-13 ipdb> epsx 1.0000000000000001e-15 ipdb> I believe that this has to do with the limited precision and non-uniformity of the possible numbers represented by the floating point standard. The check for constant spacing likely should take into account and compare dx.ptp() to the average dx itself, or something like that. best, -- Paul Ivanov 314 address only used for lists, off-list direct email at: http://pirsquared.org | GPG/PGP key id: 0x0F3E28F7 |
|
From: Ethan S. <es...@vt...> - 2012-01-10 21:34:55
|
Hi- I was working off of the example listed at http://matplotlib.sourceforge.net/examples/pylab_examples/griddata_demo.html, adapting it to my own data, and encountered the following error on MLAB 1.1.0, Python 2.7.2: <code> from numpy.random import uniform, seed from matplotlib.mlab import griddata import matplotlib.pyplot as plt import numpy as np # make up data. #npts = int(raw_input('enter # of random points to plot:')) seed(0) npts = 200 x = uniform(-2,2,npts) y = uniform(-2,2,npts) z = x*np.exp(-x**2-y**2) xi = np.linspace(0,60,100) # <= my xdata range yi = np.linspace(0,0.9,200) # <= my ydata range zi = griddata(x,y,z,xi,yi,interp='linear') </code> which produces --------------------------------------------------------------------------- ValueError Traceback (most recent call last) C:\Users\Ethan\code\PythonScripts\<ipython-input-7-51e10e494403> in <module>() ----> 1 zi = griddata(x,y,z,xi,yi,interp='linear') It seems that 'xi,yi = np.meshgrid(xi,yi)' from line 2766 of mlab.py doesn't always produce uniformly spaced data, as the test for uniform data fails at line 2779. Ignoring the error, however, results in satisfactory evaluation of interp() on 2783. Can anyone else reproduce? Regards, Ethan |
|
From: Nat E. <nat...@gm...> - 2012-01-10 17:52:47
|
I am still seeing the error below in matplotlib-1.1.0 - the bug occurs when the user installs our software to the directory "version1", uses that installation, then installs "version2" and removes "version1", which breaks matplotlib because (unlike any other Python module I've ever used) the absolute font paths are hardwired into the user's local configuration. I was told nearly a year ago that this was already fixed in SVN, but clearly this is not the case. Is there a workaround for this other than emailing every user who complains and telling him/her to rm -rf ~/.matplotlib? thanks, Nat File "/Users/nat/version2/Python.framework/Versions/Current/lib/python2.7/site-packages/matplotlib/backends/backend_wxagg.py", line 59, in draw FigureCanvasAgg.draw(self) File "/Users/nat/version2/Python.framework/Versions/Current/lib/python2.7/site-packages/matplotlib/backends/backend_agg.py", line 401, in draw self.figure.draw(self.renderer) File "/Users/nat/version2/Python.framework/Versions/Current/lib/python2.7/site-packages/matplotlib/artist.py", line 55, in draw_wrapper draw(artist, renderer, *args, **kwargs) File "/Users/nat/version2/Python.framework/Versions/Current/lib/python2.7/site-packages/matplotlib/figure.py", line 884, in draw func(*args) File "/Users/nat/version2/Python.framework/Versions/Current/lib/python2.7/site-packages/matplotlib/artist.py", line 55, in draw_wrapper draw(artist, renderer, *args, **kwargs) File "/Users/nat/version2/Python.framework/Versions/Current/lib/python2.7/site-packages/matplotlib/axes.py", line 1983, in draw a.draw(renderer) File "/Users/nat/version2/Python.framework/Versions/Current/lib/python2.7/site-packages/matplotlib/artist.py", line 55, in draw_wrapper draw(artist, renderer, *args, **kwargs) File "/Users/nat/version2/Python.framework/Versions/Current/lib/python2.7/site-packages/matplotlib/axis.py", line 1037, in draw ticklabelBoxes, ticklabelBoxes2 = self._get_tick_bboxes(ticks_to_draw, renderer) File "/Users/nat/version2/Python.framework/Versions/Current/lib/python2.7/site-packages/matplotlib/axis.py", line 988, in _get_tick_bboxes extent = tick.label1.get_window_extent(renderer) File "/Users/nat/version2/Python.framework/Versions/Current/lib/python2.7/site-packages/matplotlib/text.py", line 747, in get_window_extent bbox, info = self._get_layout(self._renderer) File "/Users/nat/version2/Python.framework/Versions/Current/lib/python2.7/site-packages/matplotlib/text.py", line 300, in _get_layout ismath=False) File "/Users/nat/version2/Python.framework/Versions/Current/lib/python2.7/site-packages/matplotlib/backends/backend_agg.py", line 183, in get_text_width_height_descent font = self._get_agg_font(prop) File "/Users/nat/version2/Python.framework/Versions/Current/lib/python2.7/site-packages/matplotlib/backends/backend_agg.py", line 224, in _get_agg_font font = FT2Font(str(fname)) RuntimeError: Could not open facefile /Users/nat/version1/Python.framework/Versions/Current/lib/python2.7/site-packages/matplotlib/mpl-data/fonts/ttf/VeraMono.ttf; Cannot_Open_Resource |
|
From: Daniel H. <dh...@gm...> - 2012-01-10 15:41:56
|
Regardless of exactly which polynomial you are after, I've showed you how
to plot a cheb. poly. Can you not work with the code given and plot the
exact variation of polynomial you want?
On Tue, Jan 10, 2012 at 9:46 AM, Fabien Lafont <laf...@gm...>wrote:
> No I just want to plot the third Shebitchev polynomial.
>
> 2012/1/10 Daniel Hyams <dh...@gm...>:
> > I think that you're misusing Chebyshev (do you really only want to give
> "3"
> > as a coefficient..which is just the constant function 3), and you have to
> > evaluate it in order to give matplotlib some x and y data to plot.
> >
> > from matplotlib import pyplot as plt
> > import numpy as np
> >
> > x = np.linspace(-1.0,1.0)
> > test = np.polynomial.Chebyshev((1,2,3))
> > y = test(x)
> > plt.plot(x,y)
> > plt.show()
> >
> >
> >
> > On Tue, Jan 10, 2012 at 9:10 AM, Fabien Lafont <laf...@gm...>
> > wrote:
> >>
> >> I'm trying to plot Chebyshev polynolmials using:
> >> numpy.polynomial.Chebyshev:
> >>
> >>
> >> import math
> >> from numpy import *
> >> from numpy import polynomial as pol
> >> from pylab import *
> >> from scipy import *
> >> from scipy import optimize
> >> import warnings
> >> warnings.simplefilter('ignore', np.RankWarning)
> >>
> >>
> >> test = pol.Chebyshev(3)
> >> print test
> >> plot (test)
> >>
> >>
> >> show()
> >> =======================================================================
> >>
> >> The print return: cheb([ 3.])
> >>
> >> =======================================================================
> >> and plot :
> >>
> >>
> >> Traceback (most recent call last):
> >> File "T:\Dropbox\Thèse\Python\fit sonde\test_poly_Tcheb.py", line
> >> 32, in <module>
> >> plot (test)
> >> File "C:\Python27\lib\site-packages\matplotlib\pyplot.py", line 2458,
> in
> >> plot
> >> ret = ax.plot(*args, **kwargs)
> >> File "C:\Python27\lib\site-packages\matplotlib\axes.py", line 3849, in
> >> plot
> >> self.add_line(line)
> >> File "C:\Python27\lib\site-packages\matplotlib\axes.py", line 1443,
> >> in add_line
> >> self._update_line_limits(line)
> >> File "C:\Python27\lib\site-packages\matplotlib\axes.py", line 1451,
> >> in _update_line_limits
> >> p = line.get_path()
> >> File "C:\Python27\lib\site-packages\matplotlib\lines.py", line 644,
> >> in get_path
> >> self.recache()
> >> File "C:\Python27\lib\site-packages\matplotlib\lines.py", line 401, in
> >> recache
> >> y = np.asarray(yconv, np.float_)
> >> File "C:\Python27\lib\site-packages\numpy\core\numeric.py", line
> >> 235, in asarray
> >> return array(a, dtype, copy=False, order=order)
> >> TypeError: float() argument must be a string or a number
> >>
> >>
> >>
> ------------------------------------------------------------------------------
> >> Write once. Port to many.
> >> Get the SDK and tools to simplify cross-platform app development. Create
> >> new or port existing apps to sell to consumers worldwide. Explore the
> >> Intel AppUpSM program developer opportunity.
> appdeveloper.intel.com/join
> >> http://p.sf.net/sfu/intel-appdev
> >> _______________________________________________
> >> Matplotlib-users mailing list
> >> Mat...@li...
> >> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
> >
> >
> >
> >
> > --
> > Daniel Hyams
> > dh...@gm...
> >
> >
> ------------------------------------------------------------------------------
> > Write once. Port to many.
> > Get the SDK and tools to simplify cross-platform app development. Create
> > new or port existing apps to sell to consumers worldwide. Explore the
> > Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join
> > http://p.sf.net/sfu/intel-appdev
> > _______________________________________________
> > Matplotlib-users mailing list
> > Mat...@li...
> > https://lists.sourceforge.net/lists/listinfo/matplotlib-users
> >
>
--
Daniel Hyams
dh...@gm...
|
|
From: <jos...@gm...> - 2012-01-10 15:22:20
|
I'm not used to reply-all
---------- Forwarded message ----------
From: <jos...@gm...>
Date: Tue, Jan 10, 2012 at 10:20 AM
Subject: Re: [Matplotlib-users] How to plot Chebyshev polynolmials
To: Fabien Lafont <laf...@gm...>
On Tue, Jan 10, 2012 at 9:46 AM, Fabien Lafont <laf...@gm...> wrote:
> No I just want to plot the third Shebitchev polynomial.
the vander functions give you the basis functions for a given x, or
use coefficients only for the polynomial you want, if I understand
correctly what you want
>>> import numpy as np
>>> from numpy import polynomial as poly
>>> chebs = [poly.Chebyshev(coef) for coef in np.eye(5)]
>>> for p in chebs: plt.plot(x, p(x))
...
[<matplotlib.lines.Line2D object at 0x046D91F0>]
[<matplotlib.lines.Line2D object at 0x046D9510>]
[<matplotlib.lines.Line2D object at 0x046D9830>]
[<matplotlib.lines.Line2D object at 0x046D9B50>]
[<matplotlib.lines.Line2D object at 0x046D9E70>]
>>> plt.show()
or
>>> plt.plot(poly.chebvander(x, 5))
Josef
>
> 2012/1/10 Daniel Hyams <dh...@gm...>:
>> I think that you're misusing Chebyshev (do you really only want to give "3"
>> as a coefficient..which is just the constant function 3), and you have to
>> evaluate it in order to give matplotlib some x and y data to plot.
>>
>> from matplotlib import pyplot as plt
>> import numpy as np
>>
>> x = np.linspace(-1.0,1.0)
>> test = np.polynomial.Chebyshev((1,2,3))
>> y = test(x)
>> plt.plot(x,y)
>> plt.show()
>>
>>
>>
>> On Tue, Jan 10, 2012 at 9:10 AM, Fabien Lafont <laf...@gm...>
>> wrote:
>>>
>>> I'm trying to plot Chebyshev polynolmials using:
>>> numpy.polynomial.Chebyshev:
>>>
>>>
>>> import math
>>> from numpy import *
>>> from numpy import polynomial as pol
>>> from pylab import *
>>> from scipy import *
>>> from scipy import optimize
>>> import warnings
>>> warnings.simplefilter('ignore', np.RankWarning)
>>>
>>>
>>> test = pol.Chebyshev(3)
>>> print test
>>> plot (test)
>>>
>>>
>>> show()
>>> =======================================================================
>>>
>>> The print return: cheb([ 3.])
>>>
>>> =======================================================================
>>> and plot :
>>>
>>>
>>> Traceback (most recent call last):
>>> File "T:\Dropbox\Thèse\Python\fit sonde\test_poly_Tcheb.py", line
>>> 32, in <module>
>>> plot (test)
>>> File "C:\Python27\lib\site-packages\matplotlib\pyplot.py", line 2458, in
>>> plot
>>> ret = ax.plot(*args, **kwargs)
>>> File "C:\Python27\lib\site-packages\matplotlib\axes.py", line 3849, in
>>> plot
>>> self.add_line(line)
>>> File "C:\Python27\lib\site-packages\matplotlib\axes.py", line 1443,
>>> in add_line
>>> self._update_line_limits(line)
>>> File "C:\Python27\lib\site-packages\matplotlib\axes.py", line 1451,
>>> in _update_line_limits
>>> p = line.get_path()
>>> File "C:\Python27\lib\site-packages\matplotlib\lines.py", line 644,
>>> in get_path
>>> self.recache()
>>> File "C:\Python27\lib\site-packages\matplotlib\lines.py", line 401, in
>>> recache
>>> y = np.asarray(yconv, np.float_)
>>> File "C:\Python27\lib\site-packages\numpy\core\numeric.py", line
>>> 235, in asarray
>>> return array(a, dtype, copy=False, order=order)
>>> TypeError: float() argument must be a string or a number
>>>
>>>
>>> ------------------------------------------------------------------------------
>>> Write once. Port to many.
>>> Get the SDK and tools to simplify cross-platform app development. Create
>>> new or port existing apps to sell to consumers worldwide. Explore the
>>> Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join
>>> http://p.sf.net/sfu/intel-appdev
>>> _______________________________________________
>>> Matplotlib-users mailing list
>>> Mat...@li...
>>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>>
>>
>>
>>
>> --
>> Daniel Hyams
>> dh...@gm...
>>
>> ------------------------------------------------------------------------------
>> Write once. Port to many.
>> Get the SDK and tools to simplify cross-platform app development. Create
>> new or port existing apps to sell to consumers worldwide. Explore the
>> Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join
>> http://p.sf.net/sfu/intel-appdev
>> _______________________________________________
>> Matplotlib-users mailing list
>> Mat...@li...
>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>>
>
> ------------------------------------------------------------------------------
> Write once. Port to many.
> Get the SDK and tools to simplify cross-platform app development. Create
> new or port existing apps to sell to consumers worldwide. Explore the
> Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join
> http://p.sf.net/sfu/intel-appdev
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
|
|
From: Fabien L. <laf...@gm...> - 2012-01-10 14:47:02
|
No I just want to plot the third Shebitchev polynomial.
2012/1/10 Daniel Hyams <dh...@gm...>:
> I think that you're misusing Chebyshev (do you really only want to give "3"
> as a coefficient..which is just the constant function 3), and you have to
> evaluate it in order to give matplotlib some x and y data to plot.
>
> from matplotlib import pyplot as plt
> import numpy as np
>
> x = np.linspace(-1.0,1.0)
> test = np.polynomial.Chebyshev((1,2,3))
> y = test(x)
> plt.plot(x,y)
> plt.show()
>
>
>
> On Tue, Jan 10, 2012 at 9:10 AM, Fabien Lafont <laf...@gm...>
> wrote:
>>
>> I'm trying to plot Chebyshev polynolmials using:
>> numpy.polynomial.Chebyshev:
>>
>>
>> import math
>> from numpy import *
>> from numpy import polynomial as pol
>> from pylab import *
>> from scipy import *
>> from scipy import optimize
>> import warnings
>> warnings.simplefilter('ignore', np.RankWarning)
>>
>>
>> test = pol.Chebyshev(3)
>> print test
>> plot (test)
>>
>>
>> show()
>> =======================================================================
>>
>> The print return: cheb([ 3.])
>>
>> =======================================================================
>> and plot :
>>
>>
>> Traceback (most recent call last):
>> File "T:\Dropbox\Thèse\Python\fit sonde\test_poly_Tcheb.py", line
>> 32, in <module>
>> plot (test)
>> File "C:\Python27\lib\site-packages\matplotlib\pyplot.py", line 2458, in
>> plot
>> ret = ax.plot(*args, **kwargs)
>> File "C:\Python27\lib\site-packages\matplotlib\axes.py", line 3849, in
>> plot
>> self.add_line(line)
>> File "C:\Python27\lib\site-packages\matplotlib\axes.py", line 1443,
>> in add_line
>> self._update_line_limits(line)
>> File "C:\Python27\lib\site-packages\matplotlib\axes.py", line 1451,
>> in _update_line_limits
>> p = line.get_path()
>> File "C:\Python27\lib\site-packages\matplotlib\lines.py", line 644,
>> in get_path
>> self.recache()
>> File "C:\Python27\lib\site-packages\matplotlib\lines.py", line 401, in
>> recache
>> y = np.asarray(yconv, np.float_)
>> File "C:\Python27\lib\site-packages\numpy\core\numeric.py", line
>> 235, in asarray
>> return array(a, dtype, copy=False, order=order)
>> TypeError: float() argument must be a string or a number
>>
>>
>> ------------------------------------------------------------------------------
>> Write once. Port to many.
>> Get the SDK and tools to simplify cross-platform app development. Create
>> new or port existing apps to sell to consumers worldwide. Explore the
>> Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join
>> http://p.sf.net/sfu/intel-appdev
>> _______________________________________________
>> Matplotlib-users mailing list
>> Mat...@li...
>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
>
>
>
> --
> Daniel Hyams
> dh...@gm...
>
> ------------------------------------------------------------------------------
> Write once. Port to many.
> Get the SDK and tools to simplify cross-platform app development. Create
> new or port existing apps to sell to consumers worldwide. Explore the
> Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join
> http://p.sf.net/sfu/intel-appdev
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
|
|
From: Daniel H. <dh...@gm...> - 2012-01-10 14:34:31
|
I think that you're misusing Chebyshev (do you really only want to give "3"
as a coefficient..which is just the constant function 3), and you have to
evaluate it in order to give matplotlib some x and y data to plot.
from matplotlib import pyplot as plt
import numpy as np
x = np.linspace(-1.0,1.0)
test = np.polynomial.Chebyshev((1,2,3))
y = test(x)
plt.plot(x,y)
plt.show()
On Tue, Jan 10, 2012 at 9:10 AM, Fabien Lafont <laf...@gm...>wrote:
> I'm trying to plot Chebyshev polynolmials using:
> numpy.polynomial.Chebyshev:
>
>
> import math
> from numpy import *
> from numpy import polynomial as pol
> from pylab import *
> from scipy import *
> from scipy import optimize
> import warnings
> warnings.simplefilter('ignore', np.RankWarning)
>
>
> test = pol.Chebyshev(3)
> print test
> plot (test)
>
>
> show()
> =======================================================================
>
> The print return: cheb([ 3.])
>
> =======================================================================
> and plot :
>
>
> Traceback (most recent call last):
> File "T:\Dropbox\Thèse\Python\fit sonde\test_poly_Tcheb.py", line
> 32, in <module>
> plot (test)
> File "C:\Python27\lib\site-packages\matplotlib\pyplot.py", line 2458, in
> plot
> ret = ax.plot(*args, **kwargs)
> File "C:\Python27\lib\site-packages\matplotlib\axes.py", line 3849, in
> plot
> self.add_line(line)
> File "C:\Python27\lib\site-packages\matplotlib\axes.py", line 1443,
> in add_line
> self._update_line_limits(line)
> File "C:\Python27\lib\site-packages\matplotlib\axes.py", line 1451,
> in _update_line_limits
> p = line.get_path()
> File "C:\Python27\lib\site-packages\matplotlib\lines.py", line 644,
> in get_path
> self.recache()
> File "C:\Python27\lib\site-packages\matplotlib\lines.py", line 401, in
> recache
> y = np.asarray(yconv, np.float_)
> File "C:\Python27\lib\site-packages\numpy\core\numeric.py", line
> 235, in asarray
> return array(a, dtype, copy=False, order=order)
> TypeError: float() argument must be a string or a number
>
>
> ------------------------------------------------------------------------------
> Write once. Port to many.
> Get the SDK and tools to simplify cross-platform app development. Create
> new or port existing apps to sell to consumers worldwide. Explore the
> Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join
> http://p.sf.net/sfu/intel-appdev
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
--
Daniel Hyams
dh...@gm...
|
|
From: Fabien L. <laf...@gm...> - 2012-01-10 14:10:35
|
I'm trying to plot Chebyshev polynolmials using: numpy.polynomial.Chebyshev:
import math
from numpy import *
from numpy import polynomial as pol
from pylab import *
from scipy import *
from scipy import optimize
import warnings
warnings.simplefilter('ignore', np.RankWarning)
test = pol.Chebyshev(3)
print test
plot (test)
show()
=======================================================================
The print return: cheb([ 3.])
=======================================================================
and plot :
Traceback (most recent call last):
File "T:\Dropbox\Thèse\Python\fit sonde\test_poly_Tcheb.py", line
32, in <module>
plot (test)
File "C:\Python27\lib\site-packages\matplotlib\pyplot.py", line 2458, in plot
ret = ax.plot(*args, **kwargs)
File "C:\Python27\lib\site-packages\matplotlib\axes.py", line 3849, in plot
self.add_line(line)
File "C:\Python27\lib\site-packages\matplotlib\axes.py", line 1443,
in add_line
self._update_line_limits(line)
File "C:\Python27\lib\site-packages\matplotlib\axes.py", line 1451,
in _update_line_limits
p = line.get_path()
File "C:\Python27\lib\site-packages\matplotlib\lines.py", line 644,
in get_path
self.recache()
File "C:\Python27\lib\site-packages\matplotlib\lines.py", line 401, in recache
y = np.asarray(yconv, np.float_)
File "C:\Python27\lib\site-packages\numpy\core\numeric.py", line
235, in asarray
return array(a, dtype, copy=False, order=order)
TypeError: float() argument must be a string or a number
|
|
From: bhargav v. <coo...@gm...> - 2012-01-10 00:31:46
|
Hello All,
I have two questions regarding the matplotlib Slider and animation.
Question 1: How to create an image along with a Slider axes, such that the Slider values changes with time?
Here is the example structure of the code I am trying but unsuccessful to have an animated Slider that changes with time.
def complicated_image(Timestep):
"""Write code to create complicated image where all variables to plot are certain functions of Timestep"""
p2 = plt.quiver(X,Y,Z1,Z2)
p3 = plt.pcolormesh(Delta0)
p1 = plt.contour(r,z,value,10)
return plt.gca() [ Question 2 : Is there are better way to return the axis so that it can be used in the animate_image function.]
def animate_image():
f1 = figure()
ax = gca()
for i in range(100):
ax.cla()
ax = complicated_image(i)
axtime = plt.axes([0.1,0.01,0.8,0.02],axisbg='white')
stime = Slider(axtime,'TimeStep',0,100,valinit=0)
f1.savefig('slidertest%03d.png'%i)
If I omit the lines containing the axtime axes (i.e. the part related to Slider) then I get the image properly that changes with time but of course without the Slider.
Regards
Bhargav Vaidya
|