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

Showing results of 83

1 2 3 4 > >> (Page 1 of 4)
From: dodermat <dan...@gm...> - 2013年11月28日 13:23:12
Joe's guess was right, I got identical IDs for all twinx().
I had OSX10.9, matplotlib 1.3.x and tried both Python 2.7 and 3.3. A friend
of mine has Win7, matplotlib 1.2.0 and Pyhton 3.3, and also encountered the
problem I described. Even the comments by Damian and Lunayo on Joe's snippet
in Stackoverflow indicate that they had the same issue.
I renewed all my package installations in order to get matplotlib 1.3.1 and
have an environment that is similar to Dale's. Now I get the proper output
with both Python 2.7 and 3.3. Problem solved - yet not understood...
Thank you for your help!
--
View this message in context: http://matplotlib.1069221.n5.nabble.com/Plotting-with-more-than-two-y-axes-with-twinx-tp42556p42560.html
Sent from the matplotlib - users mailing list archive at Nabble.com.
From: Matt S. <ma...@pl...> - 2013年11月28日 05:50:02
Attachments: image.png
Hi Dani,
A quick thought. You could do an interactive multiple axes graph with
Plotly, either with the Python API <http://plot.ly/api/python> or from the
GUI. Here's an example of how to re-make that one with Plotly and IPython.
The Notebook is here <http://nbviewer.ipython.org/gist/cparmer/7685051> (and
a Notebook here <http://nbviewer.ipython.org/gist/cparmer/7628933> demos
multiple axes, subplots, and insets).
[image: Inline image 1]
Let me know if I can help with anything. Also, disclosure: I'm on the
Plotly team.
All my best,
Matt
On Wed, Nov 27, 2013 at 4:44 PM, Dale Chayes <da...@ld...> wrote:
>
> On Nov 27, 2013, at 18:38 , Joe Kington <jof...@gm...> wrote:
>
> > Hi Daniel,
> >
> > For what it's worth, the code runs perfectly for me as-is on matplotlib
> 1.3.1 with python 2.7 on linux.
>
> Same here for what its' worth:
> OS X 10.9
> python2.7 from Fink
> matplotlib-py27 1.3.0-1 from Fink
>
> -Dale
>
> >
> > However, based on your description, I'd guess that the second call to
> `twinx` is returning the same axes object.
> >
> > What happens when you do:
> >
> > print id(axes[1]), id(axes[2])
> >
> > Are the id numbers the same or different?
> >
> > If they're the same, there may have been a regression/change that causes
> `twinx` to return the same object instead of creating a new axes.
> >
> > Cheers!
> > -Joe
> >
> >
> >
> > On Wed, Nov 27, 2013 at 5:08 PM, dodermat <dan...@gm...>
> wrote:
> > Dear all
> >
> > What I want to accomplish was produced two years ago in a stackoverflow
> > snippet by Joe Kington
> > <
> http://stackoverflow.com/questions/7733693/matplotlib-overlay-plots-with-different-scales
> >
> > , and shown in the first figure below. However, when I use his snippet in
> > matplotlib 1.3.x, I get an output where the third axis replaces the
> second
> > axis, and the blue dots are accordingly distributed in only the lower
> half
> > of the plot (see second figure below). I considered downdating to an
> older
> > version of matplotlib, but then I came across a remark in the matplotlib
> > FAQ <http://matplotlib.org/faq/howto_faq.html#multiple-y-axis-scales> .
> > According to this remark, such a feature for twinx is on the wish list
> and
> > thus not very likely to be available in an older version.
> >
> > Can someone please explain the Kington magic to me?
> >
> >
> > <http://matplotlib.1069221.n5.nabble.com/file/n42556/ksRXk.png>
> > <http://matplotlib.1069221.n5.nabble.com/file/n42556/figure_1.png>
> >
> >
> >
> > --
> > View this message in context:
> http://matplotlib.1069221.n5.nabble.com/Plotting-with-more-than-two-y-axes-with-twinx-tp42556.html
> > Sent from the matplotlib - users mailing list archive at Nabble.com.
> >
> >
> ------------------------------------------------------------------------------
> > Rapidly troubleshoot problems before they affect your business. Most IT
> > organizations don't have a clear picture of how application performance
> > affects their revenue. With AppDynamics, you get 100% visibility into
> your
> > Java,.NET, & PHP application. Start your 15-day FREE TRIAL of
> AppDynamics Pro!
> >
> http://pubads.g.doubleclick.net/gampad/clk?id=84349351&iu=/4140/ostg.clktrk
> > _______________________________________________
> > Matplotlib-users mailing list
> > Mat...@li...
> > https://lists.sourceforge.net/lists/listinfo/matplotlib-users
> >
> >
> ------------------------------------------------------------------------------
> > Rapidly troubleshoot problems before they affect your business. Most IT
> > organizations don't have a clear picture of how application performance
> > affects their revenue. With AppDynamics, you get 100% visibility into
> your
> > Java,.NET, & PHP application. Start your 15-day FREE TRIAL of
> AppDynamics Pro!
> >
> http://pubads.g.doubleclick.net/gampad/clk?id=84349351&iu=/4140/ostg.clktrk_______________________________________________
> > Matplotlib-users mailing list
> > Mat...@li...
> > https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
>
>
> ------------------------------------------------------------------------------
> Rapidly troubleshoot problems before they affect your business. Most IT
> organizations don't have a clear picture of how application performance
> affects their revenue. With AppDynamics, you get 100% visibility into your
> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics
> Pro!
> http://pubads.g.doubleclick.net/gampad/clk?id=84349351&iu=/4140/ostg.clktrk
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
>
From: Dale C. <da...@ld...> - 2013年11月28日 01:09:22
Attachments: signature.asc
On Nov 27, 2013, at 18:38 , Joe Kington <jof...@gm...> wrote:
> Hi Daniel,
> 
> For what it's worth, the code runs perfectly for me as-is on matplotlib 1.3.1 with python 2.7 on linux.
Same here for what its' worth:
	OS X 10.9
	python2.7 from Fink
	matplotlib-py27 1.3.0-1 from Fink
