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
(47) |
2
(13) |
3
(12) |
4
(16) |
5
(3) |
|
6
(6) |
7
(20) |
8
(45) |
9
(24) |
10
(30) |
11
(14) |
12
(4) |
|
13
(1) |
14
(6) |
15
(6) |
16
(10) |
17
(15) |
18
(13) |
19
(4) |
|
20
|
21
(14) |
22
(13) |
23
(9) |
24
(19) |
25
(24) |
26
|
|
27
(4) |
28
(20) |
29
(17) |
30
(7) |
|
|
|
|
From: John H. <jd...@gm...> - 2010-06-01 13:06:31
|
We have uploaded a bugfix release of the matplotlib-0.99 branch. Source and binaries are available for download from https://sourceforge.net/projects/matplotlib/files/matplotlib/matplotlib-0.99.3 This release fixes many minor and at least one critical bug in our path simplification algorithm. The svn commit changelog since the last release is below. Thanks to all the developers for their efforts and to Christoph Gohlke for the windows builds. Unless something major comes up, this will be our last bugfix release of the maintenance branch, and we plan to get a trunk release for mpl 1.0 out in the upcoming weeks for testing. The trunk is where all of the new features have been added, but it is considered less stable than the maintenance branch which only gets bugfixes. ------------------------------------------------------------------------ r8175 | leejjoon | 2010-03-03 12:03:30 -0600 (Wed, 03 Mar 2010) | 1 line fix arguments of allow_rasterization.draw_wrapper ------------------------------------------------------------------------ r8174 | jdh2358 | 2010-03-03 11:15:58 -0600 (Wed, 03 Mar 2010) | 1 line added support for favicon in docs build ------------------------------------------------------------------------ r8173 | jdh2358 | 2010-03-03 10:56:16 -0600 (Wed, 03 Mar 2010) | 1 line applied Mattias get_bounds patch ------------------------------------------------------------------------ r8172 | jdh2358 | 2010-03-03 10:31:42 -0600 (Wed, 03 Mar 2010) | 1 line fix svnmerge download instructions ------------------------------------------------------------------------ r8171 | jdh2358 | 2010-03-03 09:47:48 -0600 (Wed, 03 Mar 2010) | 1 line added favicon ------------------------------------------------------------------------ r8160 | mdboom | 2010-02-26 10:27:22 -0600 (Fri, 26 Feb 2010) | 2 lines Fix offset_copy: the fig argument should be optional. ------------------------------------------------------------------------ r8146 | mdboom | 2010-02-22 10:22:28 -0600 (Mon, 22 Feb 2010) | 1 line Backporting numpy version check fix to 0.99 branch ------------------------------------------------------------------------ r8145 | jdh2358 | 2010-02-22 08:31:45 -0600 (Mon, 22 Feb 2010) | 1 line fix setters for regular polygon ------------------------------------------------------------------------ r8135 | leejjoon | 2010-02-16 16:55:27 -0600 (Tue, 16 Feb 2010) | 1 line fix a bug in Text._get_layout that returns an incorrect information for an empty string ------------------------------------------------------------------------ r8121 | jdh2358 | 2010-02-08 11:50:27 -0600 (Mon, 08 Feb 2010) | 1 line added Ariels csd patch for proper scaling at the dc component ------------------------------------------------------------------------ r8116 | mdboom | 2010-02-08 09:57:45 -0600 (Mon, 08 Feb 2010) | 1 line Fix for libpng-1.4 compatibility ------------------------------------------------------------------------ r8092 | leejjoon | 2010-01-18 18:26:16 -0600 (Mon, 18 Jan 2010) | 1 line update annotate documentation to explain *annotation_clip* parameter ------------------------------------------------------------------------ r8070 | mdboom | 2010-01-04 08:28:57 -0600 (Mon, 04 Jan 2010) | 1 line Fix doc 'clean' ------------------------------------------------------------------------ r8068 | mdboom | 2010-01-04 08:14:38 -0600 (Mon, 04 Jan 2010) | 2 lines Fix bug in PDF, PS, SVG and OS-X backends: do not simplify filled paths. ------------------------------------------------------------------------ r8057 | mdboom | 2009-12-31 09:46:58 -0600 (Thu, 31 Dec 2009) | 2 lines [2916753] Wrong API signature- yscale ------------------------------------------------------------------------ r8036 | jdh2358 | 2009-12-16 13:21:44 -0600 (Wed, 16 Dec 2009) | 1 line add mpl book to index sidebar ------------------------------------------------------------------------ r8016 | heeres | 2009-12-09 18:09:03 -0600 (Wed, 09 Dec 2009) | 2 lines Mplot3d: fix scatter3d markers bug ------------------------------------------------------------------------ r8003 | mdboom | 2009-12-03 13:21:28 -0600 (Thu, 03 Dec 2009) | 1 line [2896454] subscripts and \mathrm don't get along, aka the long-standing wiggle baseline problem ------------------------------------------------------------------------ r8001 | mdboom | 2009-12-03 12:54:54 -0600 (Thu, 03 Dec 2009) | 2 lines [2903460] _path.pyd crashes in 0.99.1.win32-py2.6 on PIII CPU ------------------------------------------------------------------------ r7998 | mdboom | 2009-12-01 13:01:45 -0600 (Tue, 01 Dec 2009) | 2 lines [2906157] Let sphinx reference matplotlib-created plots (backport) ------------------------------------------------------------------------ r7991 | mdboom | 2009-11-30 12:30:09 -0600 (Mon, 30 Nov 2009) | 2 lines Fix bug in usage of "contains" ------------------------------------------------------------------------ r7989 | mdboom | 2009-11-30 11:24:49 -0600 (Mon, 30 Nov 2009) | 1 line Fix SF-2903596 on the 0.99.x branch ------------------------------------------------------------------------ r7983 | mdboom | 2009-11-24 12:08:51 -0600 (Tue, 24 Nov 2009) | 2 lines [2902715] artist.set_clip_path does not handle tuple ------------------------------------------------------------------------ r7981 | jdh2358 | 2009-11-23 15:16:15 -0600 (Mon, 23 Nov 2009) | 1 line make IndexFormatter derive from Formatter ------------------------------------------------------------------------ r7972 | mdboom | 2009-11-18 10:19:21 -0600 (Wed, 18 Nov 2009) | 2 lines Fix plot directive so it handles source files in various encodings. ------------------------------------------------------------------------ r7970 | efiring | 2009-11-16 17:49:11 -0600 (Mon, 16 Nov 2009) | 4 lines Fix Normalize bug: ensure scalar output for scalar input. This bug was causing a bug in clabel with a single contour level, as reported by Brendan Arnold. ------------------------------------------------------------------------ r7952 | mdboom | 2009-11-12 11:27:34 -0600 (Thu, 12 Nov 2009) | 2 lines [2853659] Patch to fix EMF backend ------------------------------------------------------------------------ r7944 | mdboom | 2009-11-06 13:24:55 -0600 (Fri, 06 Nov 2009) | 2 lines Add support for \widebar{} in mathtext (Thanks Sean Arms) ------------------------------------------------------------------------ r7942 | jdh2358 | 2009-11-06 09:04:33 -0600 (Fri, 06 Nov 2009) | 1 line backport afm fix to branch ------------------------------------------------------------------------ r7928 | mdboom | 2009-11-03 14:55:47 -0600 (Tue, 03 Nov 2009) | 1 line [2889193] Rasterized output offset in pdf and ps ------------------------------------------------------------------------ r7924 | mdboom | 2009-11-03 10:27:13 -0600 (Tue, 03 Nov 2009) | 2 lines [2880836] Save from toolbar changes directory with WX backend ------------------------------------------------------------------------ r7919 | mdboom | 2009-11-03 09:46:14 -0600 (Tue, 03 Nov 2009) | 2 lines [2890979] Close paths correctly in PolyCollection ------------------------------------------------------------------------ r7916 | mdboom | 2009-11-02 12:54:29 -0600 (Mon, 02 Nov 2009) | 2 lines [2890345] pylab.thetagrids() does not accept fmt ------------------------------------------------------------------------ r7906 | leejjoon | 2009-10-25 14:30:43 -0500 (Sun, 25 Oct 2009) | 2 lines axes_divider.py : fix a bug that axes has a wrong size when pack_start is True. ------------------------------------------------------------------------ r7903 | mdboom | 2009-10-23 10:02:21 -0500 (Fri, 23 Oct 2009) | 2 lines Support \# in mathtext. ------------------------------------------------------------------------ r7901 | mdboom | 2009-10-22 08:46:08 -0500 (Thu, 22 Oct 2009) | 2 lines Fix path simplification so the path always starts with a MOVETO. ------------------------------------------------------------------------ r7896 | mdboom | 2009-10-21 08:24:33 -0500 (Wed, 21 Oct 2009) | 2 lines Fix bug in simplification code that was clipping peaks. ------------------------------------------------------------------------ r7893 | leejjoon | 2009-10-19 04:02:08 -0500 (Mon, 19 Oct 2009) | 1 line fix a bug in plot_directive ------------------------------------------------------------------------ r7887 | leejjoon | 2009-10-15 23:35:20 -0500 (Thu, 15 Oct 2009) | 1 line fix Text.get_prop_tup omitting _rotation_mode. patch by Stan West ------------------------------------------------------------------------ r7884 | ryanmay | 2009-10-14 15:27:07 -0500 (Wed, 14 Oct 2009) | 1 line Add AutoDateFormatter and AutoDateLocator to __all__ and to the module-level documentation. ------------------------------------------------------------------------ r7880 | leejjoon | 2009-10-12 18:02:27 -0500 (Mon, 12 Oct 2009) | 1 line fix plot_directive.py that generated incorrect links for some cases ------------------------------------------------------------------------ r7874 | mdboom | 2009-10-12 08:21:07 -0500 (Mon, 12 Oct 2009) | 2 lines Don't simplify hatched paths in PDF, PS and SVG backends. ------------------------------------------------------------------------ r7867 | astraw | 2009-10-11 13:55:18 -0500 (Sun, 11 Oct 2009) | 2 lines imshow: only apply axes patch clipping if image doesn't clip itself ------------------------------------------------------------------------ r7866 | astraw | 2009-10-11 13:54:22 -0500 (Sun, 11 Oct 2009) | 2 lines allow already transformed clip path in artist set_clip_path() ------------------------------------------------------------------------ r7864 | efiring | 2009-10-10 21:51:06 -0500 (Sat, 10 Oct 2009) | 2 lines docstring fixup: LinearSegmentedColormap.from_list ------------------------------------------------------------------------ r7858 | mdboom | 2009-10-09 10:24:25 -0500 (Fri, 09 Oct 2009) | 2 lines Don't perform path simplification when hatch is drawn. ------------------------------------------------------------------------ r7849 | mdboom | 2009-10-06 09:07:08 -0500 (Tue, 06 Oct 2009) | 2 lines Don't do "make.py clean" in terms of svn-clean, since that doesn't work with a tarball. ------------------------------------------------------------------------ r7847 | efiring | 2009-10-05 18:11:10 -0500 (Mon, 05 Oct 2009) | 2 lines Add more platforms to setupext.py; patch by Benjamin Drung ------------------------------------------------------------------------ r7846 | efiring | 2009-10-05 17:44:38 -0500 (Mon, 05 Oct 2009) | 8 lines Tk directory-finding patch by Benjamin Drung. Fixes the following: Guess the correct directory in Debian/Ubuntu fails. Replacing all tcl by tk does not lead to a correct directory: /usr/share/tcltk/tcl8.5 -> /usr/share/tktk/tk8.5 The correct directory is /usr/share/tcltk/tk8.5 ------------------------------------------------------------------------ r7844 | leejjoon | 2009-10-04 21:05:16 -0500 (Sun, 04 Oct 2009) | 1 line image created by imshow support remove method ------------------------------------------------------------------------ r7837 | mdboom | 2009-10-01 07:37:49 -0500 (Thu, 01 Oct 2009) | 2 lines Fix alpha of Shadow patch. ------------------------------------------------------------------------ r7834 | mdboom | 2009-09-30 08:26:36 -0500 (Wed, 30 Sep 2009) | 2 lines Fix Grouper docstring -- it only supports weak-referenceable objects. ------------------------------------------------------------------------ r7827 | efiring | 2009-09-25 18:56:14 -0500 (Fri, 25 Sep 2009) | 2 lines Fix bug in quiver handling of masked U, V ------------------------------------------------------------------------ r7822 | mdboom | 2009-09-24 12:03:13 -0500 (Thu, 24 Sep 2009) | 2 lines Clip markers in draw_marker outside of the image rectangle with an extra border to accomodate the size of the marker. ------------------------------------------------------------------------ r7819 | jdh2358 | 2009-09-23 22:57:31 -0500 (Wed, 23 Sep 2009) | 1 line applied a fix for sf bug 2865490; is there something more elegant? ------------------------------------------------------------------------ r7818 | jdh2358 | 2009-09-23 22:00:28 -0500 (Wed, 23 Sep 2009) | 1 line try statically linking in the deps for OSX ------------------------------------------------------------------------ r7813 | jdh2358 | 2009-09-21 12:12:47 -0500 (Mon, 21 Sep 2009) | 1 line |
|
From: rugspin <pie...@we...> - 2010-06-01 09:18:47
|
Angus McMorland-2 wrote:
>
> On 31 May 2010 23:17, Angus McMorland <am...@gm...> wrote:
>
>> On 31 May 2010 19:49, rugspin <pie...@we...> wrote:
>>
>>>
>>> I have a small problem how to convert an image from matplotlib to PIL
>>>
>>> right now doing somthing like this:
>>> ------------------------------------------
>>> from scipy import *
>>> from pylab import *
>>> from PIL import Image
>>>
>>> a = arange(16384).reshape(128,128)
>>> imsave( "test.png", a, cmap=cm.summer,vmin=0,vmax=16383)
>>> b = Image.open("test.png" )
>>> ------------------------------------------
>>>
>>
>> The Image.fromarray function should do what you want. For example,
>>
>> import numpy as np # note: use of "from foo import *"
>> import Image # is discouraged where possible
>>
>> a = np.arange(128)[None,:] * np.ones(128)[:,None]
>>
>
> Sorry - I was playing around with a few iterations of this line, and
> didn't
> provide the most useful one. Your example:
>
> a = np.arange(128**2).reshape(128,128)
>
> should also work fine.
>
>
>> b = Image.fromarray(a)
>> c = np.asarray(b)
>> np.all(c == a)
>> -> True
>>
>> I hope that helps,
>>
>> Angus.
>>
>
> --
> AJC McMorland
> Post-doctoral research fellow
> Neurobiology, University of Pittsburgh
>
> ------------------------------------------------------------------------------
>
>
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
>
Thank you Angus
but that's not exactly what i was looking for. The fromarray function is
very basic, so I would have to take care of all the RGBA of the array. the
imshow and imsave functions take care of all that for example adding a
colormap. After choosing a reasonable colormap (vmin, vmax, ....) I would
like to convert this into a PIL image.
Best Regard
Hans
--
View this message in context: http://old.nabble.com/imshow%2C-imsave-to-PIL-image-conversion-tp28736246p28739401.html
Sent from the matplotlib - users mailing list archive at Nabble.com.
|
|
From: Vincent S. <sc...@sa...> - 2010-06-01 08:34:49
|
On 06/01/2010 02:56 AM, Oz Nahum wrote: > hi andre, > thanks for your reply, > > do you know where I can find more documentation about this ? check http://docs.python.org/library/stdtypes.html#string-formatting Regards, VS. |
|
From: L1011 <yab...@ho...> - 2010-06-01 07:58:12
|
Hello everyone! Here's my first (bout not last) post: I'm trying to customize one of my plot and I wondered if there was easy way to: -set the font size of the legend -set the number of markers displayed in the legend. Indeed, I got by default to markers showing in my legend and I want to keep only one of them. Sorry if those questions have already been post, but I could not find exactly where. L1011. -- View this message in context: http://old.nabble.com/Legend-size-and-markers-tp28738771p28738771.html Sent from the matplotlib - users mailing list archive at Nabble.com. |
|
From: Mark B. <mar...@gm...> - 2010-06-01 07:41:01
|
Hi Sandro,
Thanks for the tip.
In checking the HTTP logs, I found that the apache user couldn't create a
".matplotlib" directory (as it had no home dir) so i used the environment
variable MPLCONFIGDIR to point to somewhere meaningful, then I found that to
"import pylab" I needed a DISPLAY variable etc, etc, and I've eventually got
everything working as expected by importing like thus:
import os
os.environ['MPLCONFIGDIR']='/path/for/.matplotlib'
import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt
Found this too, I should have RTFM :D
http://matplotlib.sourceforge.net/faq/howto_faq.html#howto-webapp
Cheers,
Mark
On Tue, Jun 1, 2010 at 4:44 PM, Sandro Tosi <mo...@de...> wrote:
> Hello Mark,
>
> On Tue, Jun 1, 2010 at 08:17, Mark Boorer <mar...@gm...> wrote:
> > And I have no idea why :(
> > I'm fairly new to HTML, and I can't seem to see any meaningful errors in
> > Firebug. Anyone have any experience with an error like this?
>
> This is not HTML, it's a CGi, so a script executed server-side; to
> know what's going wrong, check the log files of your web server.
>
> Regards,
> --
> Sandro Tosi (aka morph, morpheus, matrixhasu)
> My website: http://matrixhasu.altervista.org/
> Me at Debian: http://wiki.debian.org/SandroTosi
>
|
|
From: Sandro T. <mo...@de...> - 2010-06-01 06:45:15
|
Hello Mark, On Tue, Jun 1, 2010 at 08:17, Mark Boorer <mar...@gm...> wrote: > And I have no idea why :( > I'm fairly new to HTML, and I can't seem to see any meaningful errors in > Firebug. Anyone have any experience with an error like this? This is not HTML, it's a CGi, so a script executed server-side; to know what's going wrong, check the log files of your web server. Regards, -- Sandro Tosi (aka morph, morpheus, matrixhasu) My website: http://matrixhasu.altervista.org/ Me at Debian: http://wiki.debian.org/SandroTosi |
|
From: Mark B. <mar...@gm...> - 2010-06-01 06:17:11
|
Hi,
I'm having a problem when importing pylab in a python CGI script to generate
some dynamic graphs for a web page.
As soon as I import pylab, my script will fail, and I have no idea why.
As an example, i can have 1x1 black png file, loaded from a script like
thus:
#!/usr/bin/env python
# black.py
fh = open('black.png')
print "Content-type: image/png\n"
print fh.read()
And called from a HTML page via:
<img src="black.py" alt="A black dot">
This will work perfectly until i modify the script to:
#!/usr/bin/env python
# black.py
import pylab
fh = open('black.png')
print "Content-type: image/png\n"
print fh.read()
And I have no idea why :(
I'm fairly new to HTML, and I can't seem to see any meaningful errors in
Firebug. Anyone have any experience with an error like this?
The script runs fine from a terminal and outputs as expected.
I'm using python2.4, python-matplotlib-0.91.2-1.el5.rf on Centos 5.3 (old I
know, but this is a production server)
Any help would be much appreciated.
|
|
From: Angus M. <am...@gm...> - 2010-06-01 03:21:34
|
On 31 May 2010 23:17, Angus McMorland <am...@gm...> wrote:
> On 31 May 2010 19:49, rugspin <pie...@we...> wrote:
>
>>
>> I have a small problem how to convert an image from matplotlib to PIL
>>
>> right now doing somthing like this:
>> ------------------------------------------
>> from scipy import *
>> from pylab import *
>> from PIL import Image
>>
>> a = arange(16384).reshape(128,128)
>> imsave( "test.png", a, cmap=cm.summer,vmin=0,vmax=16383)
>> b = Image.open("test.png" )
>> ------------------------------------------
>>
>
> The Image.fromarray function should do what you want. For example,
>
> import numpy as np # note: use of "from foo import *"
> import Image # is discouraged where possible
>
> a = np.arange(128)[None,:] * np.ones(128)[:,None]
>
Sorry - I was playing around with a few iterations of this line, and didn't
provide the most useful one. Your example:
a = np.arange(128**2).reshape(128,128)
should also work fine.
> b = Image.fromarray(a)
> c = np.asarray(b)
> np.all(c == a)
> -> True
>
> I hope that helps,
>
> Angus.
>
--
AJC McMorland
Post-doctoral research fellow
Neurobiology, University of Pittsburgh
|
|
From: Angus M. <am...@gm...> - 2010-06-01 03:17:53
|
On 31 May 2010 19:49, rugspin <pie...@we...> wrote:
>
> I have a small problem how to convert an image from matplotlib to PIL
>
> right now doing somthing like this:
> ------------------------------------------
> from scipy import *
> from pylab import *
> from PIL import Image
>
> a = arange(16384).reshape(128,128)
> imsave( "test.png", a, cmap=cm.summer,vmin=0,vmax=16383)
> b = Image.open("test.png" )
> ------------------------------------------
>
The Image.fromarray function should do what you want. For example,
import numpy as np # note: use of "from foo import *"
import Image # is discouraged where possible
a = np.arange(128)[None,:] * np.ones(128)[:,None]
b = Image.fromarray(a)
c = np.asarray(b)
np.all(c == a)
-> True
I hope that helps,
Angus.
--
AJC McMorland
Post-doctoral research fellow
Neurobiology, University of Pittsburgh
|
|
From: Christoph G. <cg...@uc...> - 2010-06-01 03:12:41
|
On 5/31/2010 7:45 PM, John Hunter wrote: > On Mon, May 31, 2010 at 7:56 PM, Christoph Gohlke<cg...@uc...> wrote: > >> John: I rebuilt the 32 bit binaries for Python 2.5 and 2.6 against numpy >> 1.3.0. They do also work with numpy 1.4.1. Please consider uploading these >> binaries to the SF site. I also noticced that the eggs on the SF download >> site are corrupted, showing only 1.6 KB. The updated files are at >> <http://www.lfd.uci.edu/~gohlke/pythonlibs/#matplotlib>. Thanks. > > Hey Christoph -- I just updated the win32 binaries again. Thanks for > the rebuild. The sf upload page is extremely fragile and flaky, so > I'm not surprised a corrupted binary got uploaded. I made sure the > uploads completed this time -- hopefully they are now good but take a > look. > looks good to me. |
|
From: John H. <jd...@gm...> - 2010-06-01 02:45:19
|
On Mon, May 31, 2010 at 7:56 PM, Christoph Gohlke <cg...@uc...> wrote: > John: I rebuilt the 32 bit binaries for Python 2.5 and 2.6 against numpy > 1.3.0. They do also work with numpy 1.4.1. Please consider uploading these > binaries to the SF site. I also noticced that the eggs on the SF download > site are corrupted, showing only 1.6 KB. The updated files are at > <http://www.lfd.uci.edu/~gohlke/pythonlibs/#matplotlib>. Thanks. Hey Christoph -- I just updated the win32 binaries again. Thanks for the rebuild. The sf upload page is extremely fragile and flaky, so I'm not surprised a corrupted binary got uploaded. I made sure the uploads completed this time -- hopefully they are now good but take a look. JDH |
|
From: Benjamin R. <ben...@ou...> - 2010-06-01 01:59:38
|
On Mon, May 31, 2010 at 7:51 PM, Oz Nahum <na...@gm...> wrote: > Hi Thanks for the answer, > > actually, I always use > show and plot, I have no clue how to use the functions you suggested ... > > I'll look into it. > > Do you have an idea where I can find a description of the keyword "format" > > '%.3f' is nice, but still not scientific format... > > is this like Fortran? > I believe so (I am not too familiar with fortran, but the ideas are similar in many languages like C's sprintf. You can do '%.3g' to pretty print the float numbers (in a sense), and '%.3e' to always do scientific notation. Ben Root |
|
From: Benjamin R. <ben...@ou...> - 2010-06-01 01:44:16
|
Yeah, I don't think that is what you want. I believe the 'ax' you are referencing there is the figure axes. How do you want the numbers to appear? Ben Root On Mon, May 31, 2010 at 8:27 PM, Oz Nahum <na...@gm...> wrote: > Hi, > > I open another thread because I think this is not related. > > I have figured out how to create scientific notation in the color bar. > However, by default Python creates really ugly values for printing: > 1.165E+00, 1.167E+00... etc. > > I figure that they are stored somewhere in a list. > > I could do : > > cb=colorbar(ax=ax1, orientation='horizontal',format='%.e') > > and then with: > cb.ax.get_xmajorticklabels > > i get: > > <bound method Axes.get_xmajorticklabels of <matplotlib.axes.Axes object at > 0x5716210>> > > But do I actually modify this list I have no clue... > > Would be happy to know if somebody knows > > > > -- > Oz Nahum > Graduate Student > Zentrum für Angewandte Geologie > Universität Tübingen > > --- > > Imagine there's no countries > it isn't hard to do > Nothing to kill or die for > And no religion too > Imagine all the people > Living life in peace > > > > > ------------------------------------------------------------------------------ > > > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > |
|
From: Oz N. <na...@gm...> - 2010-06-01 01:27:46
|
Hi, I open another thread because I think this is not related. I have figured out how to create scientific notation in the color bar. However, by default Python creates really ugly values for printing: 1.165E+00, 1.167E+00... etc. I figure that they are stored somewhere in a list. I could do : cb=colorbar(ax=ax1, orientation='horizontal',format='%.e') and then with: cb.ax.get_xmajorticklabels i get: <bound method Axes.get_xmajorticklabels of <matplotlib.axes.Axes object at 0x5716210>> But do I actually modify this list I have no clue... Would be happy to know if somebody knows -- Oz Nahum Graduate Student Zentrum für Angewandte Geologie Universität Tübingen --- Imagine there's no countries it isn't hard to do Nothing to kill or die for And no religion too Imagine all the people Living life in peace |
|
From: Oz N. <na...@gm...> - 2010-06-01 01:02:44
|
On Mon, May 31, 2010 at 6:01 PM, Oz Nahum <na...@gm...> wrote: > I now get something really ugly > > the labels are 1.164E+00 > > would be great to remove the + sign, if I can only do 1.164E0 > > it's the best.... > > > On Mon, May 31, 2010 at 5:55 PM, Andre Walker-Loud <wal...@gm...>wrote: > >> Hi Thanks for the answer, >> >> actually, I always use >> show and plot, I have no clue how to use the functions you suggested ... >> >> I'll look into it. >> >> Do you have an idea where I can find a description of the keyword "format" >> >> '%.3f' is nice, but still not scientific format... >> >> >> you can use >> >> '%.3e' >> >> for scientific format. >> >> >> Cheers, >> >> Andre >> >> >> >> >> is this like Fortran? >> >> On Mon, May 31, 2010 at 5:41 PM, Benjamin Root <ben...@ou...> wrote: >> >>> Oz, >>> >>> Some plotting functions like pcolor and imshow have keyword args for >>> vmin/vmax where you can explicitly set the min and maximum values for the >>> colorscale. There are some more complicated things you can do with the >>> colormap that are more generic to all plotting functions as well, but I >>> would see if using vmin and vmax does the trick for you. >>> >>> Ben Root >>> >>> On Mon, May 31, 2010 at 7:25 PM, Oz Nahum <na...@gm...> wrote: >>> >>>> found a solution after 2 hours ... >>>> >>>> colorbar(ax=ax1, orientation='horizontal',format='%.3f') >>>> >>>> now, I need to know how to set up limits for all the images which are >>>> exactly the same limits. >>>> So far I'm failing with the use of "boundaries" >>>> >>>> .... >>>> >>>> Would be happy to know >>>> >>>> -- >>>> Oz Nahum >>>> Graduate Student >>>> Zentrum für Angewandte Geologie >>>> Universität Tübingen >>>> >>>> --- >>>> >>>> Imagine there's no countries >>>> it isn't hard to do >>>> Nothing to kill or die for >>>> And no religion too >>>> Imagine all the people >>>> Living life in peace >>>> >>>> >>>> ------------------------------------------------------------------------------ >>>> >>>> _______________________________________________ >>>> Matplotlib-users mailing list >>>> Mat...@li... >>>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users >>>> >>> >>> >> >> >> -- >> Oz Nahum >> Graduate Student >> Zentrum für Angewandte Geologie >> Universität Tübingen >> >> --- >> >> Imagine there's no countries >> it isn't hard to do >> Nothing to kill or die for >> And no religion too >> Imagine all the people >> Living life in peace >> >> >> ------------------------------------------------------------------------------ >> >> _______________________________________________ >> Matplotlib-users mailing list >> Mat...@li... >> https://lists.sourceforge.net/lists/listinfo/matplotlib-users >> >> >> > > > -- > Oz Nahum > Graduate Student > Zentrum für Angewandte Geologie > Universität Tübingen > > --- > > Imagine there's no countries > it isn't hard to do > Nothing to kill or die for > And no religion too > Imagine all the people > Living life in peace > > > -- Oz Nahum Graduate Student Zentrum für Angewandte Geologie Universität Tübingen --- Imagine there's no countries it isn't hard to do Nothing to kill or die for And no religion too Imagine all the people Living life in peace |
|
From: Andre Walker-L. <wal...@gm...> - 2010-06-01 01:01:44
|
Hi Oz, Sorry, I am not familiar with what you are trying to do with your plots. Everything I have learned is from trial and error, the gallery page http://matplotlib.sourceforge.net/gallery.html and the user manual http://matplotlib.sourceforge.net/contents.html Good luck, Andre On May 31, 2010, at 8:56 PM, Oz Nahum wrote: > hi andre, > thanks for your reply, > > do you know where I can find more documentation about this ? > > Thanks, > > > > On Mon, May 31, 2010 at 5:55 PM, Andre Walker-Loud <wal...@gm... > > wrote: >> Hi Thanks for the answer, >> >> actually, I always use >> show and plot, I have no clue how to use the functions you >> suggested ... >> >> I'll look into it. >> >> Do you have an idea where I can find a description of the keyword >> "format" >> >> '%.3f' is nice, but still not scientific format... > > you can use > > '%.3e' > > for scientific format. > > > Cheers, > > Andre > > > >> >> is this like Fortran? >> >> On Mon, May 31, 2010 at 5:41 PM, Benjamin Root <ben...@ou...> >> wrote: >> Oz, >> >> Some plotting functions like pcolor and imshow have keyword args >> for vmin/vmax where you can explicitly set the min and maximum >> values for the colorscale. There are some more complicated things >> you can do with the colormap that are more generic to all plotting >> functions as well, but I would see if using vmin and vmax does the >> trick for you. >> >> Ben Root >> >> On Mon, May 31, 2010 at 7:25 PM, Oz Nahum <na...@gm...> wrote: >> found a solution after 2 hours ... >> >> colorbar(ax=ax1, orientation='horizontal',format='%.3f') >> >> now, I need to know how to set up limits for all the images which are >> exactly the same limits. >> So far I'm failing with the use of "boundaries" >> >> .... >> >> Would be happy to know >> >> -- >> Oz Nahum >> Graduate Student >> Zentrum für Angewandte Geologie >> Universität Tübingen >> >> --- >> >> Imagine there's no countries >> it isn't hard to do >> Nothing to kill or die for >> And no religion too >> Imagine all the people >> Living life in peace >> >> ------------------------------------------------------------------------------ >> >> _______________________________________________ >> Matplotlib-users mailing list >> Mat...@li... >> https://lists.sourceforge.net/lists/listinfo/matplotlib-users >> >> >> >> >> -- >> Oz Nahum >> Graduate Student >> Zentrum für Angewandte Geologie >> Universität Tübingen >> >> --- >> >> Imagine there's no countries >> it isn't hard to do >> Nothing to kill or die for >> And no religion too >> Imagine all the people >> Living life in peace >> >> >> ------------------------------------------------------------------------------ >> >> _______________________________________________ >> Matplotlib-users mailing list >> Mat...@li... >> https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > > > > -- > Oz Nahum > Graduate Student > Zentrum für Angewandte Geologie > Universität Tübingen > > --- > > Imagine there's no countries > it isn't hard to do > Nothing to kill or die for > And no religion too > Imagine all the people > Living life in peace > > |
|
From: Oz N. <na...@gm...> - 2010-06-01 00:57:12
|
hi andre, thanks for your reply, do you know where I can find more documentation about this ? Thanks, On Mon, May 31, 2010 at 5:55 PM, Andre Walker-Loud <wal...@gm...>wrote: > Hi Thanks for the answer, > > actually, I always use > show and plot, I have no clue how to use the functions you suggested ... > > I'll look into it. > > Do you have an idea where I can find a description of the keyword "format" > > '%.3f' is nice, but still not scientific format... > > > you can use > > '%.3e' > > for scientific format. > > > Cheers, > > Andre > > > > > is this like Fortran? > > On Mon, May 31, 2010 at 5:41 PM, Benjamin Root <ben...@ou...> wrote: > >> Oz, >> >> Some plotting functions like pcolor and imshow have keyword args for >> vmin/vmax where you can explicitly set the min and maximum values for the >> colorscale. There are some more complicated things you can do with the >> colormap that are more generic to all plotting functions as well, but I >> would see if using vmin and vmax does the trick for you. >> >> Ben Root >> >> On Mon, May 31, 2010 at 7:25 PM, Oz Nahum <na...@gm...> wrote: >> >>> found a solution after 2 hours ... >>> >>> colorbar(ax=ax1, orientation='horizontal',format='%.3f') >>> >>> now, I need to know how to set up limits for all the images which are >>> exactly the same limits. >>> So far I'm failing with the use of "boundaries" >>> >>> .... >>> >>> Would be happy to know >>> >>> -- >>> Oz Nahum >>> Graduate Student >>> Zentrum für Angewandte Geologie >>> Universität Tübingen >>> >>> --- >>> >>> Imagine there's no countries >>> it isn't hard to do >>> Nothing to kill or die for >>> And no religion too >>> Imagine all the people >>> Living life in peace >>> >>> >>> ------------------------------------------------------------------------------ >>> >>> _______________________________________________ >>> Matplotlib-users mailing list >>> Mat...@li... >>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users >>> >> >> > > > -- > Oz Nahum > Graduate Student > Zentrum für Angewandte Geologie > Universität Tübingen > > --- > > Imagine there's no countries > it isn't hard to do > Nothing to kill or die for > And no religion too > Imagine all the people > Living life in peace > > > ------------------------------------------------------------------------------ > > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > > -- Oz Nahum Graduate Student Zentrum für Angewandte Geologie Universität Tübingen --- Imagine there's no countries it isn't hard to do Nothing to kill or die for And no religion too Imagine all the people Living life in peace |
|
From: Christoph G. <cg...@uc...> - 2010-06-01 00:56:32
|
On 5/31/2010 4:53 PM, Craig McQueen wrote: > Christoph Gohlke wrote: >> >> On 5/31/2010 1:53 AM, Craig McQueen wrote: >>> I just installed matplotlib-0.99.3.win32-py2.6.exe on this Win2000 PC. >>> When I try: >>> from matplotlib import pyplot as plt >>> >>> it crashes Python with an apparent NULL-pointer reference. If I run >>> python -v >>> >>> then it crashes just after: >>> # c:\python26\lib\site-packages\matplotlib\transforms.pyc matches >>> c:\python26\li >>> b\site-packages\matplotlib\transforms.py >>> import matplotlib.transforms # precompiled from >>> c:\python26\lib\site-packages\ma >>> tplotlib\transforms.pyc >>> >>> matplotlib-0.99.1.win32-py2.6.exe worked fine on this PC. >>> >>> Regards, >>> Craig McQueen >> >> >> I can not reproduce the crash in a Virtual Machine with Windows 2000 >> SP4, Python 2.6.5, numpy 1.4.1, and matplotlib 0.99.3. >> >> Exactly which versions are you using, and how did you install Python >> (for all users?). What is your CPU? >> >> matplotlib-0.99.3.win32-py2.6 was built against numpy 1.4.1, libpng >> 1.4.2 and zlib 1.2.5, while matplotlib-0.99.1.win32-py2.6 was built >> against numpy 1.3.0, libpng 1.2.3x, and zlib 1.2.3. >> >> Christoph >> > > Ah--installing numpy 1.4.1 fixed the issue. I had numpy 1.3.0 installed > before that. > > Thanks for such a helpful response. I wasn't aware that matplotlib is > "built against" a particular version of numpy (not quite sure what that > means either, unless numpy provides a direct C API as well as the Python > API; please excuse my ignorance). > > (To answer your questions in case that's still useful somehow... I'm > using Windows 2000 SP4, Python 2.6.5, on a Pentium 4 PC. I installed > Python for all users.) > > Thanks and regards, > Craig McQueen > Yes, numpy has a C API, which is used by MPL. I can confirm the crashes with numpy 1.3. John: I rebuilt the 32 bit binaries for Python 2.5 and 2.6 against numpy 1.3.0. They do also work with numpy 1.4.1. Please consider uploading these binaries to the SF site. I also noticced that the eggs on the SF download site are corrupted, showing only 1.6 KB. The updated files are at <http://www.lfd.uci.edu/~gohlke/pythonlibs/#matplotlib>. Thanks. -- Christoph |
|
From: Andre Walker-L. <wal...@gm...> - 2010-06-01 00:55:26
|
> Hi Thanks for the answer, > > actually, I always use > show and plot, I have no clue how to use the functions you > suggested ... > > I'll look into it. > > Do you have an idea where I can find a description of the keyword > "format" > > '%.3f' is nice, but still not scientific format... you can use '%.3e' for scientific format. Cheers, Andre > > is this like Fortran? > > On Mon, May 31, 2010 at 5:41 PM, Benjamin Root <ben...@ou...> > wrote: > Oz, > > Some plotting functions like pcolor and imshow have keyword args for > vmin/vmax where you can explicitly set the min and maximum values > for the colorscale. There are some more complicated things you can > do with the colormap that are more generic to all plotting functions > as well, but I would see if using vmin and vmax does the trick for > you. > > Ben Root > > On Mon, May 31, 2010 at 7:25 PM, Oz Nahum <na...@gm...> wrote: > found a solution after 2 hours ... > > colorbar(ax=ax1, orientation='horizontal',format='%.3f') > > now, I need to know how to set up limits for all the images which are > exactly the same limits. > So far I'm failing with the use of "boundaries" > > .... > > Would be happy to know > > -- > Oz Nahum > Graduate Student > Zentrum für Angewandte Geologie > Universität Tübingen > > --- > > Imagine there's no countries > it isn't hard to do > Nothing to kill or die for > And no religion too > Imagine all the people > Living life in peace > > ------------------------------------------------------------------------------ > > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > > > > -- > Oz Nahum > Graduate Student > Zentrum für Angewandte Geologie > Universität Tübingen > > --- > > Imagine there's no countries > it isn't hard to do > Nothing to kill or die for > And no religion too > Imagine all the people > Living life in peace > > > ------------------------------------------------------------------------------ > > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users |
|
From: Oz N. <na...@gm...> - 2010-06-01 00:51:45
|
Hi Thanks for the answer, actually, I always use show and plot, I have no clue how to use the functions you suggested ... I'll look into it. Do you have an idea where I can find a description of the keyword "format" '%.3f' is nice, but still not scientific format... is this like Fortran? On Mon, May 31, 2010 at 5:41 PM, Benjamin Root <ben...@ou...> wrote: > Oz, > > Some plotting functions like pcolor and imshow have keyword args for > vmin/vmax where you can explicitly set the min and maximum values for the > colorscale. There are some more complicated things you can do with the > colormap that are more generic to all plotting functions as well, but I > would see if using vmin and vmax does the trick for you. > > Ben Root > > On Mon, May 31, 2010 at 7:25 PM, Oz Nahum <na...@gm...> wrote: > >> found a solution after 2 hours ... >> >> colorbar(ax=ax1, orientation='horizontal',format='%.3f') >> >> now, I need to know how to set up limits for all the images which are >> exactly the same limits. >> So far I'm failing with the use of "boundaries" >> >> .... >> >> Would be happy to know >> >> -- >> Oz Nahum >> Graduate Student >> Zentrum für Angewandte Geologie >> Universität Tübingen >> >> --- >> >> Imagine there's no countries >> it isn't hard to do >> Nothing to kill or die for >> And no religion too >> Imagine all the people >> Living life in peace >> >> >> ------------------------------------------------------------------------------ >> >> _______________________________________________ >> Matplotlib-users mailing list >> Mat...@li... >> https://lists.sourceforge.net/lists/listinfo/matplotlib-users >> > > -- Oz Nahum Graduate Student Zentrum für Angewandte Geologie Universität Tübingen --- Imagine there's no countries it isn't hard to do Nothing to kill or die for And no religion too Imagine all the people Living life in peace |
|
From: Benjamin R. <ben...@ou...> - 2010-06-01 00:42:17
|
Oz, Some plotting functions like pcolor and imshow have keyword args for vmin/vmax where you can explicitly set the min and maximum values for the colorscale. There are some more complicated things you can do with the colormap that are more generic to all plotting functions as well, but I would see if using vmin and vmax does the trick for you. Ben Root On Mon, May 31, 2010 at 7:25 PM, Oz Nahum <na...@gm...> wrote: > found a solution after 2 hours ... > > colorbar(ax=ax1, orientation='horizontal',format='%.3f') > > now, I need to know how to set up limits for all the images which are > exactly the same limits. > So far I'm failing with the use of "boundaries" > > .... > > Would be happy to know > > -- > Oz Nahum > Graduate Student > Zentrum für Angewandte Geologie > Universität Tübingen > > --- > > Imagine there's no countries > it isn't hard to do > Nothing to kill or die for > And no religion too > Imagine all the people > Living life in peace > > > ------------------------------------------------------------------------------ > > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > |
|
From: Oz N. <na...@gm...> - 2010-06-01 00:33:41
|
found a solution after 2 hours ... colorbar(ax=ax1, orientation='horizontal',format='%.3f') now, I need to know how to set up limits for all the images which are exactly the same limits. So far I'm failing with the use of "boundaries" .... Would be happy to know -- Oz Nahum Graduate Student Zentrum für Angewandte Geologie Universität Tübingen --- Imagine there's no countries it isn't hard to do Nothing to kill or die for And no religion too Imagine all the people Living life in peace |