SourceForge logo
SourceForge logo
Menu

matplotlib-users — Discussion related to using matplotlib

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
(16)
2
(16)
3
(5)
4
(4)
5
(4)
6
(10)
7
(33)
8
(11)
9
(20)
10
(7)
11
(8)
12
(18)
13
(27)
14
(21)
15
(15)
16
(10)
17
(12)
18
(3)
19
(12)
20
(12)
21
(14)
22
(32)
23
(15)
24
(20)
25
(12)
26
(32)
27
(29)
28
(17)
29
(25)
30
(12)
31
(5)

Showing results of 458

<< < 1 2 3 4 5 6 .. 19 > >> (Page 4 of 19)
Hmm... surprisingly, I am actually able to reproduce this sort of 
behaviour here. I'll look into it further.
Mike
On 07/27/2010 09:49 AM, Michael Droettboom wrote:
> Of course, we'll prefer to see all of the tests pass...
>
> I'm surprised the two modes of running the tests gives different
> results. Are you sure they are running the same python? Does
>
> python `which nosetests` matplotlib.tests
>
> give you the same result as
>
> nosetests matplotlib.tests
>
> ?
>
> There must be some environmental difference between the two to cause the
> different results.
>
> Mike
>
> On 07/24/2010 05:09 PM, Adam wrote:
> 
>> Hello, I have just updated to v1.0.0 and am trying to run the test
>> suite to make sure everything is ok. There seems to be two different
>> suites and I am not sure which is correct/current:
>>
>> $python -c 'import matplotlib; matplotlib.test()'
>> [...snipped output...]
>> Ran 138 tests in 390.991s
>> OK (KNOWNFAIL=2)
>>
>> $nosetests matplotlib.tests I get:
>> [...snipped output]
>> Ran 144 tests in 380.165s
>> FAILED (errors=4, failures=1)
>>
>> Two of these errors are the known failures from above, and the other
>> two are in "matplotlib.tests.test_text.test_font_styles":
>> ImageComparisonFailure: images not close:
>> /home/adam/result_images/test_text/font_styles.png vs.
>> /home/adam/result_images/test_text/expected-font_styles.png (RMS
>> 23.833)
>> ImageComparisonFailure: images not close:
>> /home/adam/result_images/test_text/font_styles_svg.png vs.
>> /home/adam/result_images/test_text/expected-font_styles_svg.png (RMS
>> 12.961)
>>
>> The module that fails is:
>>
>> FAIL: matplotlib.tests.test_mlab.test_recarray_csv_roundtrip
>> ----------------------------------------------------------------------
>> Traceback (most recent call last):
>> File "/usr/local/lib/python2.6/dist-packages/nose-0.11.4-py2.6.egg/nose/case.py",
>> line 186, in runTest
>> self.test(*self.arg)
>> File "/usr/local/lib/python2.6/dist-packages/matplotlib/tests/test_mlab.py",
>> line 24, in test_recarray_csv_roundtrip
>> assert np.allclose( expected['x'], actual['x'] )
>> AssertionError
>>
>>
>>
>> I am not sure of the importance level of these - but I wanted to ask
>> to see if I should do anything or if they can safely be ignored.
>>
>> Thanks,
>> Adam.
>>
>> ------------------------------------------------------------------------------
>> This SF.net email is sponsored by Sprint
>> What will you do first with EVO, the first 4G phone?
>> Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
>> _______________________________________________
>> Matplotlib-users mailing list
>> Mat...@li...
>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>>
>> 
>
> ------------------------------------------------------------------------------
> The Palm PDK Hot Apps Program offers developers who use the
> Plug-In Development Kit to bring their C/C++ apps to Palm for a share
> of 1ドル Million in cash or HP Products. Visit us here for more details:
> http://ad.doubleclick.net/clk;226879339;13503038;l?
> http://clk.atdmt.com/CRS/go/247765532/direct/01/
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
> 
From: German O. <ger...@gm...> - 2010年07月27日 14:40:52
Benjamin
In my case, I'm in the process of "selling" Matplotlib at the interior
of the company for that I work, and it will be a strong point if I
could get references or recommendations from commercial software or
institutions that had success using Matplotlib.
In my point of view, the idea to add this to the webpage will be a
very good first impression of the software.
regards,
German
On Tue, Jul 27, 2010 at 3:05 PM, Benjamin Root <ben...@ou...> wrote:
> On Tue, Jul 27, 2010 at 6:01 AM, German Ocampo <ger...@gm...> wrote:
>>
>> Good morning
>>
>> Do you know where I could get examples of case stories about
>> commercial or open source software that has been developed using the
>> Matplotlib library?
>>
>> Many Thanks
>>
>> German
>>
>
> German,
>
> Interesting idea. Might be something nice to add to the project page,
> maybe?
>
> Ben Root
>
>
From: Benjamin R. <ben...@ou...> - 2010年07月27日 14:06:30
On Tue, Jul 27, 2010 at 6:01 AM, German Ocampo <ger...@gm...> wrote:
> Good morning
>
> Do you know where I could get examples of case stories about
> commercial or open source software that has been developed using the
> Matplotlib library?
>
> Many Thanks
>
> German
>
>
German,
Interesting idea. Might be something nice to add to the project page,
maybe?
Ben Root
Of course, we'll prefer to see all of the tests pass...
I'm surprised the two modes of running the tests gives different 
results. Are you sure they are running the same python? Does
 python `which nosetests` matplotlib.tests
