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
|
From: <jou...@gm...> - 2004-11-14 18:36:50
|
On Sun, 14 Nov 2004 18:08:59 +0200, Jouni K Sepp=E4nen <jou...@gm...> wrote: > > Here's what I'm using to emulate Matlab's find; it only seems to work > with Numeric, not numarray Oops - actually it seems that after from matplotlib.numerix import ravel, indices, compress the function works whether numerix is using numarray or Numeric. Making a special case of single-dimensional inputs is not very elegant, but doing otherwise would break compatibility with the existing mlab.find; and I guess there is no way in Python of emulating Matlab's detection of the number of output arguments. --=20 Jouni K Sepp=E4nen http://www.iki.fi/jks |
From: <jou...@gm...> - 2004-11-14 16:09:03
|
Hi, In Matlab, the command [i,j] =3D find(mat >=3D 3) causes i and j to hold the indices where the condition holds. (If there is only one output argument, it will hold indices to the flattened version of the condition.) Matplotlib's mlab.find() seems to work for one-dimensional arrays only. Here's what I'm using to emulate Matlab's find; it only seems to work with Numeric, not numarray, and I have no idea whether this is an efficient way to achieve the goal. I was going to suggest that the utility be included in matplotlib, but perhaps it should then be generalized to work with numarray as well. I wonder if anyone has any ideas on how to do this? I'm a newcomer to matplotlib (and Numeric, etc.), so please do point out if there is a simpler way to achieve the effect of Matlab's find. def find(condition): """ Return the indices where condition is true. For arrays of N>=3D2 dimensions, returns a tuple T of N arrays such that the condition is true at indices (T[0][i],...,T[N-1][i]). """ sh =3D condition.shape if len(sh) =3D=3D 1: return nonzero(condition) idx =3D indices(sh) cond =3D ravel(condition) return tuple([compress(cond, ravel(idx[i]))=20 for i in range(len(sh))]) --=20 Jouni K Sepp=E4nen http://www.iki.fi/jks |
From: Dominique O. <Dom...@po...> - 2004-11-12 15:25:50
|
> To: Nils Wagner <nw...@me...> > Cc: SciPy Users List <sci...@sc...>, > mat...@li... > Subject: Re: [Matplotlib-users] Visualizing Sparsity Pattern of matrices > From: John Hunter <jdh...@ac...> > Date: Thu, 11 Nov 2004 09:16:03 -0600 > > >>>>>>"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. Hi, As part of a programming environment for optimization in Python (soon to be released hopefully), I use Matplotlib for the graphics. I created several functions imitating Matlab's spy() using scatter(). My sparse matrices are represented in linked-list, compressed column or compressed row storage using the PySparse implementation http://people.web.psi.ch/geus/pyfemax/pysparse.html Using scatter, I can plot the sparsity pattern of matrices with several thousands of lines and columns in a blink on my 1.7GHz P4 laptop. Using color maps, you can even color your dots according to the magnitude of the element they represent (a 2-dimensional "city plot" of a matrix). Dominique |
From: John H. <jdh...@ac...> - 2004-11-12 14:35:04
|
>>>>> "Dimitri" == Dimitri D'Or <dim...@fs...> writes: Dimitri> Hello, I would like to know if there is a mean for Dimitri> testing on the hold status of a figure, i.e. to know if Dimitri> hold is 'on' or 'off' ? Dimitri> In fact, I use frequently the ISHOLD function in Matlab Dimitri> and I can't find a similar one in Matplotlib. A sin of omission. I just added it to CVS. If you don't have CVS access, in the meantime, you can either use the ax._ishold variable to inspect the axes hold status, or add the following to matplotlib.axes.Axes: def ishold(self): 'return the HOLD status of the axes' return self._hold and to matplotlib.matlab def ishold(b=None): """ Return the hold status of the current axes """ return gca().ishold() Should cure what ails ya ... JDH |
From: John H. <jdh...@ac...> - 2004-11-12 14:29:05
|
>>>>> "Shin" == Shin <sd...@em...> writes: Shin> Currently, figure() is the same as figure(1). But, I think Shin> a better behavior of figure is: figure() is the same as Shin> figure(n+1) where n is the maximum handle number of opened Shin> figures. So, figure() always creates a new figure. This is Shin> exactly MATLAB is doing. Any comment? Looks like a bug - thanks. Is anybody relying on the fact the figure() currently returns the current figure if it exists? This is basically the role of gcf, anyway, which creates a figure none exists and returns it, otherwise it returns the current figure. So figure should auto-increment, as you suggest. JDH |
From: John H. <jdh...@ac...> - 2004-11-12 14:26:21
|
>>>>> "Shin" == Shin <sd...@em...> writes: Shin> Thanks. Let me ask another question. How can I get the Shin> current mode? I like to recover mode after drawing Shin> everything in non-interactive mode. From help document, Shin> interactive() seems not to give current mode. >>> from matplotlib import interactive, is_interactive >>> print is_interactive() False Sorry that these features aren't documented :-( By the way, ipython already has all of this built-in. In the pylab mode you start in interactive mode. But you can "run" a code snippent using the run command, which turns off interactive mode for the duration of the run, restoring the original interactive state when the run finishes. JDH |
From: Dimitri D'O. <dim...@fs...> - 2004-11-12 12:48:47
|
Hello, I would like to know if there is a mean for testing on the hold status of a figure, i.e. to know if hold is 'on' or 'off' ? In fact, I use frequently the ISHOLD function in Matlab and I can't find a similar one in Matplotlib. Thank you, Dimitri |
From: Shin <sd...@em...> - 2004-11-12 05:51:23
|
Currently, figure() is the same as figure(1). But, I think a better behavior of figure is: figure() is the same as figure(n+1) where n is the maximum handle number of opened figures. So, figure() always creates a new figure. This is exactly MATLAB is doing. Any comment? Daehyok Shin UNC-CH |
From: Shin <sd...@em...> - 2004-11-12 03:45:26
|
Thanks. Let me ask another question. How can I get the current mode? I like to recover mode after drawing everything in non-interactive mode. From help document, interactive() seems not to give current mode. Daehyok Shin John Hunter wrote: > > 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: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 |