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
(7) |
2
|
3
|
4
(1) |
5
|
6
(3) |
|
7
(1) |
8
(5) |
9
(15) |
10
(15) |
11
(6) |
12
(7) |
13
|
|
14
(3) |
15
(10) |
16
(11) |
17
(17) |
18
(4) |
19
(6) |
20
|
|
21
(1) |
22
(5) |
23
(4) |
24
|
25
|
26
(7) |
27
(2) |
|
28
(4) |
29
(9) |
30
(11) |
|
|
|
|
|
From: John H. <jdh...@ac...> - 2004-11-11 15:49:55
|
>>>>> "Shin" == Shin <sd...@em...> writes:
Shin> My default mode of matplotlib is interactive mode, but in
Shin> some programs I like to turn off the interactive model
Shin> temporarily so postpone drawing until I call show(), because
Shin> of performance concern. Any way for swith the mode in a
Shin> script? Thanks in advance.
from matplotlib import interactive
from matplotlib.matlab import *
plot([1,2,3])
interactive(False) # turn off interactive mode
xlabel('hi mom')
ylabel('bye')
title('all done')
interactive(False) # turn it back on
draw() # draw the canvas
JDH
Shin> ------------------------------------------------------- This
Shin> SF.Net email is sponsored by: Sybase ASE Linux Express
Shin> Edition - download now for FREE LinuxWorld Reader's Choice
Shin> Award Winner for best database on Linux.
Shin> http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click
Shin> _______________________________________________
Shin> Matplotlib-users mailing list
Shin> Mat...@li...
Shin> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
|
|
From: John H. <jdh...@ac...> - 2004-11-11 15:25:53
|
>>>>> "Nils" == Nils Wagner <nw...@me...> writes:
Nils> Hi all, Structure plots provide a quick visual check on the
Nils> sparsity pattern of the matrix. A structure plot is a
Nils> rectangular array of dots; a dot is black if the
Nils> corresponding matrix element is nonzero otherwise it is
Nils> white.
Nils> Is it possible to generate such plots with scipy or should
Nils> we switch over to matplotlib ?
Here's another implementation that uses images - likely to be much
faster for very large matrices.
import random
from matplotlib.colors import LinearSegmentedColormap
from matplotlib.matlab import *
def spy2(Z):
"""
SPY(Z) plots the sparsity pattern of the matrix S as an image
"""
#binary colormap min white, max black
cmapdata = {
'red' : ((0., 1., 1.), (1., 0., 0.)),
'green': ((0., 1., 1.), (1., 0., 0.)),
'blue' : ((0., 1., 1.), (1., 0., 0.))
}
binary = LinearSegmentedColormap('binary', cmapdata, 2)
Z = where(Z>0,1.,0.)
imshow(transpose(Z), interpolation='nearest', cmap=binary)
def get_sparse_matrix(M,N,frac=0.1):
'return a MxN sparse matrix with frac elements randomly filled'
data = zeros((M,N))*0.
for i in range(int(M*N*frac)):
x = random.randint(0,M-1)
y = random.randint(0,N-1)
data[x,y] = rand()
return data
data = get_sparse_matrix(50,60)
spy2(data)
show()
|
|
From: John H. <jdh...@ac...> - 2004-11-11 15:14:56
|
>>>>> "Nils" == Nils Wagner <nw...@me...> writes:
Nils> Hi all, Structure plots provide a quick visual check on the
Nils> sparsity pattern of the matrix. A structure plot is a
Nils> rectangular array of dots; a dot is black if the
Nils> corresponding matrix element is nonzero otherwise it is
Nils> white.
Nils> Is it possible to generate such plots with scipy or should
Nils> we switch over to matplotlib ?
A quick matplotlib implementation is below. In matlab this function
is called "spy" and Alexander Schmolck requested this in an earlier
post. The spy implementation uses plot markers which are fixed sizes
(in points). For large matrices, you'll likely want to use a smaller
markersize.
Perhaps better would be to use a polygon collection setup so that the
marker sizes filled the boundaries of the matrix cell. This would
take a little more work, and would also have a different call
signature that matlab's, since matlab also uses plots markers . If
you have any thoughts on how you would like the implementation to
work, please share them...
JDH
from matplotlib.matlab import *
def get_xyz_where(Z, Cond):
"""
Z and Cond are MxN matrices. Z are data and Cond is a boolean
matrix where some condition is satisfied. Return value is x,y,z
where x and y are the indices into Z and z are the values of Z at
those indices. x,y,z are 1D arrays
This is a lot easier in numarray - is there a more elegant way to
do this that works on both numeric and numarray?
"""
M,N = Z.shape
z = ravel(Z)
ind = nonzero( ravel(Cond) )
x = arange(M); x.shape = M,1
X = repeat(x, N, 1)
x = ravel(X)
y = arange(N); y.shape = 1,N
Y = repeat(y, M)
y = ravel(Y)
x = take(x, ind)
y = take(y, ind)
z = take(z, ind)
return x,y,z
def spy(Z, marker='s', markersize=10, **kwargs):
"""
SPY(Z, **kwrags) plots the sparsity pattern of the matrix S.
kwargs give the marker properties - see help(plot) for more
information on marker properties
"""
x,y,z = get_xyz_where(Z, Z>0)
plot(x+0.5,y+0.5, linestyle='None', marker=marker,markersize=markersize, **kwargs)
M,N = 25,20
data = zeros((M,N))*0.
data[:,12] = rand(M)
data[5,:] = rand(N)
spy(data)
axis([0,M,0,N])
show()
|
|
From: Nils W. <nw...@me...> - 2004-11-11 14:12:44
|
Hi all, Structure plots provide a quick visual check on the sparsity pattern of the matrix. A structure plot is a rectangular array of dots; a dot is black if the corresponding matrix element is nonzero otherwise it is white. Is it possible to generate such plots with scipy or should we switch over to matplotlib ? Nils Reference: http://math.nist.gov/MatrixMarket/structureplots.html |
|
From: Jochen V. <vo...@se...> - 2004-11-11 09:52:14
|
Hello, On Wed, 10 Nov 2004 16:26:47 +0000 (GMT) Andy Baerdmore wrote > Anyway, the upshot is matplotlib runs but it is not finding the > sans font and makes a poor substitute in its place. For exampe the output > from simple_demo.py is : ... I think that this might be a bug in Vittorio's Debian packages. There was a problem with the matplotlib font loading code which made it only find fonts installed under /usr/share/matplotlib. Since Debian hast the fonts under /usr/share/fonts they were not found. Maybe this was not fixed in his packages? You can try my alternative packages at http://seehuhn.de/debian/, which hopefully work. Download python-matplotlib_0.63.4-2.1_i386.deb =66rom there and install it manually with e.g. dpkg -i python-matplotlib_0.63.4-2.1_i386.deb I hope this helps, Jochen --=20 http://seehuhn.de/ |
|
From: Shin <sd...@em...> - 2004-11-11 06:21:38
|
My default mode of matplotlib is interactive mode, but in some programs I like to turn off the interactive model temporarily so postpone drawing until I call show(), because of performance concern. Any way for swith the mode in a script? Thanks in advance. Daehyok Shin UNC-CH |
|
From: Carol L. <car...@sr...> - 2004-11-10 22:35:28
|
Is it possible to control the text of the polar grid labels? I would like to have 8 grid lines in theta, but label only 4 of them. I also want to set my own labels, such as "NE", "NW", "SW" and "SE". I would like to turn off the labels along r completely or replace them with my own set of labels. The comments in polar_demo.py indicate that the properties of the gridlines and labels can be accessed directly from the polar axes. How can I find out what keywords can be set for each of the attributes: thetagridlines, rgridlines, thatagridlabels and rgridlabels? -- Ms. Carol A. Leger SRI International Phone: (650) 859-4114 333 Ravenswood Avenue G-273 Menlo Park, CA 94025 e-mail: le...@sr... |
|
From: John H. <jdh...@ac...> - 2004-11-10 22:26:29
|
>>>>> "seberino" == seberino <seb...@sp...> writes:
seberino> Stephen Thanks for the help. The format of the data is
seberino> ASCII files and/or Python arrays that contain (x, y)
seberino> coordinates or (x, y, z) coordinates for 3D.
seberino> For starters, what is best way to plot triples in this
seberino> list?...
seberino> [ (0, 0, 3.3), (0, 1, 4.4), (1, 0, 2.2), (1, 1, 2.34)]
seberino> I want to duplicate color plot on screenshots page:
seberino> http://matplotlib.sourceforge.net/screenshots/pcolor_demo_large.png
You have a 2x2 grid. pcolor is a bit funny in that for an MxN grid it
only plots M-1 x N-1 rectangles since it doesn't know how to handle
the edges. So it's a bit of a pathalogical case for pcolor.
Basically you need to transform your list of 3 tuples into 3 arrays
x,y,z, and then reshape the array. Here I'll use imshow which
doesn't have the edge problem
from matplotlib.matlab import *
data = [ (0, 0, 3.3), (0, 1, 4.4), (1, 0, 2.2), (1, 1, 2.34)]
x,y,z = zip(*data)
z = array(z); z.shape = 2,2
imshow(z, interpolation='nearest', extent=(0,1,0,1))
show()
If you had a longer data sequence, say 5x5, you would use pcolor like
from matplotlib.matlab import *
data = ....
x,y,z = zip(*data)
x = array(x); x.shape = 5,5
y = array(y); y.shape = 5,5
z = array(z); z.shape = 5,5
pcolor(x,y,z)
show()
In short, there is nothing special about plotting "data" versus
"functions". Both are simply cases of plotting 1-D or 2-D arrays as
far as matplotlib is concerned. Your task is to get your data in to
the right array shape.
JDH
|
|
From: <seb...@sp...> - 2004-11-10 21:04:24
|
Stephen Thanks for the help. The format of the data is ASCII files and/or Python arrays that contain (x, y) coordinates or (x, y, z) coordinates for 3D. For starters, what is best way to plot triples in this list?... [ (0, 0, 3.3), (0, 1, 4.4), (1, 0, 2.2), (1, 1, 2.34)] I want to duplicate color plot on screenshots page: http://matplotlib.sourceforge.net/screenshots/pcolor_demo_large.png Chris On Wed, Nov 10, 2004 at 12:21:00PM -0800, Stephen Walton wrote: > On Wed, 2004-11-10 at 10:06 -0800, seb...@sp... wrote: > > The examples on the screenshots page are great and very helpful. > > I hope to never use any other plotting app again except Matplotlib. > > > > What is easiest/cleanest way to modify examples to accept > > precalculated /data/ rather than use a mathematical /function/??? > > You have asked a _huge_ question. What format are these data in? ASCII > files? HDF files? FITS images? JPEG images? > > -- > Stephen Walton, Professor of Physics and Astronomy, > California State University, Northridge > ste...@cs... > > > > ------------------------------------------------------- > This SF.Net email is sponsored by: > Sybase ASE Linux Express Edition - download now for FREE > LinuxWorld Reader's Choice Award Winner for best database on Linux. > http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > -- _______________________________________ Christian Seberino, Ph.D. SPAWAR Systems Center San Diego Code 2872 49258 Mills Street, Room 158 San Diego, CA 92152-5385 U.S.A. Phone: (619) 553-9973 Fax : (619) 553-6521 Email: seb...@sp... _______________________________________ |
|
From: Stephen W. <ste...@cs...> - 2004-11-10 20:22:39
|
On Wed, 2004-11-10 at 10:06 -0800, seb...@sp... wrote: > The examples on the screenshots page are great and very helpful. > I hope to never use any other plotting app again except Matplotlib. > > What is easiest/cleanest way to modify examples to accept > precalculated /data/ rather than use a mathematical /function/??? You have asked a _huge_ question. What format are these data in? ASCII files? HDF files? FITS images? JPEG images? -- Stephen Walton, Professor of Physics and Astronomy, California State University, Northridge ste...@cs... |
|
From: Paul B. <ba...@st...> - 2004-11-10 19:09:21
|
Andy Beardmore wrote: >I finally bit the bullet and upgraded my laptop from mandrake 9.1 to >Ubuntu 4.01. I have been wanting a debian based distro on it for ages... > >In the process I upgraded matplotlib from 0.61.x to 0.63.4. >I installed the python-matplotlib deb package linked to from the >matplotlib website, and finally managed to solve all the dependencies >in order to get matplotlib to work - there was a numarray >extension package that needed to be installed in addition to the main >numarray one. > >Anyway, the upshot is matplotlib runs but it is not finding the >sans font and makes a poor substitute in its place. For exampe the output >from simple_demo.py is : > >examples/simple_plot.py >/usr/lib/python2.3/site-packages/matplotlib/backends/backend_gtk.py:1077: >DeprecationWarning: > self.append_space() >/usr/lib/python2.3/site-packages/matplotlib/backends/backend_gtk.py:1077: >GtkWarning: mixing deprecated and non-deprecated GtkToolbar API is not >allowed > self.append_space() >/usr/lib/python2.3/site-packages/matplotlib/backends/backend_gtk.py:1080: >DeprecationWarning: > self.append_widget(self.message, '', '') >/usr/lib/python2.3/site-packages/matplotlib/backends/backend_gtk.py:1080: >GtkWarning: mixing deprecated and non-deprecated GtkToolbar API is not >allowed > self.append_widget(self.message, '', '') >Could not match sans-serif, normal, normal. Returning >/usr/share/matplotlib/cmmi10.ttf >Could not match sans-serif, normal, normal. Returning >/usr/share/matplotlib/cmmi10.ttf >Could not match sans-serif, normal, normal. Returning >/usr/share/matplotlib/cmmi10.ttf > > >Is there any way I can force it to use a better looking font ? >Or even find out what has happened to the sans-serif font? > > Have you tried setting the TTFPATH environment variable to the paths where your other TTF fonts are located? It appears that the default font paths that matplotlib uses are not the ones used by Ubuntu. It might also be useful to print the FontManager.ttfdict attribute to see what fonts have actually been found. -- Paul -- Paul Barrett, PhD Space Telescope Science Institute Phone: 410-338-4475 ESS/Science Software Branch FAX: 410-338-4767 Baltimore, MD 21218 |
|
From: <seb...@sp...> - 2004-11-10 18:06:11
|
The examples on the screenshots page are great and very helpful. I hope to never use any other plotting app again except Matplotlib. What is easiest/cleanest way to modify examples to accept precalculated /data/ rather than use a mathematical /function/??? e.g. x = arange(xmin, xmax, dx) y = arange(ymin, ymax, dy) X,Y = meshgrid(x, y) Z = my_function(X, Y) im = imshow(Z, extent=(xmin, xmax, ymin, ymax)) How supply "Z" data myself rather than define my_function for Z? ==================== Also, plot(t, my_function(t)) Same question here for this 2D plot. (I have the 2D data already calculated.) thanks! Chris -- _______________________________________ Christian Seberino, Ph.D. SPAWAR Systems Center San Diego Code 2872 49258 Mills Street, Room 158 San Diego, CA 92152-5385 U.S.A. Phone: (619) 553-9973 Fax : (619) 553-6521 Email: seb...@sp... _______________________________________ |
|
From: <na...@te...> - 2004-11-10 16:03:19
|
John Hunter wrote: > I haven't seen this one before. Intermittent errors are the hardest > to track down. What GUI is PSPad based on. Is any of the information > at http://matplotlib.sourceforge.net/faq.html#FREEZE helpful? PSPad is based on native toolkit, I think. It is not open source, though it is freeware. Information on the FAQ didn't help, but I tried running some of the examples and my scripts on every IDE, and got basically the same results. I think the DOS box message error is the most helpful of them, but not that much. Double-clicking from Windows Explorer: Microsoft Visual C++ Runtime Error - abnormal programa termination DOS command line: Fatal Python Error: PyEval_RestoreThread: NULL state Interpreter running in a DOS box: shows no error, but gives me a Microsoft Visual C++ error as above when I quit the DOS box. IDLE: shows no error, but gives me a Microsoft Visual C++ error as above. Pyshell: BSODs. I noticed, however, that it only happens when I save the figure, and _never_ when I show them in a windows. And, in every case, the picture is saved with no problems before the error occurs. I am using the previous binary version of matplotlib (I'm downloading the newest version right now and will test as soon as possible), with Python-2.3.4. I double-checked to see if I was using the right versions (it could have happen), but I don't think that this is the problem. If there is any other information that could be helpful, I can find it here. > You can use > axes to make the axes any size you want. The syntax is I'm sorry to ask so simple questions. The main reason is that the matlab interface is so simple that I rarely need to do more than what it provides. This will help a lot, thanks! --- José Alexandre Nalon na...@te... |
|
From: John H. <jdh...@ac...> - 2004-11-10 14:55:21
|
>>>>> "Jos=E9" =3D=3D Jos=E9 Alexandre Nalon <na...@te...> writes:
Jos=E9> Hello, Matplotlib has been helping me a lot with my graphic
Jos=E9> needs. I am still surprised by the looking of the
Jos=E9> pictures. Many thanks for the great software.
Jos=E9> I'm having some issues, though. Sometimes I get error
Jos=E9> messages, usually an error in KERNEL32.DLL on Windows ME,
Jos=E9> and on Windows only, I don't get this behaviour in
Jos=E9> Linux. It's not as bad as it may seem, as every script runs
Jos=E9> completely, the pictures are saved and, besides the message
Jos=E9> box informing the error, nothing weird happens. I don't know
Jos=E9> how to reproduce the errors - when I run from the DOS prompt
Jos=E9> or from IDLE, I get the messages. When I run from my IDE (I
Jos=E9> use PSPad) I usually don't get error messages, with the same
Jos=E9> scripts. Any hint to what I can be doing wrong, or how to
Jos=E9> find out what is happening?
I haven't seen this one before. Intermittent errors are the hardest
to track down. What GUI is PSPad based on. Is any of the information
at http://matplotlib.sourceforge.net/faq.html#FREEZE helpful?
Jos=E9> Also, I'm in need of some help. I must draw six subplots,
Jos=E9> one below the other (subplot(6, ...)), but the way things
Jos=E9> are coming out, the plots are to thin, and, although the
Jos=E9> picture looks good, I thought that if I could make each
Jos=E9> subplot a little bigger, that would help a lot. Is there any
Jos=E9> way this can be done?
subplot is simply a thin wrapper to axes -
http://matplotlib.sf.net/matplotlib.matlab.html#-axes . You can use
axes to make the axes any size you want. The syntax is
# left, bottom, width, height
ax1 =3D axes([0.125, 0.1, 0.7, .8])
where all values are fractions of the total figure size. See
http://matplotlib.sourceforge.net/examples/ganged_plots.py for an
example where no space is left between the axes, and xlabels are put
only on the bottom.
Jos=E9> In other plots, I need to index the subplots (label them
Jos=E9> '(a)', '(b)', ... for reference in text). I was using xlabel
Jos=E9> to do that, but when I have more than two subplots, the
Jos=E9> xlabel is shadowed by the following subplot. Is there any
Jos=E9> way to make the space between the plots bigger, so the
Jos=E9> xlabels can be shown, or is there any other (better) way to
Jos=E9> do that?
You can use the text command to place text anywhere in the figure you
want - http://matplotlib.sourceforge.net/matplotlib.matlab.html#-text.
You can place text in data coordinates
text(.5, 12, 'hi mom')
in which case the text will "move" visually if you pan and zoom the
axes, or in axes coordinates (0,0) is lower left and 1,1 is upper
right, in which case the text will remain stationary with respect to
changes in the axes limits
text(0.05, 0.9, 'hi mom', transform=3Dgca().transAxes)
See http://matplotlib.sourceforge.net/examples/alignment_test.py for
lots of examples showing text placement and alignment.
You can also place text outside the axes using the text command
# to the left and above the axes box
text(-0.1, 1.05, 'hi mom', transform=3Dgca().transAxes)
Hope this helps,
JDH
|
|
From: John H. <jdh...@ac...> - 2004-11-10 14:45:01
|
>>>>> "Dominique" == Dominique Orban <Dom...@po...> writes:
Dominique> However, if I plot only one line, the legend appears
Dominique> vertically:
>>>> plot( [1,2,3], [4,5,6] ) legend( ( 'line1' ), 'lower right' )
>>>> show()
Dominique> Finally,
>>>> plot( [1,2,3], [4,5,6] ) legend( ( 'line1', ), 'lower right'
>>>> ) show()
Dominique> (note the comma after 'line1') produces the horizontal
Dominique> text.
Dominique> This isn't a big deal, but I am not sure where in
Dominique> legend.py I should fix that.
This isn't a legend bug exactly, but perhaps legend could detect this
common error and warn you. Legend expects a sequence of legend
labels. When you pass it
'my label' or equivalently ('my label') you are simply passing it a
string which is a length 8 sequence of characters. When you pass it
('my label', ) you are passing a length 1 tuple with a string as the
first element.
Admittedly legend could be smarter, and just "do what you mean".
JDH
|
|
From: John H. <jdh...@ac...> - 2004-11-10 14:42:52
|
>>>>> "Greg" == Greg Novak <no...@uc...> writes:
Greg> I upgraded to Fedora Core 3 and hence spent some time
Greg> rebuiding all of the Python modules I use frequently...
Makes you wish for a good python package manager ...
Greg> In order to compile matplotlib, I had to install pycxx as a
Greg> separate package. I noticed that there was a cxx directory
Greg> in the matplotlib tree, but it didn't seem to be using it.
Greg> I got it to compile and it seems to be working. This
Greg> message is just for someone's information to point out the
Greg> dependency, or the fact that the stuff in the cxx directory
Greg> doesn't seem to be satisfying it.
You shouldn't need a separate pycxx - all the cxx requirements ship
with matplotlib, and the paths to them are hardwired in the setup.py
file. Try this ( I know you already got it working but it would be
helpful for me if there is a problem to know the source of it)
1) get a new copy of matplotlib (perhaps you got an incomplete
download) -
http://aleron.dl.sourceforge.net/sourceforge/matplotlib/matplotlib-0.64.tar.gz
2) unpack it in a new directory so that you have a clean build tree
3) rm -rf your site-packages/matplotlib tree
4) python setup.py build. If the build fails, please capture the
standard output and standard error from the build process and send
it to me.
Thanks,
JDH
|
|
From: Steve C. <ste...@ya...> - 2004-11-10 13:08:56
|
On Tue, 2004-11-09 at 12:24, matthew arnison wrote: > 2. I was getting errors that the > matplotlib.backends.backend_mod.IMAGE_FORMAT attribute was not > found, during toolbar initialization. I put in a workaround. Is this happening when using the classes directly rather than using the matlab interface? Are you doing something similar to the example "embedding_in_gtk2.py" - that works OK for me. Could you provide a minimal example to demonstrate this. Steve |
|
From: Steve C. <ste...@ya...> - 2004-11-10 08:19:25
|
On Wed, 2004-11-10 at 12:16,
mat...@li... wrote:
> John Hunter wrote:
> > Perhaps it would be better to define a constant in
> > matplotlib.__init__.py, something like
> >
> > matplotlib.PY2EXE = hasattr(sys, 'frozen')
> >
> > because then the code which is conditional upon py2exe would be more
> > readable
> >
> > if not matplotlib.PY2EXE
> > pygtk.require('2.0')
> >
> > or something like that...
>
> Except that Py2EXE is not the only method of "freezing" apps. In
> particular, you'd want this to work with OS-X's Py2App, and probably
> other methods of bundling apps.
>
> you might want:
>
> matplotlib.FROZEN = hasattr(sys, 'frozen')
>
> and
>
> if not matplotlib.FROZEN
> pygtk.require('2.0')
>
> Then you could also accommodate other keywords that other bundling
> methods use.
>
> BTW, is someone really successfully using PyGTK on Windows? Cool!
>
> -Chris
I added matplotlib.FROZEN to matplotlib.__init__.py.
It did not work because matplotlib has not yet been imported when
pygtk.require() is called. So I changed the import order and it seems to
be working on now.
Steve
|
|
From: Greg N. <no...@uc...> - 2004-11-10 07:29:02
|
I upgraded to Fedora Core 3 and hence spent some time rebuiding all of the Python modules I use frequently... In order to compile matplotlib, I had to install pycxx as a separate package. I noticed that there was a cxx directory in the matplotlib tree, but it didn't seem to be using it. I got it to compile and it seems to be working. This message is just for someone's information to point out the dependency, or the fact that the stuff in the cxx directory doesn't seem to be satisfying it. Greg |
|
From: Dominique O. <Dom...@po...> - 2004-11-09 20:24:18
|
Hello, I am experimenting with legends in Matplotlib 0.64 on WinXP. I notice that when plotting at least two lines, the legend text appears horizontally, as expected, e.g. as in: >>> plot( [1,2,3], [4,5,6], [1,2,3], [-1,-3,-1] ) >>> legend( ( 'line1', 'line2' ), 'lower right' ) >>> show() However, if I plot only one line, the legend appears vertically: >>> plot( [1,2,3], [4,5,6] ) >>> legend( ( 'line1' ), 'lower right' ) >>> show() Finally, >>> plot( [1,2,3], [4,5,6] ) >>> legend( ( 'line1', ), 'lower right' ) >>> show() (note the comma after 'line1') produces the horizontal text. This isn't a big deal, but I am not sure where in legend.py I should fix that. Thanks, Dominique |
|
From: John H. <jdh...@ac...> - 2004-11-09 19:29:58
|
>>>>> "Al" == Al Schapira <a.d...@wo...> writes:
Al> Hi John, I just installed 0.64 apparently
Al> successfully. However, none of the examples run because POLAR
Al> cannot be imported. I always get something like this:
Al> [ads@ADS1 examples]$ python logo.py Traceback (most recent
Al> call last): File "logo.py", line 3, in ? from
Al> matplotlib.matlab import * File
Al> "/usr/local/lib/python2.3/site-packages/matplotlib/matlab.py",
Al> line 162, in ? from axes import Axes, PolarAxes File
Al> "/usr/local/lib/python2.3/site-packages/matplotlib/axes.py",
Al> line 9, in ? from artist import Artist File
Al> "/usr/local/lib/python2.3/site-packages/matplotlib/artist.py",
Al> line 4, in ? from transforms import identity_transform File
Al> "/usr/local/lib/python2.3/site-packages/matplotlib/transforms.py",
Al> line 189, in ? from _transforms import IDENTITY, LOG10,
Al> POLAR, Func, FuncXY ImportError: cannot import name POLAR
Please see my previous post with subject
"if you have troubles installing"
|
|
From: Al S. <a.d...@wo...> - 2004-11-09 19:14:06
|
Hi John,
I just installed 0.64 apparently successfully. However, none
of the examples run because POLAR cannot be imported.
I always get something like this:
[ads@ADS1 examples]$ python logo.py
Traceback (most recent call last):
File "logo.py", line 3, in ?
from matplotlib.matlab import *
File "/usr/local/lib/python2.3/site-packages/matplotlib/matlab.py",
line 162,
in ?
from axes import Axes, PolarAxes
File "/usr/local/lib/python2.3/site-packages/matplotlib/axes.py", line
9, in ? from artist import Artist
File "/usr/local/lib/python2.3/site-packages/matplotlib/artist.py",
line 4, in ?
from transforms import identity_transform
File
"/usr/local/lib/python2.3/site-packages/matplotlib/transforms.py", line
189, in ?
from _transforms import IDENTITY, LOG10, POLAR, Func, FuncXY
ImportError: cannot import name POLAR
I'm on Redhat linux 9 and have installed every version
of matplotlib since 0.50.
What gives?
Thanks.
-Al
|
|
From: John H. <jdh...@ac...> - 2004-11-09 18:53:32
|
>>>>> "Chris" == Chris Barker <Chr...@no...> writes:
Chris> BTW, is someone really successfully using PyGTK on Windows?
Chris> Cool!
I've deployed pretty complex pygtk apps on windows, that incorporate
matplotlib and VTK. Works great - my windows user have never
complained.
Of course I had to write the vtk gtkglext render window myself....
Really, though, I've been extremely happy with gtk on windows - more
so than on OSX, actually.
JDH
|
|
From: Chris B. <Chr...@no...> - 2004-11-09 18:03:54
|
John Hunter wrote:
> Perhaps it would be better to define a constant in
> matplotlib.__init__.py, something like
>
> matplotlib.PY2EXE = hasattr(sys, 'frozen')
>
> because then the code which is conditional upon py2exe would be more
> readable
>
> if not matplotlib.PY2EXE
> pygtk.require('2.0')
>
> or something like that...
Except that Py2EXE is not the only method of "freezing" apps. In
particular, you'd want this to work with OS-X's Py2App, and probably
other methods of bundling apps.
you might want:
matplotlib.FROZEN = hasattr(sys, 'frozen')
and
if not matplotlib.FROZEN
pygtk.require('2.0')
Then you could also accommodate other keywords that other bundling
methods use.
BTW, is someone really successfully using PyGTK on Windows? Cool!
-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: John H. <jdh...@ac...> - 2004-11-09 16:14:15
|
>>>>> "matthew" == matthew arnison <ma...@ca...> writes:
matthew> 1. I had to change
toolbar = NavigationToolbar(canvas)
matthew> to
toolbar = NavigationToolbar(canvas, win)
matthew> where win is the GTK window object. I guess the
matthew> matplotlib API is still unstable. :)
Oops. This one slipped under my radar screen. Sorry I didn't
announce it as an API change. This also break
examples/embedding_in_gtk2.py, for the same reason (fixed in CVS).
Thanks for letting us know...
JDH
|