give you the same result as
 nosetests matplotlib.tests
?
There must be some environmental difference between the two to cause the 
different results.
Mike
On 07/24/2010 05:09 PM, Adam wrote:
> Hello, I have just updated to v1.0.0 and am trying to run the test
> suite to make sure everything is ok. There seems to be two different
> suites and I am not sure which is correct/current:
>
> $python -c 'import matplotlib; matplotlib.test()'
> [...snipped output...]
> Ran 138 tests in 390.991s
> OK (KNOWNFAIL=2)
>
> $nosetests matplotlib.tests I get:
> [...snipped output]
> Ran 144 tests in 380.165s
> FAILED (errors=4, failures=1)
>
> Two of these errors are the known failures from above, and the other
> two are in "matplotlib.tests.test_text.test_font_styles":
> ImageComparisonFailure: images not close:
> /home/adam/result_images/test_text/font_styles.png vs.
> /home/adam/result_images/test_text/expected-font_styles.png (RMS
> 23.833)
> ImageComparisonFailure: images not close:
> /home/adam/result_images/test_text/font_styles_svg.png vs.
> /home/adam/result_images/test_text/expected-font_styles_svg.png (RMS
> 12.961)
>
> The module that fails is:
>
> FAIL: matplotlib.tests.test_mlab.test_recarray_csv_roundtrip
> ----------------------------------------------------------------------
> Traceback (most recent call last):
> File "/usr/local/lib/python2.6/dist-packages/nose-0.11.4-py2.6.egg/nose/case.py",
> line 186, in runTest
> self.test(*self.arg)
> File "/usr/local/lib/python2.6/dist-packages/matplotlib/tests/test_mlab.py",
> line 24, in test_recarray_csv_roundtrip
> assert np.allclose( expected['x'], actual['x'] )
> AssertionError
>
>
>
> I am not sure of the importance level of these - but I wanted to ask
> to see if I should do anything or if they can safely be ignored.
>
> Thanks,
> Adam.
>
> ------------------------------------------------------------------------------
> This SF.net email is sponsored by Sprint
> What will you do first with EVO, the first 4G phone?
> Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
> 
From: Jae-Joon L. <lee...@gm...> - 2010年07月27日 11:03:19
On Sun, Jul 25, 2010 at 3:55 PM, Satish Raghunath <qg...@my...> wrote:
> " AttributeError: 'module' object has no attribute 'use' "
It means that the "module" object (matplotlib) has no attribute named "use".
This kind of error is often encountered when wrong module is imported
as matplotlib.
Try
 import matplotlib
 print matplotlib.__file__