-Dale
> 
> However, based on your description, I'd guess that the second call to `twinx` is returning the same axes object.
> 
> What happens when you do:
> 
> print id(axes[1]), id(axes[2])
> 
> Are the id numbers the same or different? 
> 
> If they're the same, there may have been a regression/change that causes `twinx` to return the same object instead of creating a new axes.
> 
> Cheers!
> -Joe
> 
> 
> 
> On Wed, Nov 27, 2013 at 5:08 PM, dodermat <dan...@gm...> wrote:
> Dear all
> 
> What I want to accomplish was produced two years ago in a stackoverflow
> snippet by Joe Kington
> <http://stackoverflow.com/questions/7733693/matplotlib-overlay-plots-with-different-scales>
> , and shown in the first figure below. However, when I use his snippet in
> matplotlib 1.3.x, I get an output where the third axis replaces the second
> axis, and the blue dots are accordingly distributed in only the lower half
> of the plot (see second figure below). I considered downdating to an older
> version of matplotlib, but then I came across a remark in the matplotlib
> FAQ <http://matplotlib.org/faq/howto_faq.html#multiple-y-axis-scales> .
> According to this remark, such a feature for twinx is on the wish list and
> thus not very likely to be available in an older version.
> 
> Can someone please explain the Kington magic to me?
> 
> 
> <http://matplotlib.1069221.n5.nabble.com/file/n42556/ksRXk.png>
> <http://matplotlib.1069221.n5.nabble.com/file/n42556/figure_1.png>
> 
> 
> 
> --
> View this message in context: http://matplotlib.1069221.n5.nabble.com/Plotting-with-more-than-two-y-axes-with-twinx-tp42556.html
> Sent from the matplotlib - users mailing list archive at Nabble.com.
> 
> ------------------------------------------------------------------------------
> Rapidly troubleshoot problems before they affect your business. Most IT
> organizations don't have a clear picture of how application performance
> affects their revenue. With AppDynamics, you get 100% visibility into your
> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
> http://pubads.g.doubleclick.net/gampad/clk?id=84349351&iu=/4140/ostg.clktrk
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
> 
> ------------------------------------------------------------------------------
> Rapidly troubleshoot problems before they affect your business. Most IT 
> organizations don't have a clear picture of how application performance 
> affects their revenue. With AppDynamics, you get 100% visibility into your 
> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
> http://pubads.g.doubleclick.net/gampad/clk?id=84349351&iu=/4140/ostg.clktrk_______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
From: Joe K. <jof...@gm...> - 2013年11月27日 23:38:12
Hi Daniel,
For what it's worth, the code runs perfectly for me as-is on matplotlib
1.3.1 with python 2.7 on linux.
However, based on your description, I'd guess that the second call to
`twinx` is returning the same axes object.
What happens when you do:
print id(axes[1]), id(axes[2])
Are the id numbers the same or different?
If they're the same, there may have been a regression/change that causes
`twinx` to return the same object instead of creating a new axes.
Cheers!
-Joe
On Wed, Nov 27, 2013 at 5:08 PM, dodermat <dan...@gm...> wrote:
> Dear all
>
> What I want to accomplish was produced two years ago in a stackoverflow
> snippet by Joe Kington
> <
> http://stackoverflow.com/questions/7733693/matplotlib-overlay-plots-with-different-scales
> >
> , and shown in the first figure below. However, when I use his snippet in
> matplotlib 1.3.x, I get an output where the third axis replaces the second
> axis, and the blue dots are accordingly distributed in only the lower half
> of the plot (see second figure below). I considered downdating to an older
> version of matplotlib, but then I came across a remark in the matplotlib
> FAQ <http://matplotlib.org/faq/howto_faq.html#multiple-y-axis-scales> .
> According to this remark, such a feature for twinx is on the wish list and
> thus not very likely to be available in an older version.
>
> Can someone please explain the Kington magic to me?
>
>
> <http://matplotlib.1069221.n5.nabble.com/file/n42556/ksRXk.png>
> <http://matplotlib.1069221.n5.nabble.com/file/n42556/figure_1.png>
>
>
>
> --
> View this message in context:
> http://matplotlib.1069221.n5.nabble.com/Plotting-with-more-than-two-y-axes-with-twinx-tp42556.html
> Sent from the matplotlib - users mailing list archive at Nabble.com.
>
>
> ------------------------------------------------------------------------------
> Rapidly troubleshoot problems before they affect your business. Most IT
> organizations don't have a clear picture of how application performance
> affects their revenue. With AppDynamics, you get 100% visibility into your
> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics
> Pro!
> http://pubads.g.doubleclick.net/gampad/clk?id=84349351&iu=/4140/ostg.clktrk
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
From: dodermat <dan...@gm...> - 2013年11月27日 23:08:12
Dear all
What I want to accomplish was produced two years ago in a stackoverflow
snippet by Joe Kington
<http://stackoverflow.com/questions/7733693/matplotlib-overlay-plots-with-different-scales> 
, and shown in the first figure below. However, when I use his snippet in
matplotlib 1.3.x, I get an output where the third axis replaces the second
axis, and the blue dots are accordingly distributed in only the lower half
of the plot (see second figure below). I considered downdating to an older
version of matplotlib, but then I came across a remark in the matplotlib
FAQ <http://matplotlib.org/faq/howto_faq.html#multiple-y-axis-scales> .
According to this remark, such a feature for twinx is on the wish list and
thus not very likely to be available in an older version.
Can someone please explain the Kington magic to me?
<http://matplotlib.1069221.n5.nabble.com/file/n42556/ksRXk.png> 
<http://matplotlib.1069221.n5.nabble.com/file/n42556/figure_1.png> 
--
View this message in context: http://matplotlib.1069221.n5.nabble.com/Plotting-with-more-than-two-y-axes-with-twinx-tp42556.html
Sent from the matplotlib - users mailing list archive at Nabble.com.
From: Andreas H. <li...@hi...> - 2013年11月27日 17:15:17
Hi,
when running basic_example_writer.py, I get *.mp4 files with a canvas
size of 800x600 pixels (at least that's what mplayer tells me). However,
I have trouble understanding where this canvas size comes from. The
example does not explicitly set the dpi or the figure size, and I don't
have a matplotlibrc which changes these settings. So figure.dpi is 80,
and the fig.size_inches is (8, 6). So how come this translates to a
800x600 pixel movie?
Thanks for you insight :)
-- Andreas.
From: Michael D. <md...@st...> - 2013年11月27日 12:42:42
The gist here is that `subplot` doesn't really know when the new subplot 
exactly overlaps another -- it's essentially unaware of what's already 
there. We could do some deduplication there. However, it's also a 
completely legitimate use case to create two subplots in the same 
location, and then change the location of the ticks, formatting and 
scale on one of them and not the other. And we can't really guess which 
the user intends to do. Your workaround seems like a good one, in the 
absence of really changing the API here so matplotlib can know the 
user's intent.
Mike
On 11/26/2013 08:23 PM, John Gu wrote:
> Hello,
>
> I had submitted a similar issue back in October of 2011. I'm using 
> matplotlib 1.3.1. Here's the code to produce the issue:
>
> f = figure()
> for i in xrange(9): subplot(3,3,i+1)
> f.axes[0].plot(range(100))
>
> Now try to drag the line in the first subplot around. It's extremely 
> slow. Now do the following:
>
> for ax in f.axes[1:]: ax.axison=False
>
> Now, when you drag the line around in the first subplot, there's a 
> huge difference. Basically, it seems like that matplotlib is 
> attempting to redraw a lot of unnecessary things on the figure. Is 
> there an easy fix to this?
>
> Thanks,
> John
>
>
> ------------------------------------------------------------------------------
> Rapidly troubleshoot problems before they affect your business. Most IT
> organizations don't have a clear picture of how application performance
> affects their revenue. With AppDynamics, you get 100% visibility into your
> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
> http://pubads.g.doubleclick.net/gampad/clk?id=84349351&iu=/4140/ostg.clktrk
>
>
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
-- 
 _
