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




Showing 13 results of 13

From: Tony Yu <ts...@gm...> - 2012年07月10日 21:37:38
On Tue, Jul 10, 2012 at 1:52 PM, John Hunter <jd...@gm...> wrote:
>
> On Tue, Jul 10, 2012 at 12:49 PM, Damon McDougall <
> dam...@gm...> wrote:
>
>>
>> Would there be any interest in porting some of that functionality into
>> the main mpl codebase? Like Ben said, that error function is nifty... :)
>>
>>
>
> I also think the styles would be widely appreciated, and we might get more
> styles contributors if it was part of the mainline. We'd ideally like to
> be able to support remote styles, eg via gist.
>
> Nice stuff, Tony.
>
>
Damon and John: Thanks for your interest. I would be happy to help port
anything that can find a home in Matplotlib. I'm low on bandwidth, so if
I'm too slow with any of it, feel free to grab the code and submit your own
PR for the port (just let me know so we don't duplicate our efforts).
As for porting the stylesheet implementation: Currently, the style files
must be ConfigObj-readable files (which has a different syntax than
matplotlibrc files). I've been planning to rewrite the implementation to
 use either file-type, but it may be best to just leave things as-is in
mpltools, and create a matplotlib PR that uses matplotlibrc-style files.
Right now, matplotlib's rc-machinery is not easily reusable: I would want
to wait until after PR 861, which helps a bit:
 https://github.com/matplotlib/matplotlib/pull/861
There may need to be some more refactoring on that front before styles are
added to the mainline, but I'm happy to help.
Cheers,
-Tony
From: John H. <jd...@gm...> - 2012年07月10日 17:53:08
On Tue, Jul 10, 2012 at 12:49 PM, Damon McDougall <dam...@gm...
> wrote:
>
> Would there be any interest in porting some of that functionality into
> the main mpl codebase? Like Ben said, that error function is nifty... :)
>
>
I also think the styles would be widely appreciated, and we might get more
styles contributors if it was part of the mainline. We'd ideally like to
be able to support remote styles, eg via gist.
Nice stuff, Tony.
From: Damon M. <dam...@gm...> - 2012年07月10日 17:50:13
On Tue, Jul 10, 2012 at 01:44:41PM -0400, Tony Yu wrote:
> On Tue, Jul 10, 2012 at 1:10 PM, Benjamin Root <ben...@ou...> wrote:
> 
> >
> >
> > On Tue, Jul 10, 2012 at 12:58 PM, Tony Yu <ts...@gm...> wrote:
> >
> >> Announcement: mpltools 0.1
> >> ==========================
> >>
> >> mpltools is a package of tools for matplotlib. For the most part, these
> >> tools are only loosely-connected in functionality, but there are two that
> >> may prove particularly useful:
> >>
> >> Styles and plot2rst
> >> -------------------
> >>
> >> The `style` package provides a simple way to define and reuse
> >> matplotlibrc-like config files. For example, there's an included style that
> >> mimics R's plotting package, ggplot. You can use this style by calling::
> >>
> >> from mpltools import style
> >> style.use('ggplot')
> >>
> >> (Thanks to Huy Nguyen for these settings.)
> >>
> >> The second tool of note is `plot2rst`, which provides a simple way to
> >> generate (Sphinx-flavored) reStructuredText examples from normal python
> >> files. See the Getting Started page and `plot2rst` example for details:
> >>
> >> http://tonysyu.github.com/mpltools/getting_started.html
> >>
> >> http://tonysyu.github.com/mpltools/auto_examples/sphinx/plot_plot2rst.html
> >>
> >>
> >> Other tools
> >> -----------
> >>
> >> This package provides other tools for tweaking colors, layouts, etc. The
> >> easiest way to get started is to look at the example gallery:
> >>
> >> http://tonysyu.github.com/mpltools/auto_examples/index.html
> >>
> >>
> >> Download
> >> --------
> >>
> >> You can grab the 0.1 release on PyPI:
> >>
> >> http://pypi.python.org/pypi/mpltools/0.1
> >>
> >> or clone the repo on github:
> >>
> >> https://github.com/tonysyu/mpltools.git
> >>
> >>
> >> Contributors
> >> ------------
> >>
> >> Thanks the following people for reporting bugs and contributing fixes and
> >> enhancements:
> >>
> >> - Alex Arsenovic
> >> - Guillaume Calmettes
> >> - Huy Nguyen
> >> - Sergey Karayev
> >>
> >> Special thanks to Alex, who came up with an early implementation of
> >> stylesheets that started me down this path.
> >>
> >>
> > Neat work, Tony! I especially like the errorfill feature:
> > http://tonysyu.github.com/mpltools/auto_examples/special/plot_errorfill.html#example-special-plot-errorfill-py
> >
> > Ben Root
> >
> >
> Thanks Ben! Like a lot of things in the package, that's a fairly simple
> function, but I just wanted a simple interface to do it.
> 
> Cheers,
> -Tony
Would there be any interest in porting some of that functionality into
the main mpl codebase? Like Ben said, that error function is nifty... :)
-- 
Damon McDougall
http://damon-is-a-geek.com
B2.39
Mathematics Institute
University of Warwick
Coventry
West Midlands
CV4 7AL
United Kingdom
From: Tony Yu <ts...@gm...> - 2012年07月10日 17:45:31
On Tue, Jul 10, 2012 at 1:10 PM, Benjamin Root <ben...@ou...> wrote:
>
>
> On Tue, Jul 10, 2012 at 12:58 PM, Tony Yu <ts...@gm...> wrote:
>
>> Announcement: mpltools 0.1
>> ==========================
>>
>> mpltools is a package of tools for matplotlib. For the most part, these
>> tools are only loosely-connected in functionality, but there are two that
>> may prove particularly useful:
>>
>> Styles and plot2rst
>> -------------------
>>
>> The `style` package provides a simple way to define and reuse
>> matplotlibrc-like config files. For example, there's an included style that
>> mimics R's plotting package, ggplot. You can use this style by calling::
>>
>> from mpltools import style
>> style.use('ggplot')
>>
>> (Thanks to Huy Nguyen for these settings.)
>>
>> The second tool of note is `plot2rst`, which provides a simple way to
>> generate (Sphinx-flavored) reStructuredText examples from normal python
>> files. See the Getting Started page and `plot2rst` example for details:
>>
>> http://tonysyu.github.com/mpltools/getting_started.html
>>
>> http://tonysyu.github.com/mpltools/auto_examples/sphinx/plot_plot2rst.html
>>
>>
>> Other tools
>> -----------
>>
>> This package provides other tools for tweaking colors, layouts, etc. The
>> easiest way to get started is to look at the example gallery:
>>
>> http://tonysyu.github.com/mpltools/auto_examples/index.html
>>
>>
>> Download
>> --------
>>
>> You can grab the 0.1 release on PyPI:
>>
>> http://pypi.python.org/pypi/mpltools/0.1
>>
>> or clone the repo on github:
>>
>> https://github.com/tonysyu/mpltools.git
>>
>>
>> Contributors
>> ------------
>>
>> Thanks the following people for reporting bugs and contributing fixes and
>> enhancements:
>>
>> - Alex Arsenovic
>> - Guillaume Calmettes
>> - Huy Nguyen
>> - Sergey Karayev
>>
>> Special thanks to Alex, who came up with an early implementation of
>> stylesheets that started me down this path.
>>
>>
> Neat work, Tony! I especially like the errorfill feature:
> http://tonysyu.github.com/mpltools/auto_examples/special/plot_errorfill.html#example-special-plot-errorfill-py
>
> Ben Root
>
>
Thanks Ben! Like a lot of things in the package, that's a fairly simple
function, but I just wanted a simple interface to do it.
Cheers,
-Tony
From: Benjamin R. <ben...@ou...> - 2012年07月10日 17:11:01
On Tue, Jul 10, 2012 at 12:58 PM, Tony Yu <ts...@gm...> wrote:
> Announcement: mpltools 0.1
> ==========================
>
> mpltools is a package of tools for matplotlib. For the most part, these
> tools are only loosely-connected in functionality, but there are two that
> may prove particularly useful:
>
> Styles and plot2rst
> -------------------
>
> The `style` package provides a simple way to define and reuse
> matplotlibrc-like config files. For example, there's an included style that
> mimics R's plotting package, ggplot. You can use this style by calling::
>
> from mpltools import style
> style.use('ggplot')
>
> (Thanks to Huy Nguyen for these settings.)
>
> The second tool of note is `plot2rst`, which provides a simple way to
> generate (Sphinx-flavored) reStructuredText examples from normal python
> files. See the Getting Started page and `plot2rst` example for details:
>
> http://tonysyu.github.com/mpltools/getting_started.html
>
> http://tonysyu.github.com/mpltools/auto_examples/sphinx/plot_plot2rst.html
>
>
> Other tools
> -----------
>
> This package provides other tools for tweaking colors, layouts, etc. The
> easiest way to get started is to look at the example gallery:
>
> http://tonysyu.github.com/mpltools/auto_examples/index.html
>
>
> Download
> --------
>
> You can grab the 0.1 release on PyPI:
>
> http://pypi.python.org/pypi/mpltools/0.1
>
> or clone the repo on github:
>
> https://github.com/tonysyu/mpltools.git
>
>
> Contributors
> ------------
>
> Thanks the following people for reporting bugs and contributing fixes and
> enhancements:
>
> - Alex Arsenovic
> - Guillaume Calmettes
> - Huy Nguyen
> - Sergey Karayev
>
> Special thanks to Alex, who came up with an early implementation of
> stylesheets that started me down this path.
>
>
Neat work, Tony! I especially like the errorfill feature:
http://tonysyu.github.com/mpltools/auto_examples/special/plot_errorfill.html#example-special-plot-errorfill-py
Ben Root
From: Tony Yu <ts...@gm...> - 2012年07月10日 16:59:07
Announcement: mpltools 0.1
==========================
mpltools is a package of tools for matplotlib. For the most part, these
tools are only loosely-connected in functionality, but there are two that
may prove particularly useful:
Styles and plot2rst
-------------------
The `style` package provides a simple way to define and reuse
matplotlibrc-like config files. For example, there's an included style that
mimics R's plotting package, ggplot. You can use this style by calling::
 from mpltools import style
 style.use('ggplot')