and see if the output correctly points the location where the
matplotlib is installed.
Regards,
-JJ
From: German O. <ger...@gm...> - 2010年07月27日 11:01:57
Good morning
Do you know where I could get examples of case stories about
commercial or open source software that has been developed using the
Matplotlib library?
Many Thanks
German
From: Jae-Joon L. <lee...@gm...> - 2010年07月27日 10:50:32
I tried a simple array (see the code below) but cannot reproduce the
problem you reported.
import matplotlib.pyplot as plt
import numpy as np
arr = np.zeros((11, 11), dtype="d")
arr[3,3]=1
im = plt.imshow(arr, interpolation="nearest", origin="lower")
cont = plt.contour(arr, levels=[0.5])
plt.savefig("a.eps")
Do you still see the shift with the above example code?
And what version of matplotlib are you using?
If possible, please post a complete script with the data (use a
mock-up data if you want)?
Regards,
-JJ
On Fri, Jul 23, 2010 at 12:16 AM, Jenna Lemonias
<je...@as...> wrote:
> No, I don't think the issue is a flip in the y-axis. I have a number of
> different examples of this, and many in which the contour is an ellipse so I
> can tell that the overall positioning is correct. It seems like something
> is going wrong only when I save the image... Thanks for the suggestion
> though!
>
> Jenna
>
> On Wed, Jul 21, 2010 at 3:40 PM, Jenna Lemonias
> <je...@as...>wrote:
>
>> I am trying to save a matplotlib 2d array image with an overlaid contour
>> as
>> an eps file. The contour appears to be shifted with respect to the image
>> underneath in the eps file, particularly when I zoom in on the image.
>> This
>> shift is not noticeable in the plot within matplotlib.
>>
>> I am using imshow to display the image. The contour is created by
>> plotting
>> a list of closely-spaced x,y coordinates. The attached file
>> matplotlib.png
>> is a screenshot of the (zoomed-in) image as displayed by matplotlib. The
>> attached file epsfile.png is a screenshot of the (zoomed-in) eps file.
>> When
>> I save this image as an eps file, it is actually 1 of 20 subplots and the
>> shift is noticeable in each subplot.
>>
>> Thanks in advance for your help!
>>
>> Jenna
>>
>>
> Just as a wild guess, could this actually be an issue with how imshow uses
> the upper-left corner for (0,0)? I have seen 1-pixel shifts before, but
> this shift is a little dramatic and I am left wondering if what we are
> really seeing is that the contour that is desired should actually be fliped
> in the y-axis?
>
> Maybe you could try another example where you try to draw a contour further
> away from the center of the image and see if it still goes in the spot you
> expect it to be?
>
> Ben Root
>
> ------------------------------------------------------------------------------
> This SF.net email is sponsored by Sprint
> What will you do first with EVO, the first 4G phone?
> Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
>
From: Eric F. <ef...@ha...> - 2010年07月26日 23:32:41
On 07/26/2010 12:17 PM, David Mashburn wrote:
> Ben and Eric,
>
> Thanks so much for your help!
>
> I'm trying to turn change some of the rcParams in my script... Here is a
> test of what happens:
>
> import matplotlib
> matplotlib.rcParams['keymap.fullscreen']=''
>
> Traceback (most recent call last):
> File "<input>", line 1, in<module>
> File "/usr/lib/pymodules/python2.6/matplotlib/__init__.py", line 623,
> in __setitem__
> See rcParams.keys() for a list of valid parameters.'%key)
> KeyError: 'keymap.fullscreen is not a valid rc parameter.See
> rcParams.keys() for a list of valid parameters.'
>
> It seems that none of the keymap parameters are defined in my rcParams
> dictionary...
>
> I also tried adding some of the "keymap" lines out of the online rc file:
> http://matplotlib.sf.net/_static/matplotlibrc
> to my rc file and it told me: Bad key "keymap.pan"
>
> I've got version 0.99.0 on ubuntu.
Aha! I thought you were using 1.0. For 1.0, these things are rc 
settings; I had no idea they even existed back in 0.99.0. I only 
tripped over "f" very recently.
The key bindings are coded in the key_press() method of 
FigureManagerBase. The callback is connected to the canvas in the 
__init__ method. The trick is to disconnect the callback:
fig = figure()
fig.canvas.mpl_disconnect(3)
plot([1,2,3])
Now key presses have no effect in that figure. The bad thing here is 
that I used the cid 3, a seemingly random number. I suspect, though, 
that once you find out what it is in your version of mpl (and it may 
still be 3), you will be able to rely on it for your purposes. To find 
it, print out fig.canvas.callbacks.callbacks and look for 
key_press_event. You could have your program use this dictionary to 
look it up.
Eric
>
> Is this a new feature? Do you know what I can try instead??
>
> Thanks!
> -David
>
> On 07/26/2010 10:18 AM, Benjamin Root wrote:
>> On Mon, Jul 26, 2010 at 3:09 PM, David Mashburn
>> <dav...@gm...<mailto:dav...@gm...> <mailto:dav...@gm...<mailto:dav...@gm...>>> wrote:
>>
>> Hello!
>>
>> My name is David Mashburn, and I have been a very happy user of
>> matplotlib for almost 5 years now, so let me start by saying thank you
>> for this wonderful piece of software! I has been a blessing to me!
>>
>> I am creating a program that performs actions based on key commands in
>> matplotlib, and I keep bumping into conflicts with the interactive
>> keyboard navigation system. Is there any way to bypass or disable some
>> or all of the keybindings hooked to interactive navigation?
>>
>> By the way, I'm using the WxAgg backend if that matters.
>>
>> Thanks!
>> -David
>>
>>
>> David,
>>
>> I have not tested this myself, but I believe that if you set
>> "navigate=False" as a keyword argument for making your axes, this will
>> stop the callbacks from being registered.
>
> That completely disables the toolbar, which is likely not what the OP wants.
>
> There are a bunch of rcParams, listed at the bottom of
> matplotlibrc_template (and of the default matplotlibrc file that is
> installed) that can be used to turn off the key bindings without
> disabling the toolbar.
>
> Personally, I think that putting in all those key bindings by default
> was a major mistake, one that should be reversed ASAP. Having the plot
> jump to fullscreen when one bumps "f" is rude. The first time it
> happened I had no idea what was going on or how to recover from it--I
> thought maybe my X-server had gone bonkers. And does one actually save a
> displayed figure so often that it is useful to have the "s" shortcut to
> save one from having to click the toolbar button? I could go on with
> this complaint...
>
> Eric
>
>>
>> Thanks for using matplotlib!
>>
>> Ben Root
>>
>
>
>
> ------------------------------------------------------------------------------
> The Palm PDK Hot Apps Program offers developers who use the
> Plug-In Development Kit to bring their C/C++ apps to Palm for a share
> of 1ドル Million in cash or HP Products. Visit us here for more details:
> http://ad.doubleclick.net/clk;226879339;13503038;l?
> http://clk.atdmt.com/CRS/go/247765532/direct/01/
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
From: David M. <dav...@gm...> - 2010年07月26日 22:17:15
Ben and Eric,
Thanks so much for your help!
I'm trying to turn change some of the rcParams in my script... Here is a 
test of what happens:
import matplotlib
matplotlib.rcParams['keymap.fullscreen']=''
Traceback (most recent call last):
 File "<input>", line 1, in <module>
 File "/usr/lib/pymodules/python2.6/matplotlib/__init__.py", line 623, 
in __setitem__
 See rcParams.keys() for a list of valid parameters.'%key)