|\/|o _|_ _. _ | | \.__ __|__|_|_ _ _ ._ _
| ||(_| |(_|(/_| |_/|(_)(/_|_ |_|_)(_)(_)| | |
http://www.droettboom.com
From: John Gu <jo...@gm...> - 2013年11月27日 01:23:33
Hello,
I had submitted a similar issue back in October of 2011. I'm using
matplotlib 1.3.1. Here's the code to produce the issue:
f = figure()
for i in xrange(9): subplot(3,3,i+1)
f.axes[0].plot(range(100))
Now try to drag the line in the first subplot around. It's extremely slow.
 Now do the following:
for ax in f.axes[1:]: ax.axison=False
Now, when you drag the line around in the first subplot, there's a huge
difference. Basically, it seems like that matplotlib is attempting to
redraw a lot of unnecessary things on the figure. Is there an easy fix to
this?
Thanks,
John
From: Neal B. <ndb...@gm...> - 2013年11月26日 12:35:13
Sorry, this was posted to the wrong group
Neal Becker wrote:
> Didn't seem to work for me. I tried
> pip install --user hg-git
> hg clone https://github.com/scipy/scipy
> abort: HTTP Error 406: Not Acceptable
> 
> So how about using hg-git just locally?
> 
> hg clone scipy scipy.hg
> ** Unknown exception encountered with possibly-broken third-party extension
> hg- git
> ** which supports versions 2.3.1 of Mercurial.
> ** Please disable hg-git and try your action again.
> ** If that fixes the bug please report it to
> https://bitbucket.org/durin42/hg-git/issues ** Python 2.7.5 (default, Nov 12
> 2013, 16:18:42) [GCC 4.8.2 20131017 (Red Hat 4.8.2-1)]
> ** Mercurial Distributed SCM (version 2.8)
> ** Extensions loaded: hgk, rebase, highlight, hg-git
> Traceback (most recent call last):
> File "/usr/bin/hg", line 38, in <module>
> mercurial.dispatch.run()
> File "/usr/lib64/python2.7/site-packages/mercurial/dispatch.py", line 28, in
> run
> sys.exit((dispatch(request(sys.argv[1:])) or 0) & 255)
> File "/usr/lib64/python2.7/site-packages/mercurial/dispatch.py", line 69, in
> dispatch
> ret = _runcatch(req)
> File "/usr/lib64/python2.7/site-packages/mercurial/dispatch.py", line 133,
> in
> _runcatch
> return _dispatch(req)
> File "/usr/lib64/python2.7/site-packages/mercurial/dispatch.py", line 806,
> in
> _dispatch
> cmdpats, cmdoptions)
> File "/usr/lib64/python2.7/site-packages/mercurial/dispatch.py", line 585,
> in
> runcommand
> ret = _runcommand(ui, options, cmd, d)
> File "/usr/lib64/python2.7/site-packages/mercurial/dispatch.py", line 897,
> in
> _runcommand
> return checkargs()
> File "/usr/lib64/python2.7/site-packages/mercurial/dispatch.py", line 868,
> in
> checkargs
> return cmdfunc()
> File "/usr/lib64/python2.7/site-packages/mercurial/dispatch.py", line 803,
> in
> <lambda>
> d = lambda: util.checksignature(func)(ui, *args, **cmdoptions)
> File "/usr/lib64/python2.7/site-packages/mercurial/util.py", line 512, in
> check
> return func(*args, **kwargs)
> File "/usr/lib64/python2.7/site-packages/mercurial/commands.py", line 1282,
> in
> clone
> branch=opts.get('branch'))
> File "/usr/lib64/python2.7/site-packages/mercurial/hg.py", line 372, in
> clone
> destpeer.local().clone(srcpeer, heads=revs, stream=stream)
> File "/usr/lib64/python2.7/site-packages/mercurial/localrepo.py", line 2431,
> in clone
> return self.pull(remote, heads)
> File "/home/nbecker/.local/lib/python2.7/site-packages/hggit/hgrepo.py",
> line
> 14, in pull
> return git.fetch(remote.path, heads)
> File
> "/home/nbecker/.local/lib/python2.7/site-packages/hggit/git_handler.py",
> line 204, in fetch
> refs = self.fetch_pack(remote, heads)
> File
> "/home/nbecker/.local/lib/python2.7/site-packages/hggit/git_handler.py",
> line 1037, in fetch_pack
> f, commit = self.git.object_store.add_pack()
> ValueError: too many values to unpack
> 
> 
From: Neal B. <ndb...@gm...> - 2013年11月26日 12:32:08
Didn't seem to work for me. I tried
pip install --user hg-git
hg clone https://github.com/scipy/scipy
abort: HTTP Error 406: Not Acceptable
So how about using hg-git just locally?
hg clone scipy scipy.hg
** Unknown exception encountered with possibly-broken third-party extension hg-
git
** which supports versions 2.3.1 of Mercurial.
** Please disable hg-git and try your action again.
** If that fixes the bug please report it to https://bitbucket.org/durin42/hg-git/issues
** Python 2.7.5 (default, Nov 12 2013, 16:18:42) [GCC 4.8.2 20131017 (Red Hat 
4.8.2-1)]
** Mercurial Distributed SCM (version 2.8)
** Extensions loaded: hgk, rebase, highlight, hg-git
Traceback (most recent call last):
 File "/usr/bin/hg", line 38, in <module>
 mercurial.dispatch.run()
 File "/usr/lib64/python2.7/site-packages/mercurial/dispatch.py", line 28, in 
