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
(6) |
2
(29) |
3
(19) |
4
(6) |
5
(5) |
|
6
(9) |
7
(9) |
8
(19) |
9
(14) |
10
(19) |
11
(26) |
12
(10) |
|
13
(26) |
14
(22) |
15
(19) |
16
(17) |
17
(16) |
18
(2) |
19
|
|
20
(1) |
21
(1) |
22
(10) |
23
(11) |
24
(17) |
25
(6) |
26
(1) |
|
27
|
28
(9) |
29
(9) |
30
(9) |
|
|
|
|
From: Friedrich R. <fri...@gm...> - 2011-11-12 18:47:27
|
2011/11/12 Friedrich Romstedt <fri...@gm...>: > To give the valuable information in the beginning: It appears it > cannot handle /Library/Fonts/NISC18030.ttf. It tries to load it via > ft2font.FT2Font() but that gives the Bus error. The ttf file dates to > 28 Jan 2010. It is 7108232 bytes large. I don't know why it cannot > be loaded. A quick googling of "NISC18030.ttf matplotlib" yields this interesting result: http://groups.google.com/group/sage-devel/browse_thread/thread/2c538915abc99946 >From there: "[...] and hope for John Hunter to be able to replicate the problem and come up with something better in the next few weeks (or I'll come back to it later)." So I think we have at least replicated it. What troubles me is that I was a 10.6 user from the beginning since, say, mid 2010. So my initial working fontcache was built that time. On 10.6. How do I analyse if the respective TTF is in the font cache (file)? OK, I loaded the font manager from the pickle just via matplotlib from 2009; and /Library/Fonts/NISC18030.ttf is not amongst ``matplotlib.font_manager.fontManager.ttffiles``. I didn't know until today that the CXX appearing in the build process actually refers to a package and is not just an alteration of C++ to make it more shell-friendly, as I believed until now. Maybe someone with some insights in CXX can help? I see that I can do that too, but it'll take probably much longer than when you, dear recipient, do it. >From the post referenced above it *seems* that it might have to do something with creating a Python Int from NULL? But since my knowledgability is low on CXX, as mentioned, I would not give my word for this. The explanation why it didn't try to index that file follows: $ stat -f "...." /Library/Fonts/NISC18030.ttf Last accessed or modified: 1321107464 = 12 Nov 2011 Last changed: 1264652963 = 28 Jan 2010 Time of Birth: 1292365840 = 14 Dec 2010 There you go. I guess some Mac OS X 10.6 update (probably a combo update) installed it. I will not go into details here of checking the pax files or something, I just think we see that it was born on my Mac later than I started using matplotlib. I never deleted the fontcache while using matplotlib, but I vaguely remember that I had a problem with another user than "me". I remember also some post on a failing matplotlib on OS X 10.6; which we were not able to solve, but I'll look into that now. Friedrich |
|
From: Rafael O. <ra...@ac...> - 2011-11-12 18:16:04
|
Hi.
I'm new using matplotlib and i'm using pie-chart demo to do a dynamic chart.
in this code sample i'm trying to map a DIR content to the chart labels but
I'm getting an Assert error
File "pie_demo.py", line 34, in <module>
pie(fracs, explode=explode, labels=line.strip(), autopct='%1.1f%%',
shadow=True)
File "/usr/lib/pymodules/python2.7/matplotlib/pyplot.py", line 2268, in
pie
ret = ax.pie(x, explode, labels, colors, autopct, pctdistance, shadow,
labeldistance)
File "/usr/lib/pymodules/python2.7/matplotlib/axes.py", line 4938, in pie
assert(len(x)==len(labels))
AssertionError
This is the code I'm using.
"""
Requires matplotlib0-0.70 or later
"""
import os
import subprocess
from pylab import *
figure(1, figsize=(6,6))
ax = axes([0.1, 0.1, 0.8, 0.8])
# labels = 'Ex1', 'Ex2', 'Ex3', 'Ex4'
f = os.popen('ls ~/DIR')
for line in f.readlines():
labels = line.strip()
f.close()
fracs = [15,30,45, 10]
explode=(0, 0.05, 0, 0)
pie(fracs, explode=explode, labels=labels, autopct='%1.1f%%', shadow=True)
title('Example', bbox={'facecolor':'0.8', 'pad':5})
show()
Thanks in advance for any pointers.
|
|
From: Friedrich R. <fri...@gm...> - 2011-11-12 14:23:48
|
To give the valuable information in the beginning: It appears it
cannot handle /Library/Fonts/NISC18030.ttf. It tries to load it via
ft2font.FT2Font() but that gives the Bus error. The ttf file dates to
28 Jan 2010. It is 7108232 bytes large. I don't know why it cannot
be loaded.
Until it had to recreate the fontcache, it never tried to load that.
It appears to me I used matplotlib since before that file appeared, or
at least matplotlib never tried to load it, or succeeded before in
loading it. The "first bad" commit mentioned in the last email(s) was
that one introducing a mechanism to throw the fontcache away if the
matplotlib version number does not match the version number stored in
the fontcache.
2011/11/12 Friedrich Romstedt <fri...@gm...>:
> 2011/11/11 Michael Droettboom <md...@st...>:
>> Very odd. Given there's no C++ changes here, I'm very surprised. Shooting
>> in the dark here: does deleting ~/.matplotlib/fontList.cache help at all?
I guess it might have to do with it: Removing the font cache might
have made the "good" commit 8c200dab4680efd5201 fail. Or rather
keeping the old font cache might have made the "good" commit not fail
in the beginning. Whatever the causal relation is, I will try to
investigate playing with the existence of the font cache.
I want to verify that the existence of the fontcache file influences
the test result.
-== Trying to verify the influcence of the fontcache file ==-
> I could not believe this and checked out the good commit once more,
> and this one .... fails now too ...
Verifying that there's no further magic, after a clean reboot (you
never know, and I went asleep), I'm trying both commits again, without
the font cache in action:
"good" 8c200dab4680efd5201: Bus error.
"bad" af9954d46e5d: Bus error.
So everything like yesterday evening, without the font cache.
Putting the font cache back into action now (from the moved file).
Keeping the moved file for reference (i.e., copying it).
"good" 8c200dab4680efd5201: Succeeding.
"bad" af9954d46e5d: Bus error.
So the existence of the font cache file makes the apparently "good"
commit succeeding, althought it probably shouldn't succeed. It is a
pity that it's not vice versa: That the existence of the font cache
file would make the "bad" commit fail, s.t. it (and the current
matplotlib) would succeed without it.
-== Bisecting again, this time without font cache file ==-
Removing the font cache file again (keeping the copy).
-= Trying to find some good commit in the past =-
Trying 1982fba643 (one from 2009): Bus error. This commit's test run
differs from the previous Bus errors by the following additional lines
from python2.6 -v:
# /Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/commands.pyc
matches /Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/commands.py
import commands # precompiled from
/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/commands.pyc
This happens directly after importing ft2font.so.
Nevertheless it fails, so going further back to past ...
Trying the v0.99.0rc1 ac387d18b: Bus error.
This cannot be! It is a commit back from 2009, and I used matplotlib that time!
Still keeping trying to find a commit not exhibiting the Bus error ...
-== The first commit from 2009 ==-
Trying the first from 2009 1dcaee87fc: Bus error.
I grep'ed for "import .*commands" in the lib/ folder, and found that
it is only used by font_manager.py, and in that file on non-win32
platforms only the body of the get_fontconfig_fonts imports it. I
will augment that function body with prints to track it down. It
appears it is the fontmanager that crashes.
Probably it issues some commands that makes Python crash, and when the
fontcache existed and was not versionchecked (before the former "bad"
commit), it was simply loaded. Now it tried to rebuild it and fails
in that. It was running the time I used it because I also had a
working font cache that time maybe.
For some reason the log output did not appear in the test. Running
the test manually shows the log output. What? Apparently it is
missing because of some buffering issue. If I pass the output through
a pipe, like when logging, apparently Python switches buffering.
It might well be that the buffering truncates the whole -v output.
Apparently the -v output goes to sys.stderr, and the sys.stdout is
buffered when piping.
Patching sys.stderr: ``python2.6 -v -c "import sys; sys.stderr =
open('x.txt', 'w'); import matplotlib.figure"``. The -v output up to
the Python 2.6.5 statement goes to stdout, after that it goes to
stderr apparently. The output to x.txt is truncated in the middle of
a sentence:
# /Library/Frameworks/Python.framework/Versions/2.6/lib/python
and does not contain the ``commands`` import log. Turning buffering off:
python2.6 -v -c "import sys; sys.stderr = open('x.txt', 'w', 0);
import matplotlib.figure"
it ends again at the ``commands`` import.
It is noteworthy that the function augmented by the logging statements
exits cleanly. The function is called in whole matplotlib only once,
in font_manager.py, in findSystemFonts(). There find SystemFonts()
loops over the return value, which is {}, so no looping at all.
The crash appears in FontManager.__init__() somewhere between loading
the ttffiles and loading the afmfiles.
The crash appears in createFontList().
Setting matplotlib's ``matplotlib.verbose`` to level 'debug_annoying'
via the cmdline script yields that the bus occures after the following
last log message:
createFontDict: /Library/Fonts/NISC18030.ttf
Augmenting the createFontList() function by print statements yields this:
createFontDict: /Library/Fonts/Arial Narrow.ttf
Friedrich: ft2font.FT2Font(/Library/Fonts/Arial Narrow.ttf) ...
Friedrich: ft2font.FT2Font(/Library/Fonts/Arial Narrow.ttf) succeeded.
createFontDict: /Library/Fonts/NISC18030.ttf
Friedrich: ft2font.FT2Font(/Library/Fonts/NISC18030.ttf) ...
./runtest.sh: line 1: 7150 Bus error python2.6 -v -u -c
"import matplotlib; matplotlib.verbose.set_level('debug-annoying');
import matplotlib.figure" 2>&1
So it appears it cannot handle /Library/Fonts/NISC18030.ttf.
Any ideas?
Friedrich
|
|
From: Paul I. <piv...@gm...> - 2011-11-12 01:03:35
|
On Fri, Nov 11, 2011 at 12:40 PM, magurling <mag...@gm...> wrote: > I updated matplotlib to 1.1.0; both methods work now. Thanks for letting us know, and glad it works for you now - that information is useful for those who search for similar error messages in the future and find this thread. > I would say "Thanks Paul and Francesco" but I just read the mailing list etiquette. you're very welcome - though I'm not sure what etiquette you're referring to? I think it's useful for poster who ask for help to report back when they've overcome whatever problem they were having along with how they resolved it, so that others can follow in their footsteps later. best, -- Paul Ivanov 314 address only used for lists, off-list direct email at: http://pirsquared.org | GPG/PGP key id: 0x0F3E28F7 |
|
From: Friedrich R. <fri...@gm...> - 2011-11-12 00:06:14
|
2011/11/11 Michael Droettboom <md...@st...>: > Very odd. Given there's no C++ changes here, I'm very surprised. Shooting > in the dark here: does deleting ~/.matplotlib/fontList.cache help at all? Nope :-( I'm pretty much surprised too. I wonder why noone else has this issue? I replaced the font_manager.py with that of the good commit and it still fails. I reverted than back to the bad font_manager.py, and replaced the mathtext.py with that of the good one. And it fails .... I then replaced both font_manager.py as well as mathtext.py with the good ones, and it .... still fails! I could not believe this and checked out the good commit once more, and this one .... fails now too ... I have no idea what's going on here. To me this looks like black magic. I didn't confuse the commits, I have logs where the good commit succeeds. Are there any other caches involved in matplotlib? I don't know of any. I cleaned the build/ directory properly. A also nuked the site-packages/matplotlib in between. The build+run logs of the "good" commit before and after the "magic trigger" are diff'ed exactly the same with the exception that in one python2.6 -v continues with lines.py and in the other not. :-( Friedrich |
|
From: Michael D. <md...@st...> - 2011-11-11 22:41:45
|
Very odd. Given there's no C++ changes here, I'm very surprised. Shooting in the dark here: does deleting ~/.matplotlib/fontList.cache help at all? Mike On 11/11/2011 05:34 PM, Friedrich Romstedt wrote: > 2011/11/11 Michael Droettboom<md...@st...>: >> Running bisect in this way, did you arrive at a more conclusive >> determination about which commit may have introduced the problem? > Yes, do you know Final Fantasy? "You gonna loose it ... Tracking ... > Tracking ... Found it." af9954d46e. > > I don't know which part of that commit breaks it, maybe you can have a > look? It's a commit by you. Maybe it's just the evil font cache. :-) > > It's not the ft2font, notably, this was apparently imported properly; > it's just some initialisation code of matplotlib that seems to fail > while importing matplotlib.figure. > > I verified clearly; the commit mentioned fails, and its predecessor succeeds. > > I did patch the _png.cpp to make it work; it didn't comply with > libpng-1.4 that time. > > I can upload the branches for testing the two commits to my repo. > > So far, > Friedrich |
|
From: Friedrich R. <fri...@gm...> - 2011-11-11 22:34:42
|
2011/11/11 Michael Droettboom <md...@st...>: > Running bisect in this way, did you arrive at a more conclusive > determination about which commit may have introduced the problem? Yes, do you know Final Fantasy? "You gonna loose it ... Tracking ... Tracking ... Found it." af9954d46e. I don't know which part of that commit breaks it, maybe you can have a look? It's a commit by you. Maybe it's just the evil font cache. :-) It's not the ft2font, notably, this was apparently imported properly; it's just some initialisation code of matplotlib that seems to fail while importing matplotlib.figure. I verified clearly; the commit mentioned fails, and its predecessor succeeds. I did patch the _png.cpp to make it work; it didn't comply with libpng-1.4 that time. I can upload the branches for testing the two commits to my repo. So far, Friedrich |
|
From: Michael D. <md...@st...> - 2011-11-11 21:02:06
|
Have you tried removing the build directory and install directories to
force a full rebuild? It sounds like the build or install got stuck at
some point. I've never seen it not copy *.py files in a package before.
Mike
On 11/11/2011 03:12 PM, David Welch wrote:
> Update: test folders are in the build directory, they are just not
> being copied during build.
>
> *bump*
>
> On 11/10/11, David Welch<dav...@gm...> wrote:
>> Hello,
>>
>> I am installing matplotlib on Snow Leopard 10.6. I downloaded v1.1.0 from
>> the sourceforge site and installed in this manner:
>>
>> ############################
>>
>> $ export CFLAGS="-arch i386 -arch x86_64 -I/usr/X11/include
>> -I/usr/X11/include/freetype2 -isysroot /Developer/SDKs/MacOSX10.6.sdk"
>> $ export LDFLAGS="-Wall -undefined dynamic_lookup -bundle -arch i386 -arch
>> x86_64 -L/usr/X11/lib -syslibroot,/Developer/SDKs/MacOSX10.6.sdk"
>> $ export FFLAGS="-arch i386 -arch x86_64"
>> $ tar -xf matplotlib-1.1.0.tar.gz
>> $ cd matplotlib-1.1.0
>> $ python setup.py build
>> $ python setup.py install
>> $
>> $ python
>>>>> import matplotlib as mpl
>>>>> mpl.test("1")
>> ...........EEEEEEEEEEE
>> ======================================================================
>> ERROR: Failure: AttributeError ('module' object has no attribute
>> 'test_backend_svg')
>> ----------------------------------------------------------------------
>> Traceback (most recent call last):
>> File "/private/tmp/test/lib/python2.6/site-packages/nose/loader.py", line
>> 379, in loadTestsFromName
>> module = resolve_name(addr.module)
>> File "/private/tmp/test/lib/python2.6/site-packages/nose/util.py", line
>> 331, in resolve_name
>> obj = getattr(obj, part)
>> AttributeError: 'module' object has no attribute 'test_backend_svg'
>>
>> (etc.)
>> #############################
>>
>> The failure is for all modules in matplotlib.tests except for test_agg,
>> test_cbook, test_mlab, and test_transform.
>>
>> Is the sourceforge achive incomplete?
>>
>> -Dave
>>
>> --
>> David Welch
>> dav...@gm...
>>
>>
>>
>>
>
|
|
From: magurling <mag...@gm...> - 2011-11-11 20:40:33
|
I updated matplotlib to 1.1.0; both methods work now. I would say "Thanks Paul and Francesco" but I just read the mailing list etiquette. -- View this message in context: http://old.nabble.com/legend-border%2C-frameon-keyword-tp32807933p32828355.html Sent from the matplotlib - users mailing list archive at Nabble.com. |
|
From: David W. <dav...@gm...> - 2011-11-11 20:12:20
|
Update: test folders are in the build directory, they are just not
being copied during build.
*bump*
On 11/10/11, David Welch <dav...@gm...> wrote:
> Hello,
>
> I am installing matplotlib on Snow Leopard 10.6. I downloaded v1.1.0 from
> the sourceforge site and installed in this manner:
>
> ############################
>
> $ export CFLAGS="-arch i386 -arch x86_64 -I/usr/X11/include
> -I/usr/X11/include/freetype2 -isysroot /Developer/SDKs/MacOSX10.6.sdk"
> $ export LDFLAGS="-Wall -undefined dynamic_lookup -bundle -arch i386 -arch
> x86_64 -L/usr/X11/lib -syslibroot,/Developer/SDKs/MacOSX10.6.sdk"
> $ export FFLAGS="-arch i386 -arch x86_64"
> $ tar -xf matplotlib-1.1.0.tar.gz
> $ cd matplotlib-1.1.0
> $ python setup.py build
> $ python setup.py install
> $
> $ python
>>>> import matplotlib as mpl
>>>> mpl.test("1")
> ...........EEEEEEEEEEE
> ======================================================================
> ERROR: Failure: AttributeError ('module' object has no attribute
> 'test_backend_svg')
> ----------------------------------------------------------------------
> Traceback (most recent call last):
> File "/private/tmp/test/lib/python2.6/site-packages/nose/loader.py", line
> 379, in loadTestsFromName
> module = resolve_name(addr.module)
> File "/private/tmp/test/lib/python2.6/site-packages/nose/util.py", line
> 331, in resolve_name
> obj = getattr(obj, part)
> AttributeError: 'module' object has no attribute 'test_backend_svg'
>
> (etc.)
> #############################
>
> The failure is for all modules in matplotlib.tests except for test_agg,
> test_cbook, test_mlab, and test_transform.
>
> Is the sourceforge achive incomplete?
>
> -Dave
>
> --
> David Welch
> dav...@gm...
>
>
>
>
--
Dept. of Psychiatry
Dept. of Biomedical Engineering
University of Iowa
|
|
From: Paul I. <piv...@gm...> - 2011-11-11 19:44:44
|
>> On Fri, Nov 11, 2011 at 8:53 AM, Paul Ivanov <piv...@gm...> wrote: >>> might you be on an old matplotlib.__version__? On Fri, Nov 11, 2011 at 11:18 AM, magurling <mag...@gm...> wrote: > This is probably it. I installed by "apt-get install" but keep getting > version 0.99.3 installed. > I need to install a more recent version before I trouble anyone further. > Which version are you using Paul? 1.2.0dev from Git :), but you will be fine with the latest stable (v1.1.0) see http://matplotlib.sourceforge.net/users/installing.html#installing-from-source best, -- Paul Ivanov 314 address only used for lists, off-list direct email at: http://pirsquared.org | GPG/PGP key id: 0x0F3E28F7 |
|
From: Rahul M. <aer...@gm...> - 2011-11-11 19:44:39
|
Hi, Is there such a thing "Python / Matplotlib Central Exchange" similar to the "File Exchange on Matlab Central" ( http://www.mathworks.com/matlabcentral/fileexchange/ ) that anyone is aware of which allows one to search for user-contributed functions / packages. Many Thanks! |
|
From: magurling <mag...@gm...> - 2011-11-11 19:18:11
|
This is probably it. I installed by "apt-get install" but keep getting version 0.99.3 installed. I need to install a more recent version before I trouble anyone further. Which version are you using Paul? Paul Ivanov wrote: > > Oops, didn't reply to list last time: > > On Fri, Nov 11, 2011 at 8:53 AM, Paul Ivanov <piv...@gm...> wrote: >> On Tue, Nov 8, 2011 at 4:49 PM, magurling <mag...@gm...> wrote: >>> >>> I want a legend without the black border. I've tried a few things that >>> have >>> been suggested on this forum and elsewhere to no avail. According to >>> what >>> I've seen, it should be as simple as: >> >> Your example works as intended here. >> >> >>> It must be something simple that I am doing wrong. Any ideas? >> >> might you be on an old matplotlib.__version__? > > > best, > -- > Paul Ivanov > 314 address only used for lists, off-list direct email at: > http://pirsquared.org | GPG/PGP key id: 0x0F3E28F7 > > ------------------------------------------------------------------------------ > RSA(R) Conference 2012 > Save $700 by Nov 18 > Register now > http://p.sf.net/sfu/rsa-sfdev2dev1 > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > -- View this message in context: http://old.nabble.com/legend-border%2C-frameon-keyword-tp32807933p32827837.html Sent from the matplotlib - users mailing list archive at Nabble.com. |
|
From: magurling <mag...@gm...> - 2011-11-11 19:15:13
|
Thanks Francesco, but I've also tried to use the "draw_frame(False)" method
with no luck.
montefra wrote:
>
> Hi,
>
> I usually do like this
>
> l = ax.legend( (rects1[0], rects2[0]), ('set1', 'set2'))
> l.draw_frame(False)
>
> Cheers,
>
> Francesco
>
> 2011/11/9 magurling <mag...@gm...>:
>>
>> I want a legend without the black border. I've tried a few things that
>> have
>> been suggested on this forum and elsewhere to no avail. According to what
>> I've seen, it should be as simple as:
>>
>> import matplotlib.pyplot as plt
>> import numpy as np
>>
>> N = 5
>> Means1 = (20, 35, 30, 35, 27)
>> Means2 = (25, 32, 34, 20, 25)
>>
>> ind = np.arange(N) # the x locations for the groups
>> width = 0.20 # the width of the bars
>>
>> fig = plt.figure()
>> ax = fig.add_subplot(111)
>> rects1 = ax.bar(ind, Means1, width, color='k')
>> rects2 = ax.bar(ind+width, Means2, width, color='w')
>>
>> ax.legend( (rects1[0], rects2[0]), ('set1', 'set2'), frameon=False )
>>
>> plt.show()
>>
>>
>> It all works except for "frameon=False"
>>
>> I get this:
>>
>> /usr/lib/pymodules/python2.7/matplotlib/axes.pyc in legend(self, *args,
>> **kwargs)
>> 4042
>> 4043 handles = cbook.flatten(handles)
>> -> 4044 self.legend_ = mlegend.Legend(self, handles, labels,
>> **kwargs)
>> 4045 return self.legend_
>> 4046
>>
>> TypeError: __init__() got an unexpected keyword argument 'frameon'
>>
>> I've also checked my matplotlibrc under the "Legend" section and I don't
>> see
>> a "legend.frameon" line.
>>
>> It must be something simple that I am doing wrong. Any ideas?
>> --
>> View this message in context:
>> http://old.nabble.com/legend-border%2C-frameon-keyword-tp32807933p32807933.html
>> Sent from the matplotlib - users mailing list archive at Nabble.com.
>>
>>
>> ------------------------------------------------------------------------------
>> RSA(R) Conference 2012
>> Save $700 by Nov 18
>> Register now
>> http://p.sf.net/sfu/rsa-sfdev2dev1
>> _______________________________________________
>> Matplotlib-users mailing list
>> Mat...@li...
>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>>
>
> ------------------------------------------------------------------------------
> RSA(R) Conference 2012
> Save $700 by Nov 18
> Register now
> http://p.sf.net/sfu/rsa-sfdev2dev1
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
>
--
View this message in context: http://old.nabble.com/legend-border%2C-frameon-keyword-tp32807933p32827812.html
Sent from the matplotlib - users mailing list archive at Nabble.com.
|
|
From: klo uo <kl...@gm...> - 2011-11-11 17:42:02
|
Thanks Johann,
that is exactly what I asked for
I knew that matplotlib can do GUI tricks but I didn't felt skilled to go
there. Seeing you code it seems easy now, but it's always like that after
you see the solution :D
Cheers
On Fri, Nov 11, 2011 at 6:05 PM, johanngoetz <jg...@uc...> wrote:
>
> I have this script that uses the matplotlib Slider object to control the
> colormap of a histogram. This could be very close to what you want. Here is
> the script:
>
> ### begin colormap_slider.py #################################
> import math, copy
> import numpy
> from matplotlib import pyplot, colors, cm
> from matplotlib.widgets import Slider
>
> def cmap_powerlaw_adjust(cmap, a):
> '''
> returns a new colormap based on the one given
> but adjusted via power-law:
>
> newcmap = oldcmap**a
> '''
> if a < 0.:
> return cmap
> cdict = copy.copy(cmap._segmentdata)
> fn = lambda x : (x[0]**a, x[1], x[2])
> for key in ('red','green','blue'):
> cdict[key] = map(fn, cdict[key])
> cdict[key].sort()
> assert (cdict[key][0]<0 or cdict[key][-1]>1), \
> "Resulting indices extend out of the [0, 1] segment."
> return colors.LinearSegmentedColormap('colormap',cdict,1024)
>
> def cmap_center_adjust(cmap, center_ratio):
> '''
> returns a new colormap based on the one given
> but adjusted so that the old center point higher
> (>0.5) or lower (<0.5)
> '''
> if not (0. < center_ratio) & (center_ratio < 1.):
> return cmap
> a = math.log(center_ratio) / math.log(0.5)
> return cmap_powerlaw_adjust(cmap, a)
>
> def cmap_center_point_adjust(cmap, range, center):
> '''
> converts center to a ratio between 0 and 1 of the
> range given and calls cmap_center_adjust(). returns
> a new adjusted colormap accordingly
> '''
> if not ((range[0] < center) and (center < range[1])):
> return cmap
> return cmap_center_adjust(cmap,
> abs(center - range[0]) / abs(range[1] - range[0]))
>
>
> if __name__ == '__main__':
> ### create some 2D histogram-type data
> def func3(x,y):
> return (1- x/2 + x**5 + y**3)*numpy.exp(-x**2-y**2)
> x = numpy.linspace(-3.0, 3.0, 60)
> y = numpy.linspace(-3.0, 3.0, 60)
> X,Y = numpy.meshgrid(x, y)
> Z = func3(X, Y)
> extent = [x[0],x[-1],y[0],y[-1]]
>
>
> plotkwargs = {
> 'extent' : extent,
> 'origin' : 'lower',
> 'interpolation' : 'nearest',
> 'aspect' : 'auto'}
>
> ### interactively adjustable with a slider
> fig = pyplot.figure(figsize=(6,4))
> fig.subplots_adjust(top=0.8)
> ax = fig.add_subplot(1,1,1)
> cmap = cm.seismic
> plt = ax.imshow(Z, cmap=cmap, **plotkwargs)
> cb = fig.colorbar(plt, ax=ax)
>
> axcmap = fig.add_axes([0.1, 0.85, 0.8, 0.05], axisbg='white')
> scmap = Slider(axcmap, '', 0.0, 1.0, valinit=0.5)
>
> def update(val):
> cmapcenter = scmap.val
> plt.set_cmap(cmap_center_adjust(cmap, cmapcenter))
> scmap.on_changed(update)
>
>
>
> pyplot.show()
> ### end colormap_slider.py ###################################
> --
> View this message in context:
> http://old.nabble.com/How-to-shift-colormap--tp32792283p32827012.html
> Sent from the matplotlib - users mailing list archive at Nabble.com.
>
>
>
> ------------------------------------------------------------------------------
> RSA(R) Conference 2012
> Save $700 by Nov 18
> Register now
> http://p.sf.net/sfu/rsa-sfdev2dev1
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
|
|
From: johanngoetz <jg...@uc...> - 2011-11-11 17:05:53
|
I have this script that uses the matplotlib Slider object to control the
colormap of a histogram. This could be very close to what you want. Here is
the script:
### begin colormap_slider.py #################################
import math, copy
import numpy
from matplotlib import pyplot, colors, cm
from matplotlib.widgets import Slider
def cmap_powerlaw_adjust(cmap, a):
'''
returns a new colormap based on the one given
but adjusted via power-law:
newcmap = oldcmap**a
'''
if a < 0.:
return cmap
cdict = copy.copy(cmap._segmentdata)
fn = lambda x : (x[0]**a, x[1], x[2])
for key in ('red','green','blue'):
cdict[key] = map(fn, cdict[key])
cdict[key].sort()
assert (cdict[key][0]<0 or cdict[key][-1]>1), \
"Resulting indices extend out of the [0, 1] segment."
return colors.LinearSegmentedColormap('colormap',cdict,1024)
def cmap_center_adjust(cmap, center_ratio):
'''
returns a new colormap based on the one given
but adjusted so that the old center point higher
(>0.5) or lower (<0.5)
'''
if not (0. < center_ratio) & (center_ratio < 1.):
return cmap
a = math.log(center_ratio) / math.log(0.5)
return cmap_powerlaw_adjust(cmap, a)
def cmap_center_point_adjust(cmap, range, center):
'''
converts center to a ratio between 0 and 1 of the
range given and calls cmap_center_adjust(). returns
a new adjusted colormap accordingly
'''
if not ((range[0] < center) and (center < range[1])):
return cmap
return cmap_center_adjust(cmap,
abs(center - range[0]) / abs(range[1] - range[0]))
if __name__ == '__main__':
### create some 2D histogram-type data
def func3(x,y):
return (1- x/2 + x**5 + y**3)*numpy.exp(-x**2-y**2)
x = numpy.linspace(-3.0, 3.0, 60)
y = numpy.linspace(-3.0, 3.0, 60)
X,Y = numpy.meshgrid(x, y)
Z = func3(X, Y)
extent = [x[0],x[-1],y[0],y[-1]]
plotkwargs = {
'extent' : extent,
'origin' : 'lower',
'interpolation' : 'nearest',
'aspect' : 'auto'}
### interactively adjustable with a slider
fig = pyplot.figure(figsize=(6,4))
fig.subplots_adjust(top=0.8)
ax = fig.add_subplot(1,1,1)
cmap = cm.seismic
plt = ax.imshow(Z, cmap=cmap, **plotkwargs)
cb = fig.colorbar(plt, ax=ax)
axcmap = fig.add_axes([0.1, 0.85, 0.8, 0.05], axisbg='white')
scmap = Slider(axcmap, '', 0.0, 1.0, valinit=0.5)
def update(val):
cmapcenter = scmap.val
plt.set_cmap(cmap_center_adjust(cmap, cmapcenter))
scmap.on_changed(update)
pyplot.show()
### end colormap_slider.py ###################################
--
View this message in context: http://old.nabble.com/How-to-shift-colormap--tp32792283p32827012.html
Sent from the matplotlib - users mailing list archive at Nabble.com.
|
|
From: Paul I. <piv...@gm...> - 2011-11-11 17:05:40
|
Oops, didn't reply to list last time: On Fri, Nov 11, 2011 at 8:53 AM, Paul Ivanov <piv...@gm...> wrote: > On Tue, Nov 8, 2011 at 4:49 PM, magurling <mag...@gm...> wrote: >> >> I want a legend without the black border. I've tried a few things that have >> been suggested on this forum and elsewhere to no avail. According to what >> I've seen, it should be as simple as: > > Your example works as intended here. > > >> It must be something simple that I am doing wrong. Any ideas? > > might you be on an old matplotlib.__version__? best, -- Paul Ivanov 314 address only used for lists, off-list direct email at: http://pirsquared.org | GPG/PGP key id: 0x0F3E28F7 |
|
From: Paul I. <piv...@gm...> - 2011-11-11 17:04:20
|
On Wed, Nov 9, 2011 at 7:37 AM, Brent Pedersen <bpe...@gm...> wrote: > Hi, > I have an image like this: > https://docs.google.com/open?id=0B7eMlcFeoB_rMTU1OTU0NmMtMzM3MC00YWI3LWFlNTYtNzg0MTM4MWI3OWMz > > with an axes inside of another. I'd like to set the background behind > the labels of the inner figure. > I've tried set_frame_on on the axis, set_frameon on the figure, > axisbg_color, and so on. Would it be sufficient to set the background color behind the text labels? If 'ax' is your inner axes, do: ax.yaxis.label.set_backgroundcolor('red') ax.xaxis.label.set_backgroundcolor('red') best, -- Paul Ivanov 314 address only used for lists, off-list direct email at: http://pirsquared.org | GPG/PGP key id: 0x0F3E28F7 |
|
From: Francesco M. <fra...@go...> - 2011-11-11 16:42:01
|
Hi,
I usually do like this
l = ax.legend( (rects1[0], rects2[0]), ('set1', 'set2'))
l.draw_frame(False)
Cheers,
Francesco
2011/11/9 magurling <mag...@gm...>:
>
> I want a legend without the black border. I've tried a few things that have
> been suggested on this forum and elsewhere to no avail. According to what
> I've seen, it should be as simple as:
>
> import matplotlib.pyplot as plt
> import numpy as np
>
> N = 5
> Means1 = (20, 35, 30, 35, 27)
> Means2 = (25, 32, 34, 20, 25)
>
> ind = np.arange(N) # the x locations for the groups
> width = 0.20 # the width of the bars
>
> fig = plt.figure()
> ax = fig.add_subplot(111)
> rects1 = ax.bar(ind, Means1, width, color='k')
> rects2 = ax.bar(ind+width, Means2, width, color='w')
>
> ax.legend( (rects1[0], rects2[0]), ('set1', 'set2'), frameon=False )
>
> plt.show()
>
>
> It all works except for "frameon=False"
>
> I get this:
>
> /usr/lib/pymodules/python2.7/matplotlib/axes.pyc in legend(self, *args,
> **kwargs)
> 4042
> 4043 handles = cbook.flatten(handles)
> -> 4044 self.legend_ = mlegend.Legend(self, handles, labels,
> **kwargs)
> 4045 return self.legend_
> 4046
>
> TypeError: __init__() got an unexpected keyword argument 'frameon'
>
> I've also checked my matplotlibrc under the "Legend" section and I don't see
> a "legend.frameon" line.
>
> It must be something simple that I am doing wrong. Any ideas?
> --
> View this message in context: http://old.nabble.com/legend-border%2C-frameon-keyword-tp32807933p32807933.html
> Sent from the matplotlib - users mailing list archive at Nabble.com.
>
>
> ------------------------------------------------------------------------------
> RSA(R) Conference 2012
> Save $700 by Nov 18
> Register now
> http://p.sf.net/sfu/rsa-sfdev2dev1
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
|
|
From: Bedartha G. <go...@pi...> - 2011-11-11 16:41:33
|
Hi,
>>
As a test, try to set your backend to either 'cocoaagg' or 'macosx' like so:
import matplotlib as mpl
mpl.use('cocoaagg')
There have been issues with TkAgg on macs. I have personally not had any success with it (even with ActiveState's Tcl).
>>
>>
> tried doing the above but this required me to install something called PyObjC:
>>> The CococaAgg backend required PyObjC to be installed!
> (currently testing v1.3.7)
>
> when I tried to easy_install PyObjC it gave me the following error:
>
> Unknown distribution option: 'use_2to3'
> warnings.warn(msg)
> error: Could not find required distribution pyobjc-core
>>
I am sorry for this but I easy_install-ed pyobjc-core, and then easy_install-ed PyObjC.
Now the pyplot.show() command works.
My matplotlib is now up and working!
Thank you, (esp ben.root)
Bedartha
|
|
From: Bedartha G. <go...@pi...> - 2011-11-11 15:43:08
|
Sorry it seems that the group as a limit to mail size so I am resending the mail below without the attachment.
Begin forwarded message:
> From: Bedartha Goswami <go...@pi...>
> Subject: Re: [Matplotlib-users] Matplotlib "show()" error Mac OS X Lion
> Date: November 11, 2011 4:36:11 PM GMT+01:00
> To: mat...@li...
>
> Hi,
> ---
> As a test, try to set your backend to either 'cocoaagg' or 'macosx' like so:
>
> import matplotlib as mpl
> mpl.use('cocoaagg')
> ---
>
> I tried doing the above but this required me to install something called PyObjC:
>>> The CococaAgg backend required PyObjC to be installed!
> (currently testing v1.3.7)
>
> when I tried to easy_install PyObjC it gave me the following error:
>
> Unknown distribution option: 'use_2to3'
> warnings.warn(msg)
> error: Could not find required distribution pyobjc-core
>
> ----
>> I suspect you are trying to install matplotlib on the 64-bit Python
> instead of the 32-bit python for which it was built
> ----
> Well, I do use the python-32 bit version for all the work and in fact, the bumpy and scipy have been built for the python-32 bit. and i am having trouble with matplotlib on this - in fact, none of the bumpy, scipy, and python etc modules even load on the 64-bit version.
>
> ----
> Download and unpack the matplotlib source.
> Edit setupext.py and change the entry for darwin to include those two
> directories: /usr/X11 and /usr/lib.
> ----
> I did try this way as well, but the build does not manage to detect the libpng15 library in the X11 directory - somehow it uses "lpng15" marker and does not end up finding it when it is right there under X11's nose. I am attaching the detailed shell text for this step with this mail.
>
> Regards,
> Bedartha
>
|
|
From: Bedartha G. <go...@pi...> - 2011-11-11 15:37:28
|
Hi,
---
As a test, try to set your backend to either 'cocoaagg' or 'macosx' like so:
import matplotlib as mpl
mpl.use('cocoaagg')
---
I tried doing the above but this required me to install something called PyObjC:
>>The CococaAgg backend required PyObjC to be installed!
(currently testing v1.3.7)
when I tried to easy_install PyObjC it gave me the following error:
Unknown distribution option: 'use_2to3'
warnings.warn(msg)
error: Could not find required distribution pyobjc-core
----
>I suspect you are trying to install matplotlib on the 64-bit Python
instead of the 32-bit python for which it was built
----
Well, I do use the python-32 bit version for all the work and in fact, the bumpy and scipy have been built for the python-32 bit. and i am having trouble with matplotlib on this - in fact, none of the bumpy, scipy, and python etc modules even load on the 64-bit version.
----
Download and unpack the matplotlib source.
Edit setupext.py and change the entry for darwin to include those two
directories: /usr/X11 and /usr/lib.
----
I did try this way as well, but the build does not manage to detect the libpng15 library in the X11 directory - somehow it uses "lpng15" marker and does not end up finding it when it is right there under X11's nose. I am attaching the detailed shell text for this step with this mail.
Regards,
Bedartha
|
|
From: klo uo <kl...@gm...> - 2011-11-11 15:21:39
|
Or are matplotlib colormaps compatible with any other programs? On Fri, Nov 11, 2011 at 4:19 PM, klo uo <kl...@gm...> wrote: > > So I want to ask this question differently: Is there some tool (Inkscape, > CorelDraw, Photoshop, ... anything) that would let me use GUI with some > sliders so that I can try adjust matplotlib colormap? > |
|
From: klo uo <kl...@gm...> - 2011-11-11 15:19:27
|
I learned some more about matplotlib colormaps from here: http://www.scipy.org/Cookbook/Matplotlib/Show_colormaps and tried to grasp cmap creation workflow. Here is GMT_haxby: _GMT_haxby_data = { 'blue': [ (0.0, 0.474509805441, 0.474509805441), (0.0322580635548, 0.588235318661, 0.588235318661), (0.0645161271095, 0.686274528503, 0.686274528503), (0.0967741906643, 0.784313738346, 0.784313738346), (0.129032254219, 0.831372559071, 0.831372559071), (0.161290317774, 0.878431379795, 0.878431379795), (0.193548381329, 0.941176474094, 0.941176474094), (0.225806444883, 0.972549021244, 0.972549021244), (0.258064508438, 1.0, 1.0), (0.290322571993, 1.0, 1.0), (0.322580635548, 1.0, 1.0), (0.354838699102, 0.941176474094, 0.941176474094), (0.387096762657, 0.882352948189, 0.882352948189), (0.419354826212, 0.784313738346, 0.784313738346), (0.451612889767, 0.68235296011, 0.68235296011), (0.483870953321, 0.658823549747, 0.658823549747), (0.516129016876, 0.635294139385, 0.635294139385), (0.548387110233, 0.552941203117, 0.552941203117), (0.580645143986, 0.474509805441, 0.474509805441), (0.612903237343, 0.407843142748, 0.407843142748), (0.645161271095, 0.341176480055, 0.341176480055), (0.677419364452, 0.270588248968, 0.270588248968), (0.709677398205, 0.29411765933, 0.29411765933), (0.741935491562, 0.305882364511, 0.305882364511), (0.774193525314, 0.352941185236, 0.352941185236), (0.806451618671, 0.486274510622, 0.486274510622), (0.838709652424, 0.61960786581, 0.61960786581), (0.870967745781, 0.68235296011, 0.68235296011), (0.903225779533, 0.768627464771, 0.768627464771), (0.93548387289, 0.843137264252, 0.843137264252), (0.967741906643, 0.921568632126, 0.921568632126), (1.0, 1.0, 1.0)], 'green': [ (0.0, 0.0, 0.0), (0.0322580635548, 0.0, 0.0), (0.0645161271095, 0.0196078438312, 0.0196078438312), (0.0967741906643, 0.0392156876624, 0.0392156876624), (0.129032254219, 0.0980392172933, 0.0980392172933), (0.161290317774, 0.156862750649, 0.156862750649), (0.193548381329, 0.40000000596, 0.40000000596), (0.225806444883, 0.505882382393, 0.505882382393), (0.258064508438, 0.686274528503, 0.686274528503), (0.290322571993, 0.745098054409, 0.745098054409), (0.322580635548, 0.792156875134, 0.792156875134), (0.354838699102, 0.882352948189, 0.882352948189), (0.387096762657, 0.921568632126, 0.921568632126), (0.419354826212, 0.921568632126, 0.921568632126), (0.451612889767, 0.92549020052, 0.92549020052), (0.483870953321, 0.960784316063, 0.960784316063), (0.516129016876, 1.0, 1.0), (0.548387110233, 0.960784316063, 0.960784316063), (0.580645143986, 0.92549020052, 0.92549020052), (0.612903237343, 0.843137264252, 0.843137264252), (0.645161271095, 0.741176486015, 0.741176486015), (0.677419364452, 0.627451002598, 0.627451002598), (0.709677398205, 0.458823531866, 0.458823531866), (0.741935491562, 0.313725501299, 0.313725501299), (0.774193525314, 0.352941185236, 0.352941185236), (0.806451618671, 0.486274510622, 0.486274510622), (0.838709652424, 0.61960786581, 0.61960786581), (0.870967745781, 0.701960802078, 0.701960802078), (0.903225779533, 0.768627464771, 0.768627464771), (0.93548387289, 0.843137264252, 0.843137264252), (0.967741906643, 0.921568632126, 0.921568632126), (1.0, 1.0, 1.0)], 'red': [ (0.0, 0.0392156876624, 0.0392156876624), (0.0322580635548, 0.156862750649, 0.156862750649), (0.0645161271095, 0.0784313753247, 0.0784313753247), (0.0967741906643, 0.0, 0.0), (0.129032254219, 0.0, 0.0), (0.161290317774, 0.0, 0.0), (0.193548381329, 0.101960785687, 0.101960785687), (0.225806444883, 0.0509803928435, 0.0509803928435), (0.258064508438, 0.0980392172933, 0.0980392172933), (0.290322571993, 0.196078434587, 0.196078434587), (0.322580635548, 0.266666680574, 0.266666680574), (0.354838699102, 0.380392163992, 0.380392163992), (0.387096762657, 0.415686279535, 0.415686279535), (0.419354826212, 0.486274510622, 0.486274510622), (0.451612889767, 0.541176497936, 0.541176497936), (0.483870953321, 0.674509823322, 0.674509823322), (0.516129016876, 0.803921580315, 0.803921580315), (0.548387110233, 0.874509811401, 0.874509811401), (0.580645143986, 0.941176474094, 0.941176474094), (0.612903237343, 0.96862745285, 0.96862745285), (0.645161271095, 1.0, 1.0), (0.677419364452, 1.0, 1.0), (0.709677398205, 0.956862747669, 0.956862747669), (0.741935491562, 0.933333337307, 0.933333337307), (0.774193525314, 1.0, 1.0), (0.806451618671, 1.0, 1.0), (0.838709652424, 1.0, 1.0), (0.870967745781, 0.960784316063, 0.960784316063), (0.903225779533, 1.0, 1.0), (0.93548387289, 1.0, 1.0), (0.967741906643, 1.0, 1.0), (1.0, 1.0, 1.0)]} Now imagine tweaking this map by hand, i.e. lower 0 value (~ 2/3 from whole cmap in example) from orange to green-blue without ruining it totally So I want to ask this question differently: Is there some tool (Inkscape, CorelDraw, Photoshop, ... anything) that would let me use GUI with some sliders so that I can try adjust matplotlib colormap? On Sun, Nov 6, 2011 at 9:58 PM, klo uo <kl...@gm...> wrote: > Like in Basemap examples: > http://matplotlib.github.com/basemap/users/examples.html (topographic > image in the middle of page) ground 0 has some yellow/orange color > making seas and oceans coasts in that same, color instead light blue > (as we'd all expect I guess) > > So how to shift this particular colormap (cm.GMT_haxby) up a bit, so > that I get expected colors? > |
|
From: Alejandro W. <ale...@gm...> - 2011-11-11 14:32:30
|
On Thu, Nov 10, 2011 at 11:04 PM, John Ladasky <joh...@sb...> wrote: > But when I started a Python shell, imported, and then printed > matplotlib.__version__, I got 1.0.1. > > Must I explicitly uninstall the older revision somehow? I don't know > how to do this. > Something similar happened to me a few days ago. I followed this instructions http://matplotlib.sourceforge.net/faq/installing_faq.html#how-to-completely-remove-matplotlib to completely remove matplotlib, and then I rebuilt the latest version from source. Alejandro. |