KeyError: 'keymap.fullscreen is not a valid rc parameter.See 
rcParams.keys() for a list of valid parameters.'
It seems that none of the keymap parameters are defined in my rcParams 
dictionary...
I also tried adding some of the "keymap" lines out of the online rc file:
http://matplotlib.sf.net/_static/matplotlibrc
to my rc file and it told me: Bad key "keymap.pan"
I've got version 0.99.0 on ubuntu.
Is this a new feature? Do you know what I can try instead??
Thanks!
-David
On 07/26/2010 10:18 AM, Benjamin Root wrote:
> On Mon, Jul 26, 2010 at 3:09 PM, David Mashburn
> <dav...@gm... <mailto:dav...@gm...> <mailto:dav...@gm... <mailto:dav...@gm...>>> wrote:
>
> Hello!
>
> My name is David Mashburn, and I have been a very happy user of
> matplotlib for almost 5 years now, so let me start by saying thank you
> for this wonderful piece of software! I has been a blessing to me!
>
> I am creating a program that performs actions based on key commands in
> matplotlib, and I keep bumping into conflicts with the interactive
> keyboard navigation system. Is there any way to bypass or disable some
> or all of the keybindings hooked to interactive navigation?
>
> By the way, I'm using the WxAgg backend if that matters.
>
> Thanks!
> -David
>
>
> David,
>
> I have not tested this myself, but I believe that if you set
> "navigate=False" as a keyword argument for making your axes, this will
> stop the callbacks from being registered.
That completely disables the toolbar, which is likely not what the OP wants.
There are a bunch of rcParams, listed at the bottom of 
matplotlibrc_template (and of the default matplotlibrc file that is 
installed) that can be used to turn off the key bindings without 
disabling the toolbar.
Personally, I think that putting in all those key bindings by default 
was a major mistake, one that should be reversed ASAP. Having the plot 
jump to fullscreen when one bumps "f" is rude. The first time it 
happened I had no idea what was going on or how to recover from it--I 
thought maybe my X-server had gone bonkers. And does one actually save a 
displayed figure so often that it is useful to have the "s" shortcut to 
save one from having to click the toolbar button? I could go on with 
this complaint...
Eric
>
> Thanks for using matplotlib!
>
> Ben Root
>
From: Eric F. <ef...@ha...> - 2010年07月26日 21:16:44
On 07/26/2010 10:13 AM, Nikolaus Rath wrote:
> Hello,
>
> I would like to draw a couple of contour plots. The plots are on
> separate figures, but they should all have exactly the same color
> mapping (i.e, the same Z value should correspond to the same color in
> all plots).
>
> What's the best way to achieve this?
I think that all you will need is to specify the same cmap (if you are 
not using the default) and contour levels for both plots. You should 
not need to use the norm, unless you are doing something fancy; and in 
that case, all you need to do is specify the same norm for both plots. 
The real key, though, is explicitly specifying the set of contour levels 
that you want, and using the same one for both plots.
e.g.:
from pylab import * # yes, this is not recommended...
clevs = arange(0.3, 0.701, 0.1)
fig1 = figure()
contourf(rand(20,20), levels=clevs, extend='both')
colorbar()
fig2 = figure()
contourf(rand(30,40), levels=clevs, extend='both')
colorbar()
show()
You need to use the extend argument only if you want values beyond the 
levels you specify to constitute open-ended ranges. For example, if you 
have data values from 0 to 10, but most are between 4 and 6, you could 
specify levels as numpy.arange(4, 6.01, 0.1) and use extend='both'. Then 
all values greater than 6 would get a color at one end, and all values 
less than 4 would get another color at the other end. If you use a 
colorbar, it will see the extend argument that was used in contourf, and 
draw the colorbar with pointed ends to indicate "anything over" and 
"anything under". As illustrated above.
Eric
>
> From the documentation I gather that I should use the norm and extend
> keyword arguments, but I wasn't really able to figure out what values
> I have to pass and how the matplotlib.colors.Normalize instance works.
>
>
> Thanks,
>
> -Nikolaus
>
From: Eric F. <ef...@ha...> - 2010年07月26日 20:54:23
On 07/26/2010 10:18 AM, Benjamin Root wrote:
> On Mon, Jul 26, 2010 at 3:09 PM, David Mashburn
> <dav...@gm... <mailto:dav...@gm...>> wrote:
>
> Hello!
>
> My name is David Mashburn, and I have been a very happy user of
> matplotlib for almost 5 years now, so let me start by saying thank you
> for this wonderful piece of software! I has been a blessing to me!
>
> I am creating a program that performs actions based on key commands in
> matplotlib, and I keep bumping into conflicts with the interactive
> keyboard navigation system. Is there any way to bypass or disable some
> or all of the keybindings hooked to interactive navigation?
>
> By the way, I'm using the WxAgg backend if that matters.
>
> Thanks!
> -David
>
>
> David,
>
> I have not tested this myself, but I believe that if you set
> "navigate=False" as a keyword argument for making your axes, this will
> stop the callbacks from being registered.
That completely disables the toolbar, which is likely not what the OP wants.
There are a bunch of rcParams, listed at the bottom of 
matplotlibrc_template (and of the default matplotlibrc file that is 
installed) that can be used to turn off the key bindings without 
disabling the toolbar.
Personally, I think that putting in all those key bindings by default 
was a major mistake, one that should be reversed ASAP. Having the plot 
jump to fullscreen when one bumps "f" is rude. The first time it 
happened I had no idea what was going on or how to recover from it--I 
thought maybe my X-server had gone bonkers. And does one actually save a 
displayed figure so often that it is useful to have the "s" shortcut to 
save one from having to click the toolbar button? I could go on with 
this complaint...
Eric
>
> Thanks for using matplotlib!
>
> Ben Root
>
From: Benjamin R. <ben...@ou...> - 2010年07月26日 20:18:35
On Mon, Jul 26, 2010 at 3:09 PM, David Mashburn
<dav...@gm...>wrote:
> Hello!
>
> My name is David Mashburn, and I have been a very happy user of
> matplotlib for almost 5 years now, so let me start by saying thank you
> for this wonderful piece of software! I has been a blessing to me!
>
> I am creating a program that performs actions based on key commands in
> matplotlib, and I keep bumping into conflicts with the interactive
> keyboard navigation system. Is there any way to bypass or disable some
> or all of the keybindings hooked to interactive navigation?
>
> By the way, I'm using the WxAgg backend if that matters.
>
> Thanks!
> -David
>
>
David,
I have not tested this myself, but I believe that if you set
"navigate=False" as a keyword argument for making your axes, this will stop
the callbacks from being registered.
Thanks for using matplotlib!
Ben Root
From: Nikolaus R. <Nik...@ra...> - 2010年07月26日 20:13:54
Hello,
I would like to draw a couple of contour plots. The plots are on
separate figures, but they should all have exactly the same color
mapping (i.e, the same Z value should correspond to the same color in
all plots).
What's the best way to achieve this?
>From the documentation I gather that I should use the norm and extend
keyword arguments, but I wasn't really able to figure out what values
I have to pass and how the matplotlib.colors.Normalize instance works.
Thanks,
 -Nikolaus