run
 sys.exit((dispatch(request(sys.argv[1:])) or 0) & 255)
 File "/usr/lib64/python2.7/site-packages/mercurial/dispatch.py", line 69, in 
dispatch
 ret = _runcatch(req)
 File "/usr/lib64/python2.7/site-packages/mercurial/dispatch.py", line 133, in 
_runcatch
 return _dispatch(req)
 File "/usr/lib64/python2.7/site-packages/mercurial/dispatch.py", line 806, in 
_dispatch
 cmdpats, cmdoptions)
 File "/usr/lib64/python2.7/site-packages/mercurial/dispatch.py", line 585, in 
runcommand
 ret = _runcommand(ui, options, cmd, d)
 File "/usr/lib64/python2.7/site-packages/mercurial/dispatch.py", line 897, in 
_runcommand
 return checkargs()
 File "/usr/lib64/python2.7/site-packages/mercurial/dispatch.py", line 868, in 
checkargs
 return cmdfunc()
 File "/usr/lib64/python2.7/site-packages/mercurial/dispatch.py", line 803, in 
<lambda>
 d = lambda: util.checksignature(func)(ui, *args, **cmdoptions)
 File "/usr/lib64/python2.7/site-packages/mercurial/util.py", line 512, in 
check
 return func(*args, **kwargs)
 File "/usr/lib64/python2.7/site-packages/mercurial/commands.py", line 1282, in 
clone
 branch=opts.get('branch'))
 File "/usr/lib64/python2.7/site-packages/mercurial/hg.py", line 372, in clone
 destpeer.local().clone(srcpeer, heads=revs, stream=stream)
 File "/usr/lib64/python2.7/site-packages/mercurial/localrepo.py", line 2431, 
in clone
 return self.pull(remote, heads)
 File "/home/nbecker/.local/lib/python2.7/site-packages/hggit/hgrepo.py", line 
14, in pull
 return git.fetch(remote.path, heads)
 File "/home/nbecker/.local/lib/python2.7/site-packages/hggit/git_handler.py", 
line 204, in fetch
 refs = self.fetch_pack(remote, heads)
 File "/home/nbecker/.local/lib/python2.7/site-packages/hggit/git_handler.py", 
line 1037, in fetch_pack
 f, commit = self.git.object_store.add_pack()
