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
(8) |
|
2
(2) |
3
(8) |
4
(19) |
5
(19) |
6
(25) |
7
(8) |
8
(1) |
|
9
|
10
(15) |
11
(22) |
12
(8) |
13
(4) |
14
(1) |
15
|
|
16
(1) |
17
(20) |
18
(17) |
19
(13) |
20
(17) |
21
(7) |
22
(5) |
|
23
(6) |
24
(14) |
25
(14) |
26
(18) |
27
(21) |
28
(5) |
29
(9) |
|
30
(6) |
|
|
|
|
|
|
|
From: MICHAEL P M. <mo...@jp...> - 2006-04-05 21:51:13
|
Thank you and everyone who responded. I'm glad to know there is a way. Mike ---------Included Message---------- >Date: 5-Apr-2006 14:22:04 -0700 >From: "Eric Firing" <ef...@ha...> >To: <Mic...@jp...> >Cc: <mat...@li...> >Subject: Re: [Matplotlib-users] "figure title" > >Mike, > >In the mpl examples directory, see figtext.py. > >Eric > >MICHAEL P MOSSEY wrote: >> How would I put a title on a plot, separate from any one axes? I.e., a "figure >> title" >> >> Please copy me on response as I get the digest. >> >> Mike > > ---------End of Included Message---------- |
|
From: Eric F. <ef...@ha...> - 2006-04-05 21:22:11
|
Mike, In the mpl examples directory, see figtext.py. Eric MICHAEL P MOSSEY wrote: > How would I put a title on a plot, separate from any one axes? I.e., a "figure > title" > > Please copy me on response as I get the digest. > > Mike |
|
From: John H. <jdh...@ac...> - 2006-04-05 20:40:26
|
>>>>> "MICHAEL" == MICHAEL P MOSSEY <mo...@jp...> writes:
MICHAEL> How would I put a title on a plot, separate from any one
MICHAEL> axes? I.e., a "figure title"
MICHAEL> Please copy me on response as I get the digest.
fig = figure()
figtitle = 'This is a figure title'
t = fig.text(0.5, 0.95, figtitle, horizontalalignment='center')
JDH
|
|
From: MICHAEL P M. <mo...@jp...> - 2006-04-05 19:02:37
|
How would I put a title on a plot, separate from any one axes? I.e., a "figure title" Please copy me on response as I get the digest. Mike |
|
From: Charlie M. <cw...@gm...> - 2006-04-05 18:11:44
|
I don't know exactly when it got included, but I want to say 0.83.=20
You'll need a newer version.
On 4/5/06, Tony Mannucci <Ton...@jp...> wrote:
> For OS-X, I don't seem to have it.
>
> >>> matplotlib.use("Cocoa-Agg")
> Traceback (most recent call last):
> File "<stdin>", line 1, in ?
> File
> "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-pac=
kages/matplotlib/__init__.py",
> line 841, in use
> raise ValueError('unrecognized backend %s.\n' % arg +\
> ValueError: unrecognized backend Cocoa-Agg.
> Use one of PS, FltkAgg, GTKAgg, SVG, LaTeX, Agg, Cairo, QtAgg, GTK,
> GTKCairo, WXAgg, Paint, GD, Template, Agg2, GDK, TkAgg, WX
>
> >>> matplotlib.__version__
> '0.82'
>
> --
> Tony Mannucci
> Supervisor, Ionospheric and Atmospheric Remote Sensing Group
> Mail-Stop 138-308, Tel > (818) 354-1699
> Jet Propulsion Laboratory, Fax > (818) 393-5115
> California Institute of Technology, Email > Ton...@jp....=
gov
> 4800 Oak Grove Drive, http://genesis.jpl.nasa.gov
> Pasadena, CA 91109
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by xPML, a groundbreaking scripting langua=
ge
> that extends applications into web and mobile media. Attend the live webc=
ast
> and join the prime developer group breaking into this new coding territor=
y!
> http://sel.as-us.falkag.net/sel?cmd=3Dlnk&kid=3D110944&bid=3D241720&dat=
=3D121642
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
|
|
From: Tony M. <Ton...@jp...> - 2006-04-05 17:24:09
|
For OS-X, I don't seem to have it.
>>> matplotlib.use("Cocoa-Agg")
Traceback (most recent call last):
File "<stdin>", line 1, in ?
File
"/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/matplotlib/__init__.py",
line 841, in use
raise ValueError('unrecognized backend %s.\n' % arg +\
ValueError: unrecognized backend Cocoa-Agg.
Use one of PS, FltkAgg, GTKAgg, SVG, LaTeX, Agg, Cairo, QtAgg, GTK,
GTKCairo, WXAgg, Paint, GD, Template, Agg2, GDK, TkAgg, WX
>>> matplotlib.__version__
'0.82'
--
Tony Mannucci
Supervisor, Ionospheric and Atmospheric Remote Sensing Group
Mail-Stop 138-308, Tel > (818) 354-1699
Jet Propulsion Laboratory, Fax > (818) 393-5115
California Institute of Technology, Email > Ton...@jp...
4800 Oak Grove Drive, http://genesis.jpl.nasa.gov
Pasadena, CA 91109
|
|
From: Christopher B. <Chr...@no...> - 2006-04-05 16:21:36
|
Lionel Roubeyrie wrote:
> I'm new in the matplotlib word, and I try to plot a windrose,
When you do get it figured out, be sure to post here. I know I could use
it, and I'm sure there are others.
-Chris
--
Christopher Barker, Ph.D.
Oceanographer
NOAA/OR&R/HAZMAT (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception
Chr...@no...
|
|
From: Robert K. <rob...@gm...> - 2006-04-05 16:15:52
|
Andrew Jaffe wrote:
> Hi All,
>
> I've encountered a strange problem: I've been running some python code
> on both a linux box and OS X, both with python 2.4.1 and the latest
> numpy and matplotlib from svn.
>
> I have found that when I transfer pickled numpy arrays from one machine
> to the other (in either direction), the resulting data *looks* all right
> (i.e., it is a numpy array of the correct type with the correct values
> at the correct indices), but it seems to produce the wrong result in (at
> least) one circumstance: matplotlib.hist() gives the completely wrong
> picture (and set of bins).
>
> This can be ameliorated by running the array through
> arr=numpy.asarray(arr, dtype=numpy.float64)
> but this seems like a complete kludge (and is only needed when you do
> the transfer between machines).
You have a byteorder issue. You Linux box, which I presume has an Intel or AMD
CPU, is little-endian where your OS X box, which I presume has a PPC CPU, is
big-endian. numpy arrays can store their data in either endianness on either
kind of platform; their dtype objects tell you which byteorder they are using.
In the dtype specifications below, '>' means big-endian (I am using a PPC
PowerBook), and '<' means little-endian.
In [31]: a = linspace(0, 10, 11)
In [32]: a
Out[32]: array([ 0., 1., 2., 3., 4., 5., 6., 7., 8., 9., 10.])
In [33]: a.dtype
Out[33]: dtype('>f8')
In [34]: b = a.newbyteorder()
In [35]: b
Out[35]:
array([ 0.00000000e+000, 3.03865194e-319, 3.16202013e-322,
1.04346664e-320, 2.05531309e-320, 2.56123631e-320,
3.06715953e-320, 3.57308275e-320, 4.07900597e-320,
4.33196758e-320, 4.58492919e-320])
In [36]: b.dtype
Out[36]: dtype('<f8')
In [41]: a.tostring()[-8:]
Out[41]: '@$\x00\x00\x00\x00\x00\x00'
In [42]: b.tostring()[-8:]
Out[42]: '@$\x00\x00\x00\x00\x00\x00'
Apparently, the pickle stores the data in the creator machine's byteorder and so
marked. When the reading machine loads the pickle, it recognizes that the
byteorder is opposite its native byteorder by its dtype.
Most operations work as you might expect:
In [44]: a.astype(dtype('<f8'))
Out[44]: array([ 0., 1., 2., 3., 4., 5., 6., 7., 8., 9., 10.])
In [45]: c = _
In [46]: c.dtype
Out[46]: dtype('<f8')
In [47]: a + c
Out[47]: array([ 0., 2., 4., 6., 8., 10., 12., 14., 16., 18., 20.])
Some don't:
In [54]: c.sort()
In [55]: c
Out[55]: array([ 0., 2., 3., 4., 5., 6., 7., 8., 9., 10., 1.])
This is a bug.
http://projects.scipy.org/scipy/numpy/ticket/47
--
Robert Kern
rob...@gm...
"I have come to believe that the whole world is an enigma, a harmless enigma
that is made terrible by our own mad attempt to interpret it as though it had
an underlying truth."
-- Umberto Eco
|
|
From: Andrew J. <a.h...@gm...> - 2006-04-05 15:41:21
|
OK, I think I've managed to track the problem down a bit further:
the sort() method is failing for arrays pickled on another machine!
That is, it's definitely not sorting the array, but changing to a very
strange order (neither the way it started nor sorted).
Again, the array seems to otherwise behave fine (indeed, it even satisfies
all(a=3D=3Da1) for a pair that behave differently in this circumstance).
Hmmm...
A
On 4/5/06, Andrew Jaffe <a.h...@gm...> wrote:
>
> Hi All,
>
> I've encountered a strange problem: I've been running some python code
> on both a linux box and OS X, both with python 2.4.1 and the latest
> numpy and matplotlib from svn.
>
> I have found that when I transfer pickled numpy arrays from one machine
> to the other (in either direction), the resulting data *looks* all right
> (i.e., it is a numpy array of the correct type with the correct values
> at the correct indices), but it seems to produce the wrong result in (at
> least) one circumstance: matplotlib.hist() gives the completely wrong
> picture (and set of bins).
>
> This can be ameliorated by running the array through
> arr=3Dnumpy.asarray(arr, dtype=3Dnumpy.float64)
> but this seems like a complete kludge (and is only needed when you do
> the transfer between machines).
>
> I've attached a minimal code that exhibits the problem: try
> test_pickle_hist.test(write=3DTrue)
> on one machine, transfer the output file to another machine, and run
> test_pickle_hist.test(write=3DFalse)
> on another, and you should see a very strange result (and it should be
> fixed if you set asarray=3DTrue).
>
> Any ideas?
>
> Andrew
>
>
> import cPickle
> import numpy
> import pylab
>
> def test(write=3DTrue,asarray=3DFalse):
>
> a =3D numpy.linspace(-3,3,num=3D100)
>
> if write:
> f1 =3D file("a.cpkl", 'w')
> cPickle.dump(a, f1)
> f1.close()
>
> f1 =3D open("a.cpkl", 'r')
> a1 =3D cPickle.load(f1)
> f1.close()
>
> pylab.subplot(1,2,1)
> h =3D pylab.hist(a)
>
> if asarray:
> a1 =3D numpy.asarray(a1, dtype=3Dnumpy.float64)
>
> pylab.subplot(1,2,2)
> h1 =3D pylab.hist(a1)
>
> return a, a1
>
>
>
>
|
|
From: Jean-Luc M. <jea...@fr...> - 2006-04-05 15:25:09
|
> is there a function in pylab I missed and that already does something > similar? try something like that : import Numeric,pylab,string def plotfromfile(file="data",using=(3,4),skippingline=1): f=open(file,'r') for i in range(skippingline): f.readlines() res=Numeric.array([[string.atof(x)] for x in string.split(y)[using[0]:using[-1]+1] for y in f.readlines()]) for u in using : pylab.plot(res[:,u]) pylab.show() Warning : not tested Jean-Luc |
|
From: John H. <jdh...@ac...> - 2006-04-05 15:21:23
|
>>>>> "manouchk" =3D=3D manouchk <man...@gm...> writes:
manouchk> Le Mercredi 05 Avril 2006 11:36, manouchk a =E9crit=A0: I
manouchk> made a mistake with my mail. Just correcting it, sorry
manouchk> for inconvenience.
manouchk> Hi,
manouchk> Data file I use usually have a first line or more with
manouchk> comments and sometimes column with text. I used to use
manouchk> gnuplot that now automatically skips rows that does not
manouchk> contain numbers (before one should use every n to skip n
manouchk> forst line) and handle well files that have column
manouchk> without number. using column 3 and 4 from a file to
manouchk> plot is done using using 3:3. I wondering if there is
manouchk> an hidden possibilty to plot more or less directly from
manouchk> file as in gnuplot.
manouchk> imagine the file : col1 col2 col3 col4 col5 col6 T3-4B
manouchk> 450 100 4.31 1.44 0 T3-4B 450 200 5.56 2.06 0 T3-4B 450
manouchk> 500 6.03 2.09 0 T3-4A 450 5000 9.71 2.16 0
manouchk> that would be a function that plots column number 3 and
manouchk> 4 skipping first line and ignoring first column (that
manouchk> would put zeros in the array for example) A fonction
manouchk> that would do that could look like that one:
manouchk> plotfromfile(file=3D"data",using=3D(3,4),skippingline=3D1,i=
gnorecolumn=3D[1])
The latest matplotlib release includes some enhancements to the load
function to allow you to skip rows and extract certain columns. It
also allows you to pass in converter functions to convert certain
columns to floating point numbers, eg for dates. See
examples/load_demo.py for a full example. Here is an example
skipping the header and extracting the 3rd and 4th column:
from pylab import figure, load, show
x, y =3D load('test.dat', skiprows=3D1, usecols=3D(2,3), unpack=3DTrue)
fig =3D figure()
ax =3D fig.add_subplot(111)
ax.plot(x,y)
show()
JDH
|
|
From: massimo s. <mas...@un...> - 2006-04-05 15:19:55
|
Hi,
I have the following problem. I'm building a wxpython application with a =
wxmpl PlotPanel. My ultimate need is to catch the X and Y graph =
coordinates of points I'm clicking on the graph. While using pylab this =
is almost trivial, it seems not if I'm using an embedded PlotPanel...
I've tried to mpl_connect the figure object to the button_click_event, =
this way:
--- =20
[...]
self.control=3Dwxmpl.PlotPanel(self,1)
def click_me(mpl_event):
print 'you click me!'
if mpl_event.inaxes:
print 'in axes too!' =20
=20
=
disconnect_id=3Dself.control.mpl_connect('button_press_event',click_me)
print 'id:',disconnect_id
[...]
---
I receive an id from the mpl_connect method, but the click_me function =
is never called.
In the WxMPL documentation I also found this:
---
button_press_event(self, x, y, button, guiEvent=3DNone)
Backend derived classes should call this function on any mouse button =
press. x,y are the canvas coords: 0,0 is lower, left. button and key are =
as defined in MouseEvent
---
but I'm really unsure of its meaning/use. It is something to trap the =
wx.EVT_LEFT_DOWN?
I'm lost. Any help will be appreciated.
Massimo
|
|
From: Ryan K. <rya...@gm...> - 2006-04-05 15:18:55
|
I don't know much about using Matplotlib apart from Scipy, but scipy.io.read_array seems to handle this without a problem. I copied and pasted your example data into a file I called datafile.txt (attached). Then I basically did: from scipy.io import read_array data=3Dread_array('datafile.txt') It does it's best with the first row and column: In [4]: data[0,:] Out[4]: array([ 1., 2., 3., 4., 5., 6.]) In [5]: data[:,0] Out[5]: array([ 1., 3., 3., 3., 3.]) but if you throw them away, you basically have what you want: In [6]: data[1:,1:] Out[6]: array([[ 4.50000000e+02, 1.00000000e+02, 4.31000000e+00, 1.44000000e+00, 0.00000000e+00], [ 4.50000000e+02, 2.00000000e+02, 5.56000000e+00, 2.06000000e+00, 0.00000000e+00], [ 4.50000000e+02, 5.00000000e+02, 6.03000000e+00, 2.09000000e+00, 0.00000000e+00], [ 4.50000000e+02, 5.00000000e+03, 9.71000000e+00, 2.16000000e+00, 0.00000000e+00]]) You could also do it with low-level Python io and text processing if you don't have Scipy: f=3Dopen('datafile.txt') text=3Df.readlines() text=3Dtext[1:]#eliminates first row cleantext=3D[row.replace('\n','') for row in text] matstring=3D[row.split(' ') for row in cleantext] almostdone=3D[row[1:] for row in matstring]#eliminates first column at that point you have a nested list of strings: [['450', '100', '4.31', '1.44', '0'], ['450', '200', '5.56', '2.06', '0'], ['450', '500', '6.03', '2.09', '0'], ['450', '5000', '9.71', '2.16', '0']] which you have to convert to an array. With NumPy you could do: stringmat=3Darray(almostdone) stringmat.astype('f') which produces array([[450, 100, 4.31, 1.44, 0], [450, 200, 5.56, 2.06, 0], [450, 500, 6.03, 2.09, 0], [450, 5000, 9.71, 2.16, 0]], dtype=3D(string,4)) if you are using someother numerix, you may need to handle this last step slightly differently. If nothing else, you could iterate over the nested list and call float on each element to get a nest list of float values. Ryan On 4/5/06, manouchk <man...@gm...> wrote: > Le Mercredi 05 Avril 2006 11:36, manouchk a =E9crit: > I made a mistake with my mail. Just correcting it, sorry for inconvenienc= e. > > Hi, > > Data file I use usually have a first line or more with comments and somet= imes > column with text. I used to use gnuplot that now automatically skips rows= that > does not contain numbers (before one should use every n to skip n forst l= ine) > and handle well files that have column without number. > using column 3 and 4 from a file to plot is done using using 3:3. > I wondering if there is an hidden possibilty to plot more or less directl= y > from file as in gnuplot. > > imagine the file : > col1 col2 col3 col4 col5 col6 > T3-4B 450 100 4.31 1.44 0 > T3-4B 450 200 5.56 2.06 0 > T3-4B 450 500 6.03 2.09 0 > T3-4A 450 5000 9.71 2.16 0 > > that would be a function that plots column number 3 and 4 skipping first = line > and ignoring first column (that would put zeros in the array for example) > A fonction that would do that could look like that one: > plotfromfile(file=3D"data",using=3D(3,4),skippingline=3D1,ignorecolumn=3D= [1]) > > is there a function in pylab I missed and that already does something > similar? > > > ------------------------------------------------------- > This SF.Net email is sponsored by xPML, a groundbreaking scripting langua= ge > that extends applications into web and mobile media. Attend the live webc= ast > and join the prime developer group breaking into this new coding territor= y! > http://sel.as-us.falkag.net/sel?cmdlnk&kid=110944&bid$1720&dat=121642 > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > |
|
From: Andrew J. <a.h...@gm...> - 2006-04-05 15:17:32
|
Hi All,
I've encountered a strange problem: I've been running some python code
on both a linux box and OS X, both with python 2.4.1 and the latest
numpy and matplotlib from svn.
I have found that when I transfer pickled numpy arrays from one machine
to the other (in either direction), the resulting data *looks* all right
(i.e., it is a numpy array of the correct type with the correct values
at the correct indices), but it seems to produce the wrong result in (at
least) one circumstance: matplotlib.hist() gives the completely wrong
picture (and set of bins).
This can be ameliorated by running the array through
arr=numpy.asarray(arr, dtype=numpy.float64)
but this seems like a complete kludge (and is only needed when you do
the transfer between machines).
I've attached a minimal code that exhibits the problem: try
test_pickle_hist.test(write=True)
on one machine, transfer the output file to another machine, and run
test_pickle_hist.test(write=False)
on another, and you should see a very strange result (and it should be
fixed if you set asarray=True).
Any ideas?
Andrew
|
|
From: manouchk <man...@gm...> - 2006-04-05 14:41:13
|
Le Mercredi 05 Avril 2006 11:36, manouchk a =E9crit=A0: I made a mistake with my mail. Just correcting it, sorry for inconvenience. Hi, Data file I use usually have a first line or more with comments and sometim= es=20 column with text. I used to use gnuplot that now automatically skips rows t= hat=20 does not contain numbers (before one should use every n to skip n forst lin= e)=20 and handle well files that have column without number. using column 3 and 4 from a file to plot is done using using 3:3. I wondering if there is an hidden possibilty to plot more or less directly= =20 from file as in gnuplot. imagine the file : col1 col2 col3 col4 col5 col6 T3-4B 450 100 4.31 1.44 0 T3-4B 450 200 5.56 2.06 0 T3-4B 450 500 6.03 2.09 0 T3-4A 450 5000 9.71 2.16 0 that would be a function that plots column number 3 and 4 skipping first li= ne=20 and ignoring first column (that would put zeros in the array for example) A fonction that would do that could look like that one: plotfromfile(file=3D"data",using=3D(3,4),skippingline=3D1,ignorecolumn=3D[1= ]) is there a function in pylab I missed and that already does something=20 similar? |
|
From: manouchk <man...@gm...> - 2006-04-05 14:26:50
|
Hi, Data file I use usually have a first line or more with comments and sometimes column with text. I used to use gnuplot that does skip au which with I wondering if there is an hidden possibilty to plot more or less directly from file. imagine the file : col1 col2 col3 col4 col5 col6 T3-4B 450 100 4.31 1.44 0 T3-4B 450 200 5.56 2.06 0 T3-4B 450 500 6.03 2.09 0 T3-4A 450 5000 9.71 2.16 0 that would be a function that plots column number 3 and 4 skipping first line and ignoring first column (that would put zeros in the array for example) It could have a syntax like that one: plotfromfile(file="data",using=(3,4),skippingline=1,ignorecolumn=[1]) is there a function in pylab that I missed and that already does something similar? |
|
From: Michael B. <mb...@co...> - 2006-04-05 13:33:16
|
Hi.
I just installed ipython and matplotlib on OS X via Darwinports, and
both are working well. However, I am getting an error in the
interaction between them:
$ ipython -pylab
pygtk.require() must be called before importing gtk
PyGTK version 1.99.16 or greater is required to run the GTK
Matplotlib backends
It seems odd since I do have a later version of pygtk. Here are (some
of) my installed ports:
~ $ port installed
The following ports are currently installed:
gtk2 @2.8.12_1+darwin_8 (active)
py-gtk2 @2.8.4_0 (active)
py-ipython @0.7.1.fix1_0 (active)
py-matplotlib @0.82_0+gtk2 (active) <-- note matplotlib is
configured for gtk2
My backend is GTKAgg.
In addition, when I run matplotlib in interactive mode, by setting
interactive: True in my matplotlib.rc file, it works, but the effects
are one step behind. I.e. I can say:
plot([1, 2, 3])
(the plotting window appears with nothing in it)
xlabel('foo')
(the line appears)
ylabel('baz')
(the xlabel appears)
etc.
Any ideas what might be going wrong?
In case it helps, here is my pythonpath. Darwinports installs
everything into /opt/local
~ $ python
Python 2.4.2 (#1, Mar 31 2006, 13:50:42)
[GCC 4.0.0 (Apple Computer, Inc. build 5026)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> print '\n'.join(sys.path)
/opt/local/bin
/opt/local/Library/Frameworks/Python.framework/Versions/2.4/lib/
python24.zip
/opt/local/Library/Frameworks/Python.framework/Versions/2.4/lib/
python2.4
/opt/local/Library/Frameworks/Python.framework/Versions/2.4/lib/
python2.4/plat-darwin
/opt/local/Library/Frameworks/Python.framework/Versions/2.4/lib/
python2.4/plat-mac
/opt/local/Library/Frameworks/Python.framework/Versions/2.4/lib/
python2.4/plat-mac/lib-scriptpackages
/opt/local/Library/Frameworks/Python.framework/Versions/2.4/lib/
python2.4/lib-tk
/opt/local/lib/python2.4/lib-dynload
/opt/local/Library/Frameworks/Python.framework/Versions/2.4/lib/
python2.4/site-packages
/opt/local/lib/python2.4/site-packages
/opt/local/lib/python2.4/site-packages/Numeric
/opt/local/lib/python2.4/site-packages/gtk-2.0
/Users/michael/Library/Python/2.4/site-packages
/opt/local/lib/python2.4/site-packages
/opt/local/lib/python2.4/site-packages
/Users/michael/.ipython
/opt/local/lib/python2.4/site-packages/IPython/Extensions
Cheers,
Mike
|
|
From: Eric F. <ef...@ha...> - 2006-04-05 07:11:50
|
John, Thanks--I thought it should work, but when I tried it and it didn't, I failed to look more closely. Now a question: is there a reason why the argument order for polar plotting is (theta, r)? In thinking about polar coordinates, I always think of them in the reverse order (r, theta), and I think this is the way I have always seen polar coordinates in math and physics books. Eric John Hunter wrote: >>>>>>"Eric" == Eric Firing <ef...@ha...> writes: > > > Eric> Polar axis support is embryonic; I don't see an easy way to > Eric> make a polar bar chart. You could make the bar outlines > Eric> using "plot" on a polar axis. > > Although polar support is patchy, it usually can be made to work. Eg, > it already handles most types of objects (text, lines, collections). > I took a look and noticed that it did not draw it's patches, though it > stores them and handles the transformations properly. This is simply > one line sin of omission (which I've fixed in svn), ie I needed to add > the patches to the list of artists being drawn in PolarAxes.draw. > > Here is a little script that shows how to add "rectangles" to polar > plots (requires svn 2258) > > from matplotlib.patches import Rectangle > from matplotlib.axes import PolarSubplot > import matplotlib.cm as cm > from pylab import figure, show, nx > > dtheta = nx.pi/8 > r = 1 > theta = 0 > > fig = figure() > ax = PolarSubplot(fig, 111) > fig.add_axes(ax) > N = 15 > for i in range(N): > frac = float(i)/N > rect = Rectangle( (theta, 0), dtheta, r, facecolor=cm.jet(frac)) > ax.add_patch(rect) > theta += dtheta > r*=1.05 > ax.autoscale_view() > show() > > Although I don't have experience with windrose plots, this can > probably serve as the foundation. The autoscale view functionality is > clearly off, but it mostly works. One can do the same with arbitrary > patches (eg Polygons), as long as you construct vertices where the > x/width attribute is interpreted as radians, and the y/height > attribute is interpreted as radius. > > JDH |
|
From: John H. <jdh...@ac...> - 2006-04-05 05:23:28
|
>>>>> "Eric" == Eric Firing <ef...@ha...> writes:
Eric> Polar axis support is embryonic; I don't see an easy way to
Eric> make a polar bar chart. You could make the bar outlines
Eric> using "plot" on a polar axis.
Although polar support is patchy, it usually can be made to work. Eg,
it already handles most types of objects (text, lines, collections).
I took a look and noticed that it did not draw it's patches, though it
stores them and handles the transformations properly. This is simply
one line sin of omission (which I've fixed in svn), ie I needed to add
the patches to the list of artists being drawn in PolarAxes.draw.
Here is a little script that shows how to add "rectangles" to polar
plots (requires svn 2258)
from matplotlib.patches import Rectangle
from matplotlib.axes import PolarSubplot
import matplotlib.cm as cm
from pylab import figure, show, nx
dtheta = nx.pi/8
r = 1
theta = 0
fig = figure()
ax = PolarSubplot(fig, 111)
fig.add_axes(ax)
N = 15
for i in range(N):
frac = float(i)/N
rect = Rectangle( (theta, 0), dtheta, r, facecolor=cm.jet(frac))
ax.add_patch(rect)
theta += dtheta
r*=1.05
ax.autoscale_view()
show()
Although I don't have experience with windrose plots, this can
probably serve as the foundation. The autoscale view functionality is
clearly off, but it mostly works. One can do the same with arbitrary
patches (eg Polygons), as long as you construct vertices where the
x/width attribute is interpreted as radians, and the y/height
attribute is interpreted as radius.
JDH
|