-- 
 »Time flies like an arrow, fruit flies like a Banana.«
 PGP fingerprint: 5B93 61F8 4EA2 E279 ABF6 02CF A9AD B7F8 AE4E 425C
From: eck n. <eck...@ho...> - 2010年07月26日 20:09:21
Problem solved.
When I set up python on the Windows machine, I simply copied over the directories and everything in them from my Linux machine, including all of the python bytecode *.pyc files. Trying to run a script with those *.pyc files present was causing the problem as they were compiled on my Linux machine originally. 
The matplotlib call works fine when I move the scripts to a clean folder.
Thanks
Alex 
From: ben...@ou...
Date: 2010年7月26日 09:56:27 -0500
Subject: Re: [Matplotlib-users] Import matplotlib.pyplot fails on windows XP
To: eck...@ho...
CC: mat...@li...
On Sat, Jul 24, 2010 at 4:57 AM, eck naysmith <eck...@ho...> wrote:
Hello,
I've installed the following Python packages on a Windows XP machine:
Python 2.6.5
Python 2.6 numpy-1.4.1
Python 2.6 matplotlib-0.99.3 [installer - matplotlib-0.99.3.win32-py2.6]
Python and Numpy work correctly. Matplotlib also works and as a test I tried successfully the following on the python interpretor:
from matplotlib.pyplot import *
plot([1,2,3])
show()
A graph then appears and thus so far so good.
However, when I try to run a certain python script, a problem occurs when importing from matplotlib:
	
	
	
	
Traceback (most recent
call last):
 File
"C:\Pythoncode\Games\Bridge_war_2\unitload2.py", line 2, in
<module>
 from matplotlib.pyplot
import plot, ylabel,xlabel, show
 File
"C:\Python26\lib\site-packages\matplotlib\pyplot.py", line
78, in <module>
 new_figure_manager,
draw_if_interactive, show = pylab_setup()
 File
"C:\Python26\lib\site-packages\matplotlib\backends\__init__.py",
line 25, in pylab_setup
 globals(),locals(),[backend_name])
 File
"C:\Python26\lib\site-packages\matplotlib\backends\backend_tkagg.py",
line 7, in <module>
 import Tkinter as Tk,
FileDialog
 File
"C:\Python26\lib\lib-tk\FileDialog.py", line 12, in
<module>
 from Dialog import
Dialog
 File
"C:\Pythoncode\Games\Bridge_war_2\Dialog.py", line 2, in
<module>
 import wx
ImportError: No module
named wx
The error is that your Windows XP box does not have the wxPython module installed for Windows.
http://www.wxpython.org/download.php
I hope that helps,
Ben Root
 		 	 		 
