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
(13) |
2
(11) |
3
|
4
(9) |
|
5
(3) |
6
(17) |
7
(24) |
8
(11) |
9
(26) |
10
(19) |
11
(4) |
|
12
(4) |
13
(14) |
14
(9) |
15
(5) |
16
(18) |
17
(23) |
18
(3) |
|
19
(1) |
20
(7) |
21
(27) |
22
(26) |
23
(6) |
24
(17) |
25
(1) |
|
26
|
27
(7) |
28
(1) |
29
(4) |
30
(5) |
|
|
|
From: Andrea G. <and...@gm...> - 2006-11-15 00:15:13
|
Hi John,
sorry to come back so late with this subject. Well, I have tried
your suggestion:
> When you add lines to the plot, the dataLim are updated, but when you
> remove data with del ax.lines[-1] etc, the dataLim are not updated.
> If all you have in the Axes are line instances, you can update the
> dataLim with the remaining lines, but first you must tell it to ignore
> it's current limits. You do this with the ignore flag
>
> # after removing a line, do
> ignore = True
> for line in ax.lines:
> x = line.get_xdata()
> y = line.get_ydata()
> ax.dataLim.update_numerix(x, y, ignore)
> ignore = False
>
No way, it doesn't update the axes. Uhm, in my plot I have only lines
and one legend, nothing more. Even if I try a simple case with 2 lines
and I remove one of them, the axes still stay with their previous
limits. I must be missing something.
> After you have tested this, would you mind updating the wiki with this
> information?
No problem, as soon as I am able to update the axes, I will add that
info to the wiki.
Thank you.
Andrea.
"Imagination Is The Only Weapon In The War Against Reality."
http://xoomer.virgilio.it/infinity77/
|
|
From: Lev G. <le...@co...> - 2006-11-14 21:56:19
|
Received from Adam Mercer on Tue, Nov 14, 2006 at 03:55:15PM EST: > On 14/11/06, Lev Givon <le...@co...> wrote: > > >I am also using Apple's X11 1.1.2 / Xfree86 4.4.0. Has anyone had any > >success using the above Fink packages? > > There is a font problem with X11 1.1.2, upgrade to X11 1.1.3 which was > released yesterday and you should be OK. > > Cheers > > Adam I upgraded X11 as indicated and rebuilt/reinstalled matplotlib, but the problem persists. Should I rebuild/install the graphical libraries matplotlib depends on (e.g., freetype, gtk)? Thanks, L.G. |
|
From: Adam M. <ram...@gm...> - 2006-11-14 20:55:25
|
On 14/11/06, Lev Givon <le...@co...> wrote: > I am also using Apple's X11 1.1.2 / Xfree86 4.4.0. Has anyone had any > success using the above Fink packages? There is a font problem with X11 1.1.2, upgrade to X11 1.1.3 which was released yesterday and you should be OK. Cheers Adam |
|
From: Lev G. <le...@co...> - 2006-11-14 20:50:49
|
I recently tried to build/install matplotlib 0.87.7 on an Intel iMac running Mac OS X 10.4.8 via Fink. Although the installation succeeded, any attempts to import pylab or other modules from matplotlib result in a segfault. Tracing python2.4 while attempting to run a script that imports pylab indicates that the crash occurs shortly after it attempts to open and read data from some font file. Here are the versions I am using: matplotlib-py24-0.87.7-1 python24-2.4.3-1001 scipy-core-py24-1.0-4 I am also using Apple's X11 1.1.2 / Xfree86 4.4.0. Has anyone had any success using the above Fink packages? L.G. |
|
From: Tom D. <tom...@al...> - 2006-11-14 20:18:34
|
Thanks, Eric. I will try it. On 11/14/06, Eric Firing <ef...@ha...> wrote: > > Tom, > > I have made several changes in svn to improve the ability of colorbar to > track changes in colormap and alpha. It works with imshow, pcolor, and > contourf. The implementation could be improved--maybe later. Here are > minimal illustrations you can use with ipython -pylab: > > figure(); C = pcolor(rand(3,3)); colorbar(); C.set_alpha(0.5); draw() > > figure(); C = contourf(rand(3,3)); colorbar(); C.set_alpha(0.5); draw() > > figure(); C = imshow(rand(3,3)); colorbar(); C.set_alpha(0.4); draw() > > The agg backend has trouble rendering the "continuous" colorbar with > non-unit alpha; it comes out somewhat striped. Turning on antialiasing > makes it better for small to moderate alpha, but causes similar > artifacts to appear for alpha=1, so I don't know of any good solution. > Good appearance is more important for the most common case of alpha=1, > so I am leaving antialiasing off. I haven't checked other backends that > support alpha. > > Eric > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share > your > opinions on IT & business topics through brief surveys - and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > |
|
From: Eric F. <ef...@ha...> - 2006-11-14 20:00:06
|
Tom, I have made several changes in svn to improve the ability of colorbar to track changes in colormap and alpha. It works with imshow, pcolor, and contourf. The implementation could be improved--maybe later. Here are minimal illustrations you can use with ipython -pylab: figure(); C = pcolor(rand(3,3)); colorbar(); C.set_alpha(0.5); draw() figure(); C = contourf(rand(3,3)); colorbar(); C.set_alpha(0.5); draw() figure(); C = imshow(rand(3,3)); colorbar(); C.set_alpha(0.4); draw() The agg backend has trouble rendering the "continuous" colorbar with non-unit alpha; it comes out somewhat striped. Turning on antialiasing makes it better for small to moderate alpha, but causes similar artifacts to appear for alpha=1, so I don't know of any good solution. Good appearance is more important for the most common case of alpha=1, so I am leaving antialiasing off. I haven't checked other backends that support alpha. Eric |
|
From: lucaberto\@libero\.it <luc...@li...> - 2006-11-14 17:36:57
|
Hello at all
I have to do the following:
I have tu use as base grap the following:
def calibrazione(self, massa, ampveliniziale, freqiniziale, freqfinale =
, freqps, avps, freqss, avss):
import math
dati =3D []
for freq in range(int(freqiniziale), int(freqfinale)):
forza =3D float(massa) * ((2*math.pi*freq)**2)/10
dati.append(forza)
ax1 =3D subplot(111)
plot(dati)
xlabel('Frequenza HZ')
ylabel('Forza daN')
title('Grafico Calibrazione')
ax2 =3D twinx()
plot([0.1,0.2,0.3],'r-')
ylabel('Gradi')
ax2.yaxis.tick_right()
# savefig('test.pdf')
show()
On this graf i have to draw others two signals that cam from two instrume=
ntes every 20 seconds for 115 ties.
Thare are some sample or someone can explain it to me
Regards
Luca=0A=0A=0A------------------------------------------------------=0AChi=
punta sull=92inglese naturale Wall Street Institute, vince un English Bo=
x! Scopri come ritirare i tuoi premi, clicca qui!=0Ahttp://click.libero.i=
t/wallstreet14nov=0A
|
|
From: Pierre GM <pgm...@gm...> - 2006-11-14 06:02:54
|
Ciao Sarah
> cross_correlate, but given two arrays, that function returns a single
> scalar value (whereas I was expecting a list of correlation
> coefficients corresponding to how well the two signals match on
> successive lags).
That's not really a mpl question, more a 'numerix' one: what does your numerix
stand for ? numpy ? numarray ?
For numpy, I guess that the corresponding function is 'correlate', which you
must use with the 'full' parameter:
>>>corxy = N.correlate(x, y, 'full')
Unless I'm mistaken, the lags are then 1-n, 2-n,..., -1, 0, 1, ..., n-1
Note that you may want to use anomalies (ie, x-x.mean() and y-y.mean()), and
divide by the variances to get proper coefficients
A second possibility is to use FFTs,
>>>Fx = N.fft.fft(x, npad, axis=axis)
>>>Fy = N.fft.fft(y, npad, axis=axis)
>>>iFxy = N.fft.ifft(Fx.conj()*Fy,n=npad,axis=axis).real
with npad=x.size+y.size
The lags are then 0,1,2,...,n,1-n,...,-1
If you're interested, you can use these two functions that I had written
#..............................................................................
def ccf(x, y, axis=None):
"""Computes the cross-correlation function of two series `x` and `y`.
Note that the computations are performed on anomalies (deviations from
average).
Returns the values of the cross-correlation at different lags.
Lags are given as [0,1,2,...,n,n-1,n-2,...,-2,-1].
:Parameters:
`x` : 1D MaskedArray
Time series.
`y` : 1D MaskedArray
Time series.
`axis` : integer *[None]*
Axis along which to compute (0 for rows, 1 for cols).
If `None`, the array is flattened first.
"""
assert(x.ndim == y.ndim, "Inconsistent shape !")
# assert(x.shape == y.shape, "Inconsistent shape !")
if axis is None:
if x.ndim > 1:
x = x.ravel()
y = y.ravel()
npad = x.size + y.size
xanom = (x - x.mean(axis=None))
yanom = (y - y.mean(axis=None))
Fx = N.fft.fft(xanom, npad, )
Fy = N.fft.fft(yanom, npad, )
iFxy = N.fft.ifft(Fx.conj()*Fy).real
varxy = N.sqrt(N.inner(xanom,xanom) * N.inner(yanom,yanom))
else:
npad = x.shape[axis] + y.shape[axis]
if axis == 1:
if x.shape[0] != y.shape[0]:
raise ValueError, "Arrays should have the same length!"
xanom = (x - x.mean(axis=1)[:,None])
yanom = (y - y.mean(axis=1)[:,None])
varxy = N.sqrt((xanom*xanom).sum(1) * (yanom*yanom).sum(1))
[:,None]
else:
if x.shape[1] != y.shape[1]:
raise ValueError, "Arrays should have the same width!"
xanom = (x - x.mean(axis=0))
yanom = (y - y.mean(axis=0))
varxy = N.sqrt((xanom*xanom).sum(0) * (yanom*yanom).sum(0))
Fx = N.fft.fft(xanom, npad, axis=axis)
Fy = N.fft.fft(yanom, npad, axis=axis)
iFxy = N.fft.ifft(Fx.conj()*Fy,n=npad,axis=axis).real
#
return iFxy/varxy
#..............................................................................
def ccf1d(x,y):
"""Computes the crosscorrelation of two flat arrays `x` and `y`, with the
numpy.correlate function.
Note that the computations are performed on anomalies (deviations from
average).
"""
if x.ndim > 1:
x = x.ravel()
if y.ndim > 1:
y = y.ravel()
(xanom, yanom) = (x-x.mean(), y-y.mean())
corxy = N.correlate(xanom, yanom, 'full')
n = min(x.size, y.size)
# return N.r_[ xc[len(yf)-1:], 0, xc[:len(yf)-1] ]
corxy = N.r_[ corxy[:n][::-1], 0, corxy[n:][::-1] ]
varxy = N.sqrt(N.inner(xanom,xanom) * N.inner(yanom,yanom))
return corxy/varxy
>
> So ... does matplotlib have something akin to what I'm after or is
> there an extention that might have it?
>
> Very many thanks,
>
> Sarah
>
> (*)
>
> http://www.mathworks.com/access/helpdesk/help/toolbox/garch/index.html?/acc
>ess/helpdesk/help/toolbox/garch/crosscorr.html
> http://www.mathworks.com/access/helpdesk/help/toolbox/signal/index.html?/ac
>cess/helpdesk/help/toolbox/signal/xcorr.html
|
|
From: <jo...@st...> - 2006-11-14 00:29:09
|
> So ... does matplotlib have something akin to what I'm after or is > there an extention that might have it? Perhaps the 'correlate' function in NumPy is what you're looking for? Joris Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm |
|
From: Sarah M. <mou...@gm...> - 2006-11-14 00:08:54
|
Hi y'all. I have two series of data, taken over a period of time and I want to know whether one set of data contains a signal similar to that in the other. I believe the way to do this is to use cross-correlation(*) and I notice that dir(pylab) now contains a function called cross_correlate, but given two arrays, that function returns a single scalar value (whereas I was expecting a list of correlation coefficients corresponding to how well the two signals match on successive lags). So ... does matplotlib have something akin to what I'm after or is there an extention that might have it? Very many thanks, Sarah (*) http://www.mathworks.com/access/helpdesk/help/toolbox/garch/index.html?/access/helpdesk/help/toolbox/garch/crosscorr.html http://www.mathworks.com/access/helpdesk/help/toolbox/signal/index.html?/access/helpdesk/help/toolbox/signal/xcorr.html -- Work: http://www.cogentcomputing.org Blog: http://varspool.blogspot.com Photos: http://flickr.com/photos/sarahmount/ |
|
From: Antonio G. <Ant...@ki...> - 2006-11-13 18:02:37
|
To compare two histograms you can plot a bihistogram as suggested on http://www.itl.nist.gov/div898/handbook/eda/section3/bihistog.htm The little function I've written to do so is below. See if it helps. Antonio import scipy from pylab import figure def bihist(y1, y2, nbins=10, h=None): ''' Bihistogram. h is an axis handle. If not present, a new figure is created. ''' if h is None: h = figure().add_subplot(111) xmin = scipy.floor(scipy.minimum(y1.min(), y2.min())) xmax = scipy.ceil(scipy.maximum(y1.max(), y2.max())) bins = scipy.linspace(xmin, xmax, nbins) n1, bins1, patch1 = h.hist(y1, bins) n2, bins2, patch2 = h.hist(y2, bins) # set ymax: ymax = 0 for i in patch1: height = i.get_height() if height > ymax: ymax = height # invert second histogram and set ymin: ymin = 0 for i in patch2: height = i.get_height() height = -height i.set_height(height) if height < ymin: ymin = height h.set_ylim(ymin*1.1, ymax*1.1) h.figure.canvas.draw() |
|
From: Eric F. <ef...@ha...> - 2006-11-13 17:48:16
|
Luca,
It is a bug that appears when recent mpl is used with Numeric as opposed
to numpy or numarray. It is fixed in svn. Your possible solutions are:
1) Use numpy or numarray instead of Numeric
2) Build mpl from svn
3) Edit axes.py as indicated in this diff chunk:
@@ -1217,7 +1217,7 @@
ACCEPTS: len(2) sequence of floats
"""
- if xmax is None and hasattr(xmin,'__len__'):
+ if xmax is None and iterable(xmin):
xmin,xmax = xmin
old_xmin,old_xmax = self.get_xlim()
@@ -1330,7 +1330,7 @@
ACCEPTS: len(2) sequence of floats
"""
- if ymax is None and hasattr(ymin,'__len__'):
+ if ymax is None and iterable(ymin):
ymin,ymax = ymin
old_ymin,old_ymax = self.get_ylim()
Eric
luc...@li... wrote:
> Hello I have installed matplotlib on su 10.0
>
> when i do only this example
>
> from pylab import *
> plot([1,2,3])
>
> i get this error:
> only length-1 attays can be converted to Python scalars.
>
> How i have made wrong?
>
> Regards
>
> Luca
>
>
>
>
> ------------------------------------------------------
> Mutui a tassi scontati da 40 banche. Richiedi online e risparmia...Servizio gratuito. www.mutuionline.it
> http://click.libero.it/mutuionline13nov
>
>
>
> -------------------------------------------------------------------------
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job easier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
|
|
From: David E. K. <dek...@lb...> - 2006-11-13 17:47:54
|
Hi folks,
I'm interested in hearing some strategies for plotting two histograms on
the same plot. My goal is
to visualize and compare two distributions which have similar shapes.
My first attempt was to use alpha, but this isn't well support on PS2
output driver (surprising)
and I will be including these in a paper, so having a good print output
format like PS2 or PDF is desired.
PDF seems to work ok, but the alpha model doesn't completely satisfy my
in areas where the two
plots overlap a good deal.
import pylab, random
d1 = [random.gauss(0, 1) for i in range(100)]
d2 = [random.gauss(1, 1) for i in range(100)]
color = ['r', 'g']
pylab.hist(d1, facecolor='r', edgecolor='black', alpha=0.75)
pylab.hist(d2, facecolor='b', edgecolor='black', alpha=0.75)
pylab.savefig('test.pdf')
pylab.show()
What ideas do other people have? My thought was to subdivide the plot
into two subplots, and
plot one distribution on top, and the other on the bottom, but this
effectively halves my vertical resolution
(I'm already plotting 24 subplots per page).
Thanks,
Dave
|
|
From: Marius 't H. <ma...@ai...> - 2006-11-13 17:40:42
|
Try opening a python shell and type: from pylab import * a = [1,2,3] a What is a? Is it an array? Make sure you create an array by giving a command like this: a = array([1,2,3]) luc...@li... schreef: > Hello I have installed matplotlib on su 10.0 > > when i do only this example > > from pylab import * > plot([1,2,3]) > > i get this error: > only length-1 attays can be converted to Python scalars. > > How i have made wrong? > > Regards > > Luca > > > > > ------------------------------------------------------ > Mutui a tassi scontati da 40 banche. Richiedi online e risparmia...Servizio gratuito. www.mutuionline.it > http://click.libero.it/mutuionline13nov > > > > ------------------------------------------------------------------------- > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > |
|
From: John H. <jdh...@ac...> - 2006-11-13 17:39:41
|
>>>>> "Marek" =3D=3D Marek Szczypi=E4ski <Mar...@as...=
un.pl> writes:
Marek> Hello All, I've been using matplotlib for some time now,
Marek> and I want to connect it with zope. I'am using the example
Marek> code from page:
Marek> http://www.scipy.org/Cookbook/Matplotlib/Matplotlib_and_Zope
Marek> , but whenever I try to import matplotlib, and/or pylab
Marek> packages i get this error from zope:
Marek> Error Type: RuntimeError Error Value: '/' is not a writable
Marek> dir; you must set environment variable HOME to be a
Marek> writable dir
Marek> Have You got any ideas, on what might go wrong? I'am using
Marek> matplotlib 0.87.4, and zope 2.9.5 with python 2.4.3 on
Marek> gentoo linux box.
Have you tried following the advice in the error message=20
"you must set environment variable HOME to be a writable dir"
|
|
From: John H. <jdh...@ac...> - 2006-11-13 17:38:12
|
>>>>> "lucaberto@libero" == lucaberto@libero it <luc...@li...> writes:
lucaberto@libero> Hello I have installed matplotlib on su 10.0
lucaberto@libero> when i do only this example
lucaberto@libero> from pylab import * plot([1,2,3])
lucaberto@libero> i get this error: only length-1 attays can be
lucaberto@libero> converted to Python scalars.
lucaberto@libero> How i have made wrong?
Please create a free-standing script
from pylab import *
plot([1,2,3])
show()
and run it from the shell with
> python test.py --verbose-helpful
and post the complete output back here.
JDH
|
|
From: lucaberto\@libero\.it <luc...@li...> - 2006-11-13 17:21:51
|
Hello I have installed matplotlib on su 10.0 when i do only this example from pylab import * plot([1,2,3]) i get this error: only length-1 attays can be converted to Python scalars. How i have made wrong? Regards Luca =0A=0A=0A------------------------------------------------------=0AMutui a= tassi scontati da 40 banche. Richiedi online e risparmia...Servizio grat= uito. www.mutuionline.it=0Ahttp://click.libero.it/mutuionline13nov=0A |
|
From: John H. <jdh...@ac...> - 2006-11-13 16:06:23
|
>>>>> "Eric" == Eric Firing <ef...@ha...> writes:
Eric> Some discussion (and/or a ruling by John) is needed. My
Eric> preference is that if a change is made, it be a change in
Eric> basic default behavior, not additional options, because any
Eric> non-default behavior can be achieved easily using the extent
Eric> kwarg in its present form, and at some point adding options
Eric> and more complicated handling of kwargs causes more trouble
Eric> (complex code and documentation) than it is worth. I don't
Eric> see any advantage of the present behavior over the
Eric> matlab-equivalent behavior--but that may be because I am
Eric> ignorant of the original rationale.
I'm weakly inclined to leave things as they are, since it is so easy
to get the desired behavior by setting the extent kwarg. If we just
put a help string in the imshow docstring telling people how to get
what they want, that may suffice. That said, I am a light user of
images and do not feel strongly at all. If people who are heavy image
users feel strongly, I'm happy to change. Perry?
Eric> If imshow behavior is changed, a corresponding change will
Eric> be needed in the image-matching capability of contour.
Eric> Maybe matshow would also change; I haven't checked.
matshow doesn't really have much of a purpose any more. It's primary
reason for being was to handle aspect ratio when aspect ratio was
broken. Fernando -- do you see any reason to keep matshow?
JDH
|
|
From: Steve S. <el...@gm...> - 2006-11-13 14:35:15
|
W Netzberg wrote: > I aggree it doesn't make much sense, but that's what I got and attached > a plot to prove it! > Seems that some sort of rounding takes place, but only when I use > numpy.random.normal(). It is strange. Can you post a short working and not-working (i.e. chopping off) example? > > I had problems building latest version from source last night. Do you > know where I can find the latest rpm for fc5? > No, sry. I'm still building from source myself. -- cheers, steve Random number generation is the art of producing pure gibberish as quickly as possible. |
|
From: Steve S. <el...@gm...> - 2006-11-13 13:56:49
|
W Netzberg wrote: > I can't find a 0.87.5 rpm for fc5, might have to build it from source to > see if this behavior goes away... Seems to be related to numpy. If I > replace: > numpy.random.normal(-0.37727, 0.1, size=10) > with an array normal() returns, the problem goes away. Strange. Again > this is under 0.87.3. > Hmmm I don't really get it :). You replaced numpy.random.normal(-0.37727, 0.1, size=10) with an array? But this already returns one ... Anyway I would suggest upgrading (the latest is 0.87.7). -- cheers, steve Random number generation is the art of producing pure gibberish as quickly as possible. |
|
From: Oguz A. <ogu...@gm...> - 2006-11-13 10:48:35
|
Apparently it was simpler than I thought: bar (x, y, align='center', color=((0, 0, 0.5), (0, 0, 0.9), (0, 0, 0.5), (0, 0, 0.9), (0, 0, 0.5), (0, 0, 0.9), (0, 0, 0.5), (0, 0, 0.9), (0, 0, 0.5), (0, 0, 0.9))) does what I need. Cheers, Oguz On 11/13/06, Oguz Akyuz <ogu...@gm...> wrote: > I would like to plot a bar graph where subsequent bars have different > colors (i.e. alternating colors). I think this will enhance the > readability of my plot. > > How can I do this? > > Thanks, > Oguz > |
|
From: Oguz A. <ogu...@gm...> - 2006-11-13 10:20:29
|
I would like to plot a bar graph where subsequent bars have different colors (i.e. alternating colors). I think this will enhance the readability of my plot. How can I do this? Thanks, Oguz |
|
From: Eric F. <ef...@ha...> - 2006-11-13 05:58:56
|
Ken Schutte wrote: > Hi, > > If I display a simple matrix with imshow(), e.g: > > a = zeros((3,3)) > a[0,0] = 1 > imshow(a,interpolation='nearest') > > the axes extend from 0.0 to 3.0 in such a way that elements are centered > at 0.5, 1.5,... For example, the point at (x,y)=(.9,.9) is red, whereas > nearest-interp. should give a[1,1]=0. Would it make more sense for the > default to be like this (as is in matlab): ? > > imshow(a,interpolation='nearest',extent=(-0.5, 2.5, -0.5, 2.5)) Ken, Actually, the matlab nearest equivalent would be imshow(a, interpolation='nearest', extent=(-0.5, 2.5, 2.5, -0.5)) so that the y-axis increases down and both axes correspond to the array indices. I agree that this makes good sense. It seems to me that in the long run it would make imshow easier to explain and easier to use. > > Is there a way to get behavior this automatically? Not at present without defining your own little function to set the extent. It would be easy to change imshow to work this way, so the question is whether enough other users would prefer it and whether it would cause too much disruption. It could also be made optional via a new kwarg or a new interpretation of an old kwarg. For example, extent could take a string to indicate this option, something like "extent='indices'". An rc param could control the default. Some discussion (and/or a ruling by John) is needed. My preference is that if a change is made, it be a change in basic default behavior, not additional options, because any non-default behavior can be achieved easily using the extent kwarg in its present form, and at some point adding options and more complicated handling of kwargs causes more trouble (complex code and documentation) than it is worth. I don't see any advantage of the present behavior over the matlab-equivalent behavior--but that may be because I am ignorant of the original rationale. If imshow behavior is changed, a corresponding change will be needed in the image-matching capability of contour. Maybe matshow would also change; I haven't checked. Eric |
|
From: Ken S. <ksc...@cs...> - 2006-11-13 02:51:06
|
Hi, If I display a simple matrix with imshow(), e.g: a = zeros((3,3)) a[0,0] = 1 imshow(a,interpolation='nearest') the axes extend from 0.0 to 3.0 in such a way that elements are centered at 0.5, 1.5,... For example, the point at (x,y)=(.9,.9) is red, whereas nearest-interp. should give a[1,1]=0. Would it make more sense for the default to be like this (as is in matlab): ? imshow(a,interpolation='nearest',extent=(-0.5, 2.5, -0.5, 2.5)) Is there a way to get behavior this automatically? Thanks, Ken |
|
From: Charles R. T. <ct...@gm...> - 2006-11-12 07:58:47
|
> If I'm right, then the assertion in bar() is misformed.
I'd suggest the following. Works for me, anyway. :-)
if yerr is not None: assert (len(yerr)==nbars or (len(yerr)==2
and len(yerr[0])==len(yerr[1])==nbars)), 'bar() argument \'yerr\' must
be len(%s) (or a pair of such) or scalar' % lenarg
if xerr is not None: assert (len(xerr)==nbars or (len(xerr)==2
and len(xerr[0])==len(xerr[1])==nbars)), 'bar() argument \'xerr\' must
be len(%s) (or a pair of such) or scalar' % lenarg
> -C
>
> On 11/6/06, John Hunter <jdh...@ni...> wrote:
> > >>>>> "Charles" == Charles R Twardy <ct...@gm...> writes:
> >
> > Charles> Hi folks, It seems that 'bar' no longer supports
> > Charles> asymmetric errorbars. Am I meant to call both 'bar' and
> > Charles> 'errorbar' if I want asymmetric errorbars on my
> > Charles> histograms? Is there a canonical idiom?
> >
> > Charles> Sorry if I missed a previous answer to this.
> >
> > I don't use asymmetric error bars so don't have any ready test code,
> > but looking at the implementation, the xerr and yerr kwargs to bar are
> > passed on to errorbar after a bit of array conversion and length
> > checking. Does this not work for you? If not, can you send a snippet
> > of freestanding test code?
> >
> > Thanks,
> > JDH
> >
>
>
> --
> Charles R. Twardy
>
--
Charles R. Twardy
|