(Thanks to Huy Nguyen for these settings.)
The second tool of note is `plot2rst`, which provides a simple way to
generate (Sphinx-flavored) reStructuredText examples from normal python
files. See the Getting Started page and `plot2rst` example for details:
 http://tonysyu.github.com/mpltools/getting_started.html
http://tonysyu.github.com/mpltools/auto_examples/sphinx/plot_plot2rst.html
Other tools
-----------
This package provides other tools for tweaking colors, layouts, etc. The
easiest way to get started is to look at the example gallery:
 http://tonysyu.github.com/mpltools/auto_examples/index.html
Download
--------
You can grab the 0.1 release on PyPI:
 http://pypi.python.org/pypi/mpltools/0.1
or clone the repo on github:
 https://github.com/tonysyu/mpltools.git
Contributors
------------
Thanks the following people for reporting bugs and contributing fixes and
enhancements:
- Alex Arsenovic
- Guillaume Calmettes
- Huy Nguyen
- Sergey Karayev
Special thanks to Alex, who came up with an early implementation of
stylesheets that started me down this path.
From: Fabien L. <laf...@gm...> - 2012年07月10日 13:21:49
Thanks! The problem came from the 1/2 ! For convenience I've found the
function digamma on numpy
*http://docs.scipy.org/doc/scipy/reference/generated/scipy.special.psi.html
But it's quite hard to find it! Maybe we can ask to add digamma in the
title between parenthesis?
Fabien
*
2012年7月10日 Damon McDougall <dam...@gm...>
> On Tue, Jul 10, 2012 at 08:57:24AM -0400, Benjamin Root wrote:
> > On Tue, Jul 10, 2012 at 7:05 AM, Damon McDougall
> > <dam...@gm...>wrote:
> >
> > > On Tue, Jul 10, 2012 at 12:27:59PM +0200, Fabien Lafont wrote:
> > >
> > > > But It returns zero division error even when x is in ]0,1]
> > >
> > > I think it blows up at x = 0. What is the type of x in your usecase? Is
> > > it an array? If x contains the element 0, you will get a zero
> > > division error. You could try plotting the points explicitly:
> > >
> > Another problem might be the "1/2" part, which in python2.x would yield 0
> > unless one does "from __future__ import division".
> >
> > Ben Root
>
> Wow, I can't believe I didn't spot that. Nice one.
>
> I will update my answer according to Ben's astute observation:
>
> from scipy import special
> from pylab import *
>
> x = linspace(0.5, 2.0, num=100, endpoint=True)
> y = special.polygamma(0, 0.5 + 1.0/x)
> plot(x, y)
> show()
>
> Thanks Ben.
>
> --
> Damon McDougall
> http://damon-is-a-geek.com
> B2.39
> Mathematics Institute
> University of Warwick
> Coventry
> West Midlands
> CV4 7AL
> United Kingdom
>
From: Damon M. <dam...@gm...> - 2012年07月10日 13:02:40
On Tue, Jul 10, 2012 at 08:57:24AM -0400, Benjamin Root wrote:
> On Tue, Jul 10, 2012 at 7:05 AM, Damon McDougall
> <dam...@gm...>wrote:
> 
> > On Tue, Jul 10, 2012 at 12:27:59PM +0200, Fabien Lafont wrote:
> >
> > > But It returns zero division error even when x is in ]0,1]
> >
> > I think it blows up at x = 0. What is the type of x in your usecase? Is
> > it an array? If x contains the element 0, you will get a zero
> > division error. You could try plotting the points explicitly:
> >
> Another problem might be the "1/2" part, which in python2.x would yield 0
> unless one does "from __future__ import division".
> 
> Ben Root
Wow, I can't believe I didn't spot that. Nice one.
I will update my answer according to Ben's astute observation:
from scipy import special
from pylab import *
x = linspace(0.5, 2.0, num=100, endpoint=True)
y = special.polygamma(0, 0.5 + 1.0/x)
plot(x, y)
show()
Thanks Ben.
-- 
Damon McDougall
http://damon-is-a-geek.com
B2.39
Mathematics Institute
University of Warwick
Coventry
West Midlands
CV4 7AL
United Kingdom
From: Benjamin R. <ben...@ou...> - 2012年07月10日 12:58:02
On Tue, Jul 10, 2012 at 7:05 AM, Damon McDougall
<dam...@gm...>wrote:
> On Tue, Jul 10, 2012 at 12:27:59PM +0200, Fabien Lafont wrote:
> > Hello everyone,
> >
> > I try to plot the digamma function of (1/2 + 1/x) but I'm not sure that
> I'm
> > plotting the good one.
> >
> > I've tried:
> >
> > special.polygamma(0, (1/2 + 1/x))
> >
> > and
> >
> > special.polygamma(1, (1/2 + 1/x))
>
> You want special.polygamma(0, (1/2 + 1/x)). See
>
> http://docs.scipy.org/doc/scipy/reference/generated/scipy.special.polygamma.html
>
> The number specifies which derivative of the digamma function you want.
> Surely you want the 0th derivative?
>
> > But It returns zero division error even when x is in ]0,1]
>
> I think it blows up at x = 0. What is the type of x in your usecase? Is
> it an array? If x contains the element 0, you will get a zero
> division error. You could try plotting the points explicitly:
>
> from numpy import linspace
> from pylab import *
>
> x = linspace(0.5, 2, num=100, endpoint=True)
> y = special.polygamma(0, (1/2 + 1/x))
> plot(x, y)
> show()
>
> You can compare output against this:
>
> http://www.wolframalpha.com/input/?i=digamma%281%2F2+%2B+1%2Fx%29+between+0.5+and+2
>
> Hope this helps.
>
>
Another problem might be the "1/2" part, which in python2.x would yield 0
unless one does "from __future__ import division".
Ben Root
From: Damon M. <dam...@gm...> - 2012年07月10日 11:05:14
On Tue, Jul 10, 2012 at 12:27:59PM +0200, Fabien Lafont wrote:
> Hello everyone,
> 
> I try to plot the digamma function of (1/2 + 1/x) but I'm not sure that I'm
> plotting the good one.
> 
> I've tried:
> 
> special.polygamma(0, (1/2 + 1/x))
> 
> and
> 
> special.polygamma(1, (1/2 + 1/x))
You want special.polygamma(0, (1/2 + 1/x)). See
http://docs.scipy.org/doc/scipy/reference/generated/scipy.special.polygamma.html
The number specifies which derivative of the digamma function you want.
Surely you want the 0th derivative?
> But It returns zero division error even when x is in ]0,1]
I think it blows up at x = 0. What is the type of x in your usecase? Is
it an array? If x contains the element 0, you will get a zero
division error. You could try plotting the points explicitly:
from numpy import linspace
from pylab import *
x = linspace(0.5, 2, num=100, endpoint=True)
y = special.polygamma(0, (1/2 + 1/x))
plot(x, y)
show()
You can compare output against this:
http://www.wolframalpha.com/input/?i=digamma%281%2F2+%2B+1%2Fx%29+between+0.5+and+2
Hope this helps.
-- 
Damon McDougall
http://damon-is-a-geek.com
B2.39
Mathematics Institute
University of Warwick
Coventry
West Midlands
CV4 7AL
United Kingdom
From: Fabien L. <laf...@gm...> - 2012年07月10日 10:28:05
Hello everyone,
I try to plot the digamma function of (1/2 + 1/x) but I'm not sure that I'm
plotting the good one.
I've tried:
special.polygamma(0, (1/2 + 1/x))
and
special.polygamma(1, (1/2 + 1/x))
but I don't have the same result as with mathcad.
I've tried to code it like that:
def F(x): return mpmath.diff(lambda x: gamma(1/2 + 1/x),1)/gamma(1/2 + 1/x)
But It returns zero division error even when x is in ]0,1]
Any idea?
Hi Ben,
I tried it. Installing the development version is much easier than I
expect.
and the subplots() function works very well as expect. it's too awesome.
thanks a lot.
cheers,
Chao
2012年7月7日 Benjamin Root <ben...@ou...>
>
>
> On Fri, Jul 6, 2012 at 5:39 PM, Chao YUE <cha...@gm...> wrote:
>
>> dear all,
>>
>> I want to build a 5X3 subplots matrix that I want the xaxis is shared
>> only on the same column and yaxis shared only on the same row.
>> While using plt.subplots(5,3,sharex=True, sharey=True) will put all
>> subplots as both shared xaxis and yaxis.
>>
>> The other option is to do like this to create 2X2 subplots with desired
>> feature, Yet I guess doing the same for 5X3 subplots could be tedious?
>> Does anyone has some idea?
>> fig=figure()
>> ax1=fig.add_subplot(221)
>> ax2=fig.add_subplot(222,sharey=ax1)
>> ax3=fig.add_subplot(223,sharex=ax1)
>> ax4=fig.add_subplot(224,sharex=ax2,sharey=ax3)
>>
>> Thanks a lot et cheers,
>>
>> Chao
>>
>>
> Chao,
>
> Such a feature is not in any of the current releases, (although it can be
> done manually, but it is tedious). However, in the development branch, the
> subplots() function now accepts strings of "row", "col", "all", or "none"
> for both the sharex and sharey kwargs. So, for you, you can call
> subplots() with sharex="col" and sharey="row" to get what you want. This
> will also have a side-effect of having the y-tick labels show up only on
> the first column and the x-tick labels show up only on the last row. This
> is a new feature, so bug reports would be welcomed!
>
> Cheers!
> Ben Root
>
>
-- 
***********************************************************************************
Chao YUE
Laboratoire des Sciences du Climat et de l'Environnement (LSCE-IPSL)
UMR 1572 CEA-CNRS-UVSQ
Batiment 712 - Pe 119
91191 GIF Sur YVETTE Cedex
Tel: (33) 01 69 08 29 02; Fax:01.69.08.77.16
************************************************************************************
From: Arek K. <ake...@ya...> - 2012年07月10日 03:59:41

Showing 13 results of 13

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