_________________________________________________________________
http://clk.atdmt.com/UKM/go/197222280/direct/01/
We want to hear all your funny, exciting and crazy Hotmail stories. Tell us now
From: David M. <dav...@gm...> - 2010年07月26日 20:09:20
Hello!
My name is David Mashburn, and I have been a very happy user of
matplotlib for almost 5 years now, so let me start by saying thank you
for this wonderful piece of software! I has been a blessing to me!
I am creating a program that performs actions based on key commands in
matplotlib, and I keep bumping into conflicts with the interactive
keyboard navigation system. Is there any way to bypass or disable some
or all of the keybindings hooked to interactive navigation?
By the way, I'm using the WxAgg backend if that matters.
Thanks!
-David
From: Mathew Y. <mat...@gm...> - 2010年07月26日 20:08:30
Is there a simple function call for this? And finding the distance of
a point to the plane?
-Mathew
From: Benjamin R. <ben...@ou...> - 2010年07月26日 20:03:02
On Mon, Jul 26, 2010 at 9:49 AM, Benjamin Root <ben...@ou...> wrote:
> On Sat, Jul 24, 2010 at 1:51 PM, Josh Lawrence <jos...@gm...>wrote:
>
>> Hello,
>>
>> I looked on your website for the different line styles. In the
>> documentation for matplotlib.lines.line2D.set_linestyle, the dashed
>> linestyle is listed as '-' and not '--'. It it my understanding that
>> dashed should be '--'. If I'm incorrect, sorry for the noise.
>>
>> Cheers,
>>
>> --
>> Josh Lawrence
>> Ph.D. Student
>> Clemson University
>>
>>
>>
> Looks like the formatter for the online documentation took the double-dash
> to mean a "long line", much like how LaTeX does. Anybody know how to make
> the double-dash appear as two distinct dashes?
>
>
> http://matplotlib.sourceforge.net/api/artist_api.html?highlight=set_linestyle#matplotlib.lines.Line2D.set_linestyle
>
> Ben Root
>
>
After some reading of sphinx documentation, it appears to be a bug with
sphinx (or actually, "smartypants") because it should not be doing this sort
of interpretation within a docstring. Anyway, supposedly the workaround is
to put double backticks around the part that needs to be treated literally:
``'--'``. I tried this out and built the docs locally and it works... sort
of. The text that is surrounded by double backticks are getting a different
background color. This doesn't look great to me. Maybe someone else has a
thought?
Ben Root
On 07/26/2010 08:18 PM, Timothy Vickery wrote:
> Hi everyone,
>
> I'm new to matplotlib, and I would like to create a typical plot of a
> timecourse (markers connected by lines), with the markers varying in
> size and/or style according to a separate set of data that corresponds
> to each timepoint. However, my understanding is that plot() will not
> accept an array of marker sizes, only a single float value that is
> applied to all markers. On the other hand, scatter() does allow
> variably-sized markers (as in the scatter_demo2.py example). However,
> there does not seem to be a straightforward way to add lines to this
> plot connecting markers in sequence. Can anyone recommend a work-around
> to this issue, or point out if I've missed something in the documentation?
>
> Thanks,
> Tim
>
You could use plot and scatter on the same plot. See the attached example.
#-------------------------------------------
import numpy as np
import matplotlib.pyplot as plt
N = 100
x = np.linspace(-10.0,10.0,N)
y = 50.0*np.exp(-x**2)
size = 100.0*np.abs(np.sin(x))
plt.plot(x,y)
plt.scatter(x,y,s=size)
plt.show()
#-------------------------------------------
Regards,
João Luís
From: Benjamin R. <ben...@ou...> - 2010年07月26日 19:57:04
On Mon, Jul 26, 2010 at 2:50 PM, Mathew Yeates <mat...@gm...> wrote:
> Hi
> Is there any way to let the user rotate a 3D plot? I don't see an
> example which does this.
>
> -Mathew
>
>
What do you mean? By default, all 3D plots are rotatable by merely clicking
and draging the plot around. Or are you referring to how to set camera view
points?
Ben Root
From: Mathew Y. <mat...@gm...> - 2010年07月26日 19:50:42
Hi
Is there any way to let the user rotate a 3D plot? I don't see an
example which does this.
-Mathew
From: eck n. <eck...@ho...> - 2010年07月26日 19:46:21
From: ben...@ou...
Date: 2010年7月26日 09:56:27 -0500
Subject: Re: [Matplotlib-users] Import matplotlib.pyplot fails on windows XP
To: eck...@ho...
CC: mat...@li...
On Sat, Jul 24, 2010 at 4:57 AM, eck naysmith <eck...@ho...> wrote:
Hello,
I've installed the following Python packages on a Windows XP machine:
Python 2.6.5
Python 2.6 numpy-1.4.1
Python 2.6 matplotlib-0.99.3 [installer - matplotlib-0.99.3.win32-py2.6]
Python and Numpy work correctly. Matplotlib also works and as a test I tried successfully the following on the python interpretor:
from matplotlib.pyplot import *
plot([1,2,3])
show()
A graph then appears and thus so far so good.
However, when I try to run a certain python script, a problem occurs when importing from matplotlib:
	
	
	
	
Traceback (most recent
call last):
 File
"C:\Pythoncode\Games\Bridge_war_2\unitload2.py", line 2, in
<module>
 from matplotlib.pyplot
import plot, ylabel,xlabel, show
 File
"C:\Python26\lib\site-packages\matplotlib\pyplot.py", line
78, in <module>
 new_figure_manager,
draw_if_interactive, show = pylab_setup()
 File
"C:\Python26\lib\site-packages\matplotlib\backends\__init__.py",
line 25, in pylab_setup
 globals(),locals(),[backend_name])
 File
"C:\Python26\lib\site-packages\matplotlib\backends\backend_tkagg.py",
line 7, in <module>
 import Tkinter as Tk,
FileDialog
 File
"C:\Python26\lib\lib-tk\FileDialog.py", line 12, in
<module>
 from Dialog import
Dialog
 File
"C:\Pythoncode\Games\Bridge_war_2\Dialog.py", line 2, in
<module>
 import wx
ImportError: No module
named wx
The error is that your Windows XP box does not have the wxPython module installed for Windows.
http://www.wxpython.org/download.php
I hope that helps,
Ben Root
No calls are made anywhere for wxPython so I don't know why it is seeking it. But when I installed wxPython anyway just to see what would happen, the traceback then ends at the penultimate line shown above i.e 
"File
"C:\Python26\lib\lib-tk\FileDialog.py", line 12, in
<module>
 from Dialog import
Dialog"
On the Traceback, each line beggining with 'File "C:\Python26......." is a seperate error. The most significant error is the first one:
'Traceback (most recent
call last):
 File
"C:\Pythoncode\Games\Bridge_war_2\unitload2.py", line 2, in
<module>
 from matplotlib.pyplot
import plot, ylabel,xlabel, show'
I suspected the problems were arising from the use of the statement 'from numpy import foobar' overwriting some of the names used by matplotlib, so I changed the import statement to 'import numpy' to avoid any potential namespace clash and adjusted the code accordingly. This does nothing and the exact same Traceback error messages occur.
Regards
Alex
 		 	 		 
_________________________________________________________________
http://clk.atdmt.com/UKM/go/195013117/direct/01/
We want to hear all your funny, exciting and crazy Hotmail stories. Tell us now
From: Timothy V. <tim...@gm...> - 2010年07月26日 19:18:37
Hi everyone,
I'm new to matplotlib, and I would like to create a typical plot of a
timecourse (markers connected by lines), with the markers varying in size
and/or style according to a separate set of data that corresponds to each
timepoint. However, my understanding is that plot() will not accept an array
of marker sizes, only a single float value that is applied to all markers.
On the other hand, scatter() does allow variably-sized markers (as in the
scatter_demo2.py example). However, there does not seem to be a
straightforward way to add lines to this plot connecting markers in
sequence. Can anyone recommend a work-around to this issue, or point out if
I've missed something in the documentation?
Thanks,
Tim
From: Waléria A. D. <wal...@gm...> - 2010年07月26日 17:21:43
I did what you showed me but the image disappears
On Mon, Jul 26, 2010 at 2:06 PM, <PH...@ge...> wrote:
> Replace this line:
>
> ax.plot(f/1000, Sserie)
>
>
>
> With this line:
>
> ax.plot(f/1000.0, Sserie)
>
>
>
> And tell us how things go. Python 2.6 distinguishes between integers and
> floats very strictly. Hence:
>
> In [1]: 20/1000
>
> Out[1]: 0
>
>
>
> In [2]: 20.0/1000.0
>
> Out[2]: 0.02
>
>
>
> See the difference?
>
> -paul
>
>
>
> *From:* Waléria Antunes David [mailto:wal...@gm...]
> *Sent:* Monday, July 26, 2010 10:01 AM
> *To:* Angus McMorland
>
> *Cc:* mat...@li...
> *Subject:* Re: [Matplotlib-users] Hz to KHz
>
>
>
> i don't understand..
>
> On Mon, Jul 26, 2010 at 1:57 PM, Angus McMorland <am...@gm...>
> wrote:
>
> On 26 July 2010 12:47, Waléria Antunes David <wal...@gm...>
> wrote:
> > My code like this in django: http://pastebin.com/nzM5jvuc
>
> Are you perhaps suffering from integer division? How about dividing by
> 1000.0, instead of 1000?
>
> Angus.
>
>
> > i'm lost
> >
> > On Mon, Jul 26, 2010 at 1:42 PM, <PH...@ge...> wrote:
> >>
> >> Make sure that you’re dividing by 1000.0 (as opposed to 1000) to avoid
> any
> >> integer nonsense and make sure to reset your axis limits.
> >>
> >>
> >>
> >> Posting a small code snippet would help us get you on the right track.
> >>
> >> -p
> >>
> >>
> >>
> >> From: Waléria Antunes David [mailto:wal...@gm...]
> >> Sent: Monday, July 26, 2010 9:32 AM
> >> To: Matthieu Brucher
> >> Cc: mat...@li...
> >> Subject: Re: [Matplotlib-users] Hz to KHz
> >>
> >>
> >>
> >> I know...I tried but I'm using django and also when divided by 1000 the
> >> image does not appear...
> >> I don't know what to do.....help me....
> >>
> >> On Mon, Jul 26, 2010 at 1:27 PM, Matthieu Brucher
> >> <mat...@gm...> wrote:
> >>
> >> Hi,
> >>
> >> You may just divide them by 1000?
> >>
> >> Matthieu
> >>
> >> 2010年7月26日 Waléria Antunes David <wal...@gm...>:
> >>
> >> > Hello all,
> >> >
> >> > I need to format the values of graphic to KHz.....my values are in Hz
> >> > see at idle python it displays the values as: 3000 3050 3100 .... 3400
> ,
> >> > but
> >> > I need to go where it will be displayed KHz: 3.0 3.1
> >> >
> >> > can someone help me?
> >>
> >> >
> >> >
> ------------------------------------------------------------------------------
> >> > The Palm PDK Hot Apps Program offers developers who use the
> >> > Plug-In Development Kit to bring their C/C++ apps to Palm for a share
> >> > of 1ドル Million in cash or HP Products. Visit us here for more details:
> >> > http://ad.doubleclick.net/clk;226879339;13503038;l?
> >> > http://clk.atdmt.com/CRS/go/247765532/direct/01/
> >> > _______________________________________________
> >> > Matplotlib-users mailing list
> >> > Mat...@li...
> >> > https://lists.sourceforge.net/lists/listinfo/matplotlib-users
> >> >
> >> >
> >>
> >>
> >>
> >> --
> >> Information System Engineer, Ph.D.
> >> Blog: http://matt.eifelle.com
> >> LinkedIn: http://www.linkedin.com/in/matthieubrucher
> >>
> >>
> >
> >
> ------------------------------------------------------------------------------
> > The Palm PDK Hot Apps Program offers developers who use the
> > Plug-In Development Kit to bring their C/C++ apps to Palm for a share
> > of 1ドル Million in cash or HP Products. Visit us here for more details:
> > http://ad.doubleclick.net/clk;226879339;13503038;l?
> > http://clk.atdmt.com/CRS/go/247765532/direct/01/
> > _______________________________________________
> > Matplotlib-users mailing list
> > Mat...@li...
> > https://lists.sourceforge.net/lists/listinfo/matplotlib-users
> >
> >
>
>
>
> --
>
> AJC McMorland
> Post-doctoral research fellow
> Neurobiology, University of Pittsburgh
>
>
>
From: Tim G. <tg...@pr...> - 2010年07月26日 17:11:44
On Jul 26, 2010 at 02:01 PM -0300, Waléria Antunes David wrote:
> i don't understand..
Just divide through by '1000.' or '1000.0' (same thing).
If you write 3100/1000, you'll get '3' because you are doing integer math. 
If you write 3100/1000.0, you'll get '3.1' because you are doing float math.
From: Angus M. <am...@gm...> - 2010年07月26日 17:08:31
On 26 July 2010 13:01, Waléria Antunes David <wal...@gm...> wrote:
> i don't understand..
python (version < 3, I think) uses integer division when given integer
values, i.e. 1/1000 = 0, at the expense of giving a less accurate
answer than we might expect. If you tried to plot a bunch of values
divided by 1000, they may well all be integer 0, and so you wouldn't
see any line (it would be at the x-axis). You would need to force
python to do floating point division: 1/1000.0 = 0.001; to do this you
need to make sure one of the numbers in the division is floating
point: the simplest way to do this is 1/1000.0 (or 1/1000. for short).
I hope that helps,
Angus.
> On Mon, Jul 26, 2010 at 1:57 PM, Angus McMorland <am...@gm...> wrote:
>>
>> On 26 July 2010 12:47, Waléria Antunes David <wal...@gm...>
>> wrote:
>> > My code like this in django: http://pastebin.com/nzM5jvuc
>>
>> Are you perhaps suffering from integer division? How about dividing by
>> 1000.0, instead of 1000?
>>
>> Angus.
>>
>> > i'm lost
>> >
>> > On Mon, Jul 26, 2010 at 1:42 PM, <PH...@ge...> wrote:
>> >>
>> >> Make sure that you’re dividing by 1000.0 (as opposed to 1000) to avoid
>> >> any
>> >> integer nonsense and make sure to reset your axis limits.
>> >>
>> >>
>> >>
>> >> Posting a small code snippet would help us get you on the right track.
>> >>
>> >> -p
>> >>
>> >>
>> >>
>> >> From: Waléria Antunes David [mailto:wal...@gm...]
>> >> Sent: Monday, July 26, 2010 9:32 AM
>> >> To: Matthieu Brucher
>> >> Cc: mat...@li...
>> >> Subject: Re: [Matplotlib-users] Hz to KHz
>> >>
>> >>
>> >>
>> >> I know...I tried but I'm using django and also when divided by 1000 the
>> >> image does not appear...
>> >> I don't know what to do.....help me....
>> >>
>> >> On Mon, Jul 26, 2010 at 1:27 PM, Matthieu Brucher
>> >> <mat...@gm...> wrote:
>> >>
>> >> Hi,
>> >>
>> >> You may just divide them by 1000?
>> >>
>> >> Matthieu
>> >>
>> >> 2010年7月26日 Waléria Antunes David <wal...@gm...>:
>> >>
>> >> > Hello all,
>> >> >
>> >> > I need to format the values of graphic to KHz.....my values are in Hz
>> >> > see at idle python it displays the values as: 3000 3050 3100 ....
>> >> > 3400 ,
>> >> > but
>> >> > I need to go where it will be displayed KHz: 3.0 3.1
>> >> >
>> >> > can someone help me?
>> >>
>> >> >
>> >> >
>> >> > ------------------------------------------------------------------------------
>> >> > The Palm PDK Hot Apps Program offers developers who use the
>> >> > Plug-In Development Kit to bring their C/C++ apps to Palm for a share
>> >> > of 1ドル Million in cash or HP Products. Visit us here for more details:
>> >> > http://ad.doubleclick.net/clk;226879339;13503038;l?
>> >> > http://clk.atdmt.com/CRS/go/247765532/direct/01/
>> >> > _______________________________________________
>> >> > Matplotlib-users mailing list
>> >> > Mat...@li...
>> >> > https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>> >> >
>> >> >
>> >>
>> >>
>> >>
>> >> --
>> >> Information System Engineer, Ph.D.
>> >> Blog: http://matt.eifelle.com
>> >> LinkedIn: http://www.linkedin.com/in/matthieubrucher
>> >>
>> >>
>> >
>> >
>> > ------------------------------------------------------------------------------
>> > The Palm PDK Hot Apps Program offers developers who use the
>> > Plug-In Development Kit to bring their C/C++ apps to Palm for a share
>> > of 1ドル Million in cash or HP Products. Visit us here for more details:
>> > http://ad.doubleclick.net/clk;226879339;13503038;l?
>> > http://clk.atdmt.com/CRS/go/247765532/direct/01/
>> > _______________________________________________
>> > Matplotlib-users mailing list
>> > Mat...@li...
>> > https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>> >
>> >
>>
>>
>>
>> --
>> AJC McMorland
>> Post-doctoral research fellow
>> Neurobiology, University of Pittsburgh
>
>
-- 
AJC McMorland
Post-doctoral research fellow
Neurobiology, University of Pittsburgh
19 messages has been excluded from this view by a project administrator.

Showing results of 458

<< < 1 2 3 4 5 6 .. 19 > >> (Page 4 of 19)
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.
Thanks for helping keep SourceForge clean.
X





Briefly describe the problem (required):
Upload screenshot of ad (required):
Select a file, or drag & drop file here.
Screenshot instructions:

Click URL instructions:
Right-click on the ad, choose "Copy Link", then paste here →
(This may not be possible with some types of ads)

More information about our ad policies

Ad destination/click URL:

AltStyle によって変換されたページ (->オリジナル) /