ValueError: too many values to unpack
From: Grigoris M. <gr....@gm...> - 2013年11月26日 12:12:32
Thanks to this post ( 
http://nerdjusttyped.blogspot.gr/2010/07/type-1-fonts-and-matplotlib-figures.html)
I used the rcParams['text.usetex'] = True (after installing dvipng) and 
the final plot had only Type 1 fonts.
Grigoris
On 11/23/2013 02:21 PM, Grigoris Maravelias wrote:
> Hello!
>
> I am creating a plot and I select the font type to be TrueType (by 
> using rcParams['ps.fonttype'] = 42).
> I am using this image later on in a tex file and when I am creating 
> the pdf file I check for the font types and I see
> name type emb sub uni 
> object ID
> [none] Type 3 yes no no 
> 160 0
>
> But if I comment the legend while making the plot then I do not get a 
> Type 3 font.
>
> Why is that? It seems that the fonttype does not apply to the legend 
> (or am I missing something?).
>
> Best
>
> Grigoris
From: Pål G. E. <pa...@gm...> - 2013年11月25日 15:50:43
Hi
I've been trying to do a twiny() plot in matplotlib, but I've run into a
problem with the ticks when using autoscale with the tight option.
My second xaxis is a function of the first.
An example would be:
-----------------
import numpy as np
import matplotlib.pyplot as plt
Radius = np.arange(32)
Theta = np.sin(np.arange(32))
fig1 = plt.figure()
ax1 = fig1.add_subplot(111)
ax1.plot(Radius, Theta, linestyle='-', marker='.', c='b', markersize=5)
print(ax1.get_xticks())
plt.show()
fig1 = plt.figure()
ax1 = fig1.add_subplot(111)
ax1.plot(Radius, Theta, linestyle='-', marker='.', c='b', markersize=5)
ax1.autoscale(tight=True)
print('This should be different')
print(ax1.get_xticks()) # Should not be the same as the last print
plt.show()
This would be a problem if I now were to do:
ax2 = ax1.twiny()
ax2.set_xticks(ax1.get_xticks())
ax2.set_xticklabels(someFunction(ax1.get_xticks()))
Is this a problem with the tight=True option?
Do I have to manually set all the limits?
Cheers
Paul
From: Paul H. <pmh...@gm...> - 2013年11月23日 17:20:35
Hey Sourav,
This example should demonstrate the basics of setting xticks and xticklabels
http://matplotlib.org/examples/ticks_and_spines/ticklabels_demo_rotation.html
On Sat, Nov 23, 2013 at 4:27 AM, Sourav Chatterjee <sr...@gm...>wrote:
> Hi, I have simple xy plot using below.
>
> import matplotlib.pyplot as pl
>
> pl.plot([2005.8,2005.4,2005.2,2005,2004.9,2004.8,2004.7,2004.6,2004.5,2004.4,2004.3,2004.2,2004.1,2004],[33.2637,32.4243,58.271,89.3454,21.7372,31.6301,36.6301,13.117,31.6689,17.6246,7.4627,8.7094,5.782,6.3461],'ko-')
>
> pl.axis([2004,2005.8,0,100])
> pl.show()
>
> I want on my x-axis only the points specified in pl.plot. Is there any way?
> --
> thanks
> Sourav
>
>
> ------------------------------------------------------------------------------
> Shape the Mobile Experience: Free Subscription
> Software experts and developers: Be at the forefront of tech innovation.
> Intel(R) Software Adrenaline delivers strategic insight and game-changing
> conversations that shape the rapidly evolving mobile landscape. Sign up
> now.
> http://pubads.g.doubleclick.net/gampad/clk?id=63431311&iu=/4140/ostg.clktrk
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
>
From: Sourav C. <sr...@gm...> - 2013年11月23日 12:27:17
Hi, I have simple xy plot using below.
import matplotlib.pyplot as pl
pl.plot([2005.8,2005.4,2005.2,2005,2004.9,2004.8,2004.7,2004.6,2004.5,2004.4,2004.3,2004.2,2004.1,2004],[33.2637,32.4243,58.271,89.3454,21.7372,31.6301,36.6301,13.117,31.6689,17.6246,7.4627,8.7094,5.782,6.3461],'ko-')
pl.axis([2004,2005.8,0,100])
pl.show()
I want on my x-axis only the points specified in pl.plot. Is there any way?
-- 
thanks
Sourav
From: Grigoris M. <gr....@gm...> - 2013年11月23日 12:21:30
Hello!
I am creating a plot and I select the font type to be TrueType (by using 
rcParams['ps.fonttype'] = 42).
I am using this image later on in a tex file and when I am creating the 
pdf file I check for the font types and I see
name type emb sub uni object ID
[none] Type 3 yes no no 160 0
But if I comment the legend while making the plot then I do not get a 
Type 3 font.
Why is that? It seems that the fonttype does not apply to the legend (or 
am I missing something?).
Best
Grigoris
From: Russell E. O. <ro...@uw...> - 2013年11月22日 22:12:08
We have code that ran fine in 1.1.1 that raises an exception in colorbar 
in 1.2.1 and 1.3.1. I have appended an example; I'm afraid it is rather 
extreme, but we have seen this for arrays that have more than one 
non-masked values as well, even with the values not all being equal.
Should I report this as a bug? Should we guard all our calls to colormap 
with try/except, or perhaps there's a flag we can set that says "do your 
best"? (But I don't see anything like that in the docs).
-- Russell
 cmap = getattr(cm, cmap)
 cmap.set_bad('k', 0.2)
 if cmapOver is not None:
 cmap.set_over(cmapOver, 1.0)
 if cmapUnder is not None:
 cmap.set_under(cmapUnder, 1.0)
 p = PatchCollection(patches, norm=norm, cmap=cmap)
 value_array = numpy.array(values)
 masked_value_array = 
numpyMa.masked_where(numpy.isnan(value_array), value_array)
 p.set_array(masked_value_array)
 cb = self.fig.colorbar(p)
 File 
"/nfs/lsst/home/rowen/code/testing_pipeQA/python/lsst/testing/pipeQA/figu
res/FpaQaFigure.py", line 317, in makeFigure
 cb = self.fig.colorbar(p)
 File 
"/lsst/DC3/stacks/gcc445-RH6/28nov2011/Linux64/external/matplotlib/1.3.1+
1/lib/python/matplotlib-1.3.1-py2.7-linux-x86_64.egg/matplotlib/figure.py
", line 1451, in colorbar
 cb = cbar.colorbar_factory(cax, mappable, **kw)
 File 
"/lsst/DC3/stacks/gcc445-RH6/28nov2011/Linux64/external/matplotlib/1.3.1+
1/lib/python/matplotlib-1.3.1-py2.7-linux-x86_64.egg/matplotlib/colorbar.
py", line 1274, in colorbar_factory
 cb = Colorbar(cax, mappable, **kwargs)
 File 
"/lsst/DC3/stacks/gcc445-RH6/28nov2011/Linux64/external/matplotlib/1.3.1+
1/lib/python/matplotlib-1.3.1-py2.7-linux-x86_64.egg/matplotlib/colorbar.
py", line 877, in __init__
 ColorbarBase.__init__(self, ax, **kw)
 File 
"/lsst/DC3/stacks/gcc445-RH6/28nov2011/Linux64/external/matplotlib/1.3.1+
1/lib/python/matplotlib-1.3.1-py2.7-linux-x86_64.egg/matplotlib/colorbar.
py", line 317, in __init__
 self.draw_all()
 File 
"/lsst/DC3/stacks/gcc445-RH6/28nov2011/Linux64/external/matplotlib/1.3.1+
1/lib/python/matplotlib-1.3.1-py2.7-linux-x86_64.egg/matplotlib/colorbar.
py", line 342, in draw_all
 self._config_axes(X, Y)
 File 
"/lsst/DC3/stacks/gcc445-RH6/28nov2011/Linux64/external/matplotlib/1.3.1+
1/lib/python/matplotlib-1.3.1-py2.7-linux-x86_64.egg/matplotlib/colorbar.
py", line 433, in _config_axes
 self.update_ticks()
 File 
"/lsst/DC3/stacks/gcc445-RH6/28nov2011/Linux64/external/matplotlib/1.3.1+
1/lib/python/matplotlib-1.3.1-py2.7-linux-x86_64.egg/matplotlib/colorbar.
py", line 367, in update_ticks
 ticks, ticklabels, offset_string = self._ticker()
 File 
"/lsst/DC3/stacks/gcc445-RH6/28nov2011/Linux64/external/matplotlib/1.3.1+
1/lib/python/matplotlib-1.3.1-py2.7-linux-x86_64.egg/matplotlib/colorbar.
py", line 580, in _ticker
 ticks = self._locate(b)
 File 
"/lsst/DC3/stacks/gcc445-RH6/28nov2011/Linux64/external/matplotlib/1.3.1+
1/lib/python/matplotlib-1.3.1-py2.7-linux-x86_64.egg/matplotlib/colorbar.
py", line 829, in _locate
 z = np.take(y, i0) + (xn - np.take(b, i0)) * dy / db
FloatingPointError: invalid value encountered in divide
Where masked_value_array=[-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
-- -- -- -- -- -- -- -- -- --
 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
--
 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
--
 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
 0.7598040968345164 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
--
 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
--
 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
--]
From: Russell E. O. <ro...@uw...> - 2013年11月22日 22:01:12
In article <528...@st...>,
 Michael Droettboom <md...@st...> 
 wrote:
> When you use |--home|, distutils assumes you are referring to a home 
> directory in which you have a tree of libraries in |lib|lib64| living 
> there, so it appends |lib64/python| to the given path:
> 
> |> python setup.py install --home=/foo
> running install
> Checking .pth file supportin /foo/lib64/python/
> error: can't create or remove files in install directory|
> 
> So the issue is not that your PYTHONPATH doesn't contain 
> |/lsst/home/rowen/code/sandbox/Linux64/external/matplotlib/1.3.1+1| 
> (which it does) but that it doesn't contain 
> |/lsst/home/rowen/code/sandbox/Linux64/external/matplotlib/1.3.1+1/lib/python|
> |.
> 
> With matplotlib 1.2.1, we used raw distutils and not setuptools, which 
> does the same thing without the strict check. And that does allow users 
> to shoot themselves in the foot, since the check is in fact right when 
> it says things won't work:
> 
> |> git checkout v1.2.1
> > mkdir ~/foo
> > python setup.py install --home=~/foo
> ...
> > PYTHONPATH=~/foo python
> Python2.7.5 (default, Oct8 2013,12:19:40)
> [GCC4.8.1 20130603 (Red Hat4.8.1-1)] on linux2
> Type"help","copyright","credits" or "license" for more information.
> >>>import matplotlib
> Traceback (most recent call last):
> File"<stdin>", line1,in <module>
> ImportError: No module named matplotlib|
> 
> I think what you really want to use is |--install-lib|, which will 
> install the matplotlib library directly inside of the given path, which 
> (if it's also on the `PYTHONPATH`) it will work.
Thank you. That did it!
For the record, we do actually want the files in <path>/lib/python. So I 
fixed it by manually adding <path>/lib/python to PYTHONPATH before 
running the installer.
It would help if the error message showed which path was expected to be 
on the PYTHONPATH, but now that I know I'm happy.
-- Russell
From: Eric L. <lar...@gm...> - 2013年11月22日 19:56:52
Just wanted to let people know that I chased down the problem I was having.
The command I was using was working, but I wrongly assumed the coordinate
system was normalized for some reason. Doing things like:
fig.canvas.button_press_event(110, 240, 1, False, None)
works great!
Cheers,
Eric
On Thu, Nov 21, 2013 at 9:52 AM, Eric89GXL <lar...@gm...> wrote:
> Hello,
>
> I have some some matplotlib code that we use for interactive plotting, and
> I
> want to do non-interactive unit testing. This means I need to emulate
> keypresses and mouse clicks.
>
> It is simple enough to do keypress unit testing by using:
>
> fig.canvas.key_press_event('down')
>
> This for example allows us to test that pressing "down" in a figure window
> elicits the appropriate behavior.
>
> However, I am having difficulty testing mouse clicks. We have behaviors
> where users can click within an axis (e.g., fix.axes[1]) to elicit some
> behavior. I have tried the following:
>
> fig.canvas.button_press_event(0.5, 0.5, 1)
>
> But within the event handler (which generally has structure
> _mouse_click(event, params)), the "event" object does not have the
> "event.inaxes" field populated correctly (it is always "None") despite my
> emulated click @ (0.5, 0.5) sitting within one of the axes in the figure.
>
> Does anyone know how to emulate either of these types of clicks?
>
>
>
> --
> View this message in context:
> http://matplotlib.1069221.n5.nabble.com/Emulating-keypress-and-mouse-clicks-tp42534.html
> Sent from the matplotlib - users mailing list archive at Nabble.com.
>
>
> ------------------------------------------------------------------------------
> Shape the Mobile Experience: Free Subscription
> Software experts and developers: Be at the forefront of tech innovation.
> Intel(R) Software Adrenaline delivers strategic insight and game-changing
> conversations that shape the rapidly evolving mobile landscape. Sign up
> now.
> http://pubads.g.doubleclick.net/gampad/clk?id=63431311&iu=/4140/ostg.clktrk
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
From: Michael D. <md...@st...> - 2013年11月21日 22:44:36
When you use |--home|, distutils assumes you are referring to a home 
directory in which you have a tree of libraries in |lib|lib64| living 
there, so it appends |lib64/python| to the given path:
|> python setup.py install --home=/foo
running install
Checking .pth file supportin /foo/lib64/python/
error: can't create or remove files in install directory|
So the issue is not that your PYTHONPATH doesn't contain 
|/lsst/home/rowen/code/sandbox/Linux64/external/matplotlib/1.3.1+1| 
(which it does) but that it doesn't contain 
|/lsst/home/rowen/code/sandbox/Linux64/external/matplotlib/1.3.1+1/lib/python|.
With matplotlib 1.2.1, we used raw distutils and not setuptools, which 
does the same thing without the strict check. And that does allow users 
to shoot themselves in the foot, since the check is in fact right when 
it says things won't work:
|> git checkout v1.2.1
> mkdir ~/foo
> python setup.py install --home=~/foo
...
> PYTHONPATH=~/foo python
Python2.7.5 (default, Oct8 2013,12:19:40)
[GCC4.8.1 20130603 (Red Hat4.8.1-1)] on linux2
Type"help","copyright","credits" or "license" for more information.
>>>import matplotlib
Traceback (most recent call last):
 File"<stdin>", line1,in <module>
ImportError: No module named matplotlib|
I think what you really want to use is |--install-lib|, which will 
install the matplotlib library directly inside of the given path, which 
(if it's also on the `PYTHONPATH`) it will work.
Mike
On 11/21/2013 04:58 PM, Russell E. Owen wrote:
> I'm trying to install matplotlib from source in a specified location on
> a RedHat Enterprice Linux Server 6.4 box. The installation fails
> claiming that the installation directory is not on the PYTHONPATH, but
> that's wrong. See the appended log.
>
> Any idea how to get this to work? Matplotlib 1.2.1 installs just fine
> this way, but unfortunately I can't use it because I need horizontal
> histograms (a known bug that was fixed after 1.2.1).
>
> If I have to go all the way back to maplotlib 1.1.1 then does anyone
> know how old numpy has to be? I had hoped to use 1.8.0.
>
> -- Russell
>
> python setup.py install
> --home=/lsst/home/rowen/code/sandbox/Linux64/external/matplotlib/1.3.1+1
> python setup.py ...
>
> and your PYTHONPATH environment variable currently contains:
>
> 
> '/lsst/DC3/stacks/gcc445-RH6/28nov2011/Linux64/lssteups/6.2.0.0+1/python:
> /lsst/DC3/stacks/gcc445-RH6/28nov2011/Linux64/sconsUtils/6.2.0.0+1/python
> :/lsst/home/rowen/local/lib/python:/lsst/DC3/stacks/gcc445-RH6/28nov2011/
> eups/1.2.32/python:/lsst/DC3/stacks/gcc445-RH6/28nov2011/Linux64/external
> /numpy/1.8.0+1/lib/python:/lsst/home/rowen/code/sandbox/Linux64/external/
> matplotlib/1.3.1+1'
>
> Here are some of your options for correcting the problem:
>
> * You can choose a different installation directory, i.e., one that is
> on PYTHONPATH or supports .pth files
>
>
> ------------------------------------------------------------------------------
> Shape the Mobile Experience: Free Subscription
> Software experts and developers: Be at the forefront of tech innovation.
> Intel(R) Software Adrenaline delivers strategic insight and game-changing
> conversations that shape the rapidly evolving mobile landscape. Sign up now.
> http://pubads.g.doubleclick.net/gampad/clk?id=63431311&iu=/4140/ostg.clktrk
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
-- 
 _
|\/|o _|_ _. _ | | \.__ __|__|_|_ _ _ ._ _
| ||(_| |(_|(/_| |_/|(_)(/_|_ |_|_)(_)(_)| | |
http://www.droettboom.com
From: Russell E. O. <ro...@uw...> - 2013年11月21日 21:58:31
I'm trying to install matplotlib from source in a specified location on 
a RedHat Enterprice Linux Server 6.4 box. The installation fails 
claiming that the installation directory is not on the PYTHONPATH, but 
that's wrong. See the appended log.
Any idea how to get this to work? Matplotlib 1.2.1 installs just fine 
this way, but unfortunately I can't use it because I need horizontal 
histograms (a known bug that was fixed after 1.2.1).
If I have to go all the way back to maplotlib 1.1.1 then does anyone 
know how old numpy has to be? I had hoped to use 1.8.0.
-- Russell
python setup.py install 
--home=/lsst/home/rowen/code/sandbox/Linux64/external/matplotlib/1.3.1+1
python setup.py ...
and your PYTHONPATH environment variable currently contains:
 
'/lsst/DC3/stacks/gcc445-RH6/28nov2011/Linux64/lssteups/6.2.0.0+1/python:
/lsst/DC3/stacks/gcc445-RH6/28nov2011/Linux64/sconsUtils/6.2.0.0+1/python
:/lsst/home/rowen/local/lib/python:/lsst/DC3/stacks/gcc445-RH6/28nov2011/
eups/1.2.32/python:/lsst/DC3/stacks/gcc445-RH6/28nov2011/Linux64/external
/numpy/1.8.0+1/lib/python:/lsst/home/rowen/code/sandbox/Linux64/external/
matplotlib/1.3.1+1'
Here are some of your options for correcting the problem:
* You can choose a different installation directory, i.e., one that is
 on PYTHONPATH or supports .pth files
From: Eric F. <ef...@ha...> - 2013年11月21日 19:40:39
On 2013年11月21日 8:45 AM, Eric Larson wrote:
> Hey Luis,
>
> I think in general the application of normalizations in DFT / FFT (or
> even the continuous transforms, for that matter) can vary from
> implementation to another, in terms of whether they're applied during
> the forward transform, inverse transform, or half on each. That sounds
> like what you're running into here. MATLAB and other packages (FFTW, and
> apparently whatever matplotlib uses internally for FFTs) tend to
> normalize during the inverse transform, so you would need to put the
> normalization in yourself to see Parseval's theorem work out, which is
> essentially what you're showing.
>
It is not a matter of how the FFT is normalized, but rather of whether 
one is calculating a power spectrum, or power spectral density (psd).
For example, see:
http://pubman.mpdl.mpg.de/pubman/item/escidoc:152164:1/component/escidoc:152163/395068.pdf
> To my mind, this isn't a bug, so much as something users should be made
> aware of so they understand the issues at stake. It would be good to add
> a note to the PSD computation about these normalization issues, assuming
> one doesn't already exist. I have not contributed to matplotlib before,
> but I'm happy to take a stab at this if people think it would be
> helpful. My guess is that matplotlib won't be changed to include the
> suggested normalization by default (but maybe it could be added as an
> option?) because this would break backward-compatibility for users that
> have taken this factor into account in their own code.
I think the mpl psd is consistent with other psd implementations and 
with the definition of the psd.
Eric
>
> Eric
>
>
>
> On Thu, Nov 21, 2013 at 10:30 AM, Luis Miguel García-Cuevas González
> <lui...@gm... <mailto:lui...@gm...>> wrote:
>
> Hello!
>
> I have a doubt about the way matplotlib computes (and plots) a psd.
> I have
> the following example code (I've imported pylab for convenience here):
>
> from pylab import *
>
> A = 10. ** (10. / 20.) / sqrt(2.) * 2. # This amplitude should
> give 10 dB
> frequency = 5.
> sampling_frequency = 1000.
> t_max = 12.
> t = arange(0., t_max, 1. / sampling_frequency)
> x = A * cos(2. * pi * frequency * t)
>
> Pxx, freqs = mlab.psd(x, Fs=sampling_frequency, NFFT=len(x),
> window=mlab.window_none)
>
> dB_actual = 20. * log10(rms_flat(x)) # dB_actual = 10., as expected
> dB_psd = 10. * log10(Pxx.max()) # dB_psd = 20.791812460476248
>
>
> As I understand, this should not happen this way. dB_psd should be
> equal to
> 10, as dB_actual. I can get it to compute the correct value with this:
>
> Pxx, freqs = mlab.psd(x / sqrt(t_max), Fs=sampling_frequency,
> NFFT=len(x),
> window=mlab.window_none)
>
> (i.e., dividing the variable by the square root of the time). Is
> this really
> the expected behavior or this is a bug?
>
> If it does matter, I'm using using matplotlib 1.3.1.
>
> Thanks for your help!
>
> --
> Luis Miguel García-Cuevas González
>
> ------------------------------------------------------------------------------
> Shape the Mobile Experience: Free Subscription
> Software experts and developers: Be at the forefront of tech innovation.
> Intel(R) Software Adrenaline delivers strategic insight and
> game-changing
> conversations that shape the rapidly evolving mobile landscape. Sign
> up now.
> http://pubads.g.doubleclick.net/gampad/clk?id=63431311&iu=/4140/ostg.clktrk
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> <mailto:Mat...@li...>
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
>
>
>
> ------------------------------------------------------------------------------
> Shape the Mobile Experience: Free Subscription
> Software experts and developers: Be at the forefront of tech innovation.
> Intel(R) Software Adrenaline delivers strategic insight and game-changing
> conversations that shape the rapidly evolving mobile landscape. Sign up now.
> http://pubads.g.doubleclick.net/gampad/clk?id=63431311&iu=/4140/ostg.clktrk
>
>
>
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
From: Eric L. <lar...@gm...> - 2013年11月21日 18:46:19
Hey Luis,
I think in general the application of normalizations in DFT / FFT (or even
the continuous transforms, for that matter) can vary from implementation to
another, in terms of whether they're applied during the forward transform,
inverse transform, or half on each. That sounds like what you're running
into here. MATLAB and other packages (FFTW, and apparently whatever
matplotlib uses internally for FFTs) tend to normalize during the inverse
transform, so you would need to put the normalization in yourself to see
Parseval's theorem work out, which is essentially what you're showing.
To my mind, this isn't a bug, so much as something users should be made
aware of so they understand the issues at stake. It would be good to add a
note to the PSD computation about these normalization issues, assuming one
doesn't already exist. I have not contributed to matplotlib before, but I'm
happy to take a stab at this if people think it would be helpful. My guess
is that matplotlib won't be changed to include the suggested normalization
by default (but maybe it could be added as an option?) because this would
break backward-compatibility for users that have taken this factor into
account in their own code.
Eric
On Thu, Nov 21, 2013 at 10:30 AM, Luis Miguel García-Cuevas González <
lui...@gm...> wrote:
> Hello!
>
> I have a doubt about the way matplotlib computes (and plots) a psd. I have
> the following example code (I've imported pylab for convenience here):
>
> from pylab import *
>
> A = 10. ** (10. / 20.) / sqrt(2.) * 2. # This amplitude should give 10 dB
> frequency = 5.
> sampling_frequency = 1000.
> t_max = 12.
> t = arange(0., t_max, 1. / sampling_frequency)
> x = A * cos(2. * pi * frequency * t)
>
> Pxx, freqs = mlab.psd(x, Fs=sampling_frequency, NFFT=len(x),
> window=mlab.window_none)
>
> dB_actual = 20. * log10(rms_flat(x)) # dB_actual = 10., as expected
> dB_psd = 10. * log10(Pxx.max()) # dB_psd = 20.791812460476248
>
>
> As I understand, this should not happen this way. dB_psd should be equal
> to
> 10, as dB_actual. I can get it to compute the correct value with this:
>
> Pxx, freqs = mlab.psd(x / sqrt(t_max), Fs=sampling_frequency,
> NFFT=len(x),
> window=mlab.window_none)
>
> (i.e., dividing the variable by the square root of the time). Is this
> really
> the expected behavior or this is a bug?
>
> If it does matter, I'm using using matplotlib 1.3.1.
>
> Thanks for your help!
>
> --
> Luis Miguel García-Cuevas González
>
>
> ------------------------------------------------------------------------------
> Shape the Mobile Experience: Free Subscription
> Software experts and developers: Be at the forefront of tech innovation.
> Intel(R) Software Adrenaline delivers strategic insight and game-changing
> conversations that shape the rapidly evolving mobile landscape. Sign up
> now.
> http://pubads.g.doubleclick.net/gampad/clk?id=63431311&iu=/4140/ostg.clktrk
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
>
From: Luis M. García-C. G. <lui...@gm...> - 2013年11月21日 18:30:37
Attachments: signature.asc
Hello!
I have a doubt about the way matplotlib computes (and plots) a psd. I have 
the following example code (I've imported pylab for convenience here):
 from pylab import *
 A = 10. ** (10. / 20.) / sqrt(2.) * 2. # This amplitude should give 10 dB
 frequency = 5.
 sampling_frequency = 1000.
 t_max = 12.
 t = arange(0., t_max, 1. / sampling_frequency)
 x = A * cos(2. * pi * frequency * t)
 Pxx, freqs = mlab.psd(x, Fs=sampling_frequency, NFFT=len(x),
 window=mlab.window_none)
 dB_actual = 20. * log10(rms_flat(x)) # dB_actual = 10., as expected
 dB_psd = 10. * log10(Pxx.max()) # dB_psd = 20.791812460476248
As I understand, this should not happen this way. dB_psd should be equal to 
10, as dB_actual. I can get it to compute the correct value with this:
 Pxx, freqs = mlab.psd(x / sqrt(t_max), Fs=sampling_frequency, NFFT=len(x),
 window=mlab.window_none)
(i.e., dividing the variable by the square root of the time). Is this really 
the expected behavior or this is a bug?
If it does matter, I'm using using matplotlib 1.3.1.
Thanks for your help!
-- 
Luis Miguel García-Cuevas González
From: Eric89GXL <lar...@gm...> - 2013年11月21日 17:53:04
Hello,
I have some some matplotlib code that we use for interactive plotting, and I
want to do non-interactive unit testing. This means I need to emulate
keypresses and mouse clicks. 
It is simple enough to do keypress unit testing by using:
fig.canvas.key_press_event('down')
This for example allows us to test that pressing "down" in a figure window
elicits the appropriate behavior.
However, I am having difficulty testing mouse clicks. We have behaviors
where users can click within an axis (e.g., fix.axes[1]) to elicit some
behavior. I have tried the following:
fig.canvas.button_press_event(0.5, 0.5, 1)
But within the event handler (which generally has structure
_mouse_click(event, params)), the "event" object does not have the
"event.inaxes" field populated correctly (it is always "None") despite my
emulated click @ (0.5, 0.5) sitting within one of the axes in the figure.
Does anyone know how to emulate either of these types of clicks?
--
View this message in context: http://matplotlib.1069221.n5.nabble.com/Emulating-keypress-and-mouse-clicks-tp42534.html
Sent from the matplotlib - users mailing list archive at Nabble.com.
From: Gavin C. <why...@gm...> - 2013年11月21日 13:34:11
Hi,
I've been using the two chart types shown here:
https://github.com/whythawk/whiqicharts for a few years and finally got
round to sharing them.
I'm interested in presenting multiple, and multiple-dimension, time-series
data in ways that are easy to see, repeatable and printable. The comet
charts, for example, are a static version of Hans Rosling's Gapminder moving
bubble charts.
This is my first ever attempt at Github / open source release so would
appreciate the feedback. Originally these were embedded in Django views
hence any fruity use of the Artist.
Regards
Gavin
>--------------------<
Gavin Chait is a data engineer and development economist at Whythawk.
uk.linkedin.com/in/gavinchait | twitter.com/GavinChait | www.whythawk.com

Showing results of 83

1 2 3 4 > >> (Page 1 of 4)
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 によって変換されたページ (->オリジナル) /