[matplotlib-devel] bug in plot_basedir and changed default directory in plot_directive?

2011-05-31 Thread Skipper Seabold
It seems that this commit [1] changed the default directory for the
sphinx plots directory (now needs to be alongside the directive and
not in the directory above it?) and now our project's docs will not
build across different versions of matplotlib without some magic. So I
tried setting

from os.path import dirname, abspath
plot_basedir = dirname(dirname(abspath(__file__)))

in our sphinx conf.py. We have source/conf.py and plots/ is in the
parent directory of source for the directive plot::
plots/some_file.py.  However, now I get this error [2] and this
traceback [3]. It seems the build/plot_directive folder is created
before a subsequent call to os.makedir. If I move plots to its
expected default location and then set the plot_basedir manually it's
fine. Is this a bug or user error? Is there some reason our plots
directory can't be in the parent directory of source?

[1] 
https://github.com/matplotlib/matplotlib/commit/a205f5460f13d47aa5b5fad662005c382dd096ee
[2] http://pastebin.com/KQp11CiS
[3] http://pastebin.com/4LY1Pt1Q

Skipper

--
Simplify data backup and recovery for your virtual environment with vRanger. 
Installation's a snap, and flexible recovery options mean your data is safe,
secure and there when you need it. Data protection magic?
Nope - It's vRanger. Get your free trial download today. 
http://p.sf.net/sfu/quest-sfdev2dev
___
Matplotlib-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


[matplotlib-devel] bug in pyplot.subplot if squeeze is False

2011-05-31 Thread Skipper Seabold
I filed a bug report here [1]. If squeeze is false, ret never gets defined.

https://github.com/matplotlib/matplotlib/blob/master/lib/matplotlib/pyplot.py#L794

Skipper

[1] 
https://sourceforge.net/tracker/?func=detail&aid=3309967&group_id=80706&atid=560720

PS. Should I ping the user or devel list with bug reports (or neither)?

--
Simplify data backup and recovery for your virtual environment with vRanger. 
Installation's a snap, and flexible recovery options mean your data is safe,
secure and there when you need it. Data protection magic?
Nope - It's vRanger. Get your free trial download today. 
http://p.sf.net/sfu/quest-sfdev2dev
___
Matplotlib-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] bug in plot_basedir and changed default directory in plot_directive?

2011-06-02 Thread Skipper Seabold
On Tue, May 31, 2011 at 9:18 PM, Skipper Seabold  wrote:
> It seems that this commit [1] changed the default directory for the
> sphinx plots directory (now needs to be alongside the directive and
> not in the directory above it?) and now our project's docs will not
> build across different versions of matplotlib without some magic. So I
> tried setting
>
> from os.path import dirname, abspath
> plot_basedir = dirname(dirname(abspath(__file__)))
>
> in our sphinx conf.py. We have source/conf.py and plots/ is in the
> parent directory of source for the directive plot::
> plots/some_file.py.  However, now I get this error [2] and this
> traceback [3]. It seems the build/plot_directive folder is created
> before a subsequent call to os.makedir. If I move plots to its
> expected default location and then set the plot_basedir manually it's
> fine. Is this a bug or user error? Is there some reason our plots
> directory can't be in the parent directory of source?
>
> [1] 
> https://github.com/matplotlib/matplotlib/commit/a205f5460f13d47aa5b5fad662005c382dd096ee
> [2] http://pastebin.com/KQp11CiS
> [3] http://pastebin.com/4LY1Pt1Q
>
> Skipper
>

Ok, there were two things going on here. First, when build_dir is
created it is joined with a relative path that will include '..' if
necessary. matplotlib.cbook.mkdirs does not handle this correctly, but
os.makedirs does. Is there a good reason to keep cbook.mkdirs? This
problem could also be solved with a call to os.path.normpath, which is
needed for the next issue anyway.

Second, since we call our source folder plots, there is a conflict
when trying to copy it over at the end to the destination directory.

This commit adds a call to os.path.normpath, replaces cbook.mkdirs
with os.makedirs, and only copies the plots to the destination
directory if there's a need.

https://github.com/matplotlib/matplotlib/pull/132

Skipper

--
Simplify data backup and recovery for your virtual environment with vRanger.
Installation's a snap, and flexible recovery options mean your data is safe,
secure and there when you need it. Discover what all the cheering's about.
Get your free trial download today. 
http://p.sf.net/sfu/quest-dev2dev2 
___
Matplotlib-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] bug in pyplot.subplot if squeeze is False

2011-06-02 Thread Skipper Seabold
On Tue, May 31, 2011 at 9:25 PM, Skipper Seabold  wrote:
> I filed a bug report here [1]. If squeeze is false, ret never gets defined.
>
> https://github.com/matplotlib/matplotlib/blob/master/lib/matplotlib/pyplot.py#L794
>
> Skipper
>
> [1] 
> https://sourceforge.net/tracker/?func=detail&aid=3309967&group_id=80706&atid=560720
>
> PS. Should I ping the user or devel list with bug reports (or neither)?
>

I went ahead and patched this, so our tests would run and our docs
would build with matplotlib master. I just made it how it was in the
1.0.1 tag.

https://github.com/matplotlib/matplotlib/pull/133

Skipper

--
Simplify data backup and recovery for your virtual environment with vRanger.
Installation's a snap, and flexible recovery options mean your data is safe,
secure and there when you need it. Discover what all the cheering's about.
Get your free trial download today. 
http://p.sf.net/sfu/quest-dev2dev2 
___
Matplotlib-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] Calling all Mac OSX users!

2011-08-17 Thread Skipper Seabold
On Wed, Aug 17, 2011 at 4:49 AM, Christoph Gohlke  wrote:

> The only thing worth providing might be the prebuilt static link libraries
> and header files for zlib, libpng, and freetype for the 4 different MSC
> compilers/runtime libraries.

This would be very helpful. I haven't been able to track down the
plot_directive bugs on windows, because I haven't been able to build
the dependencies with any luck.

Skipper

--
Get a FREE DOWNLOAD! and learn more about uberSVN rich system, 
user administration capabilities and model configuration. Take 
the hassle out of deploying and managing Subversion and the 
tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2
___
Matplotlib-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


[matplotlib-devel] Building on Windows (Was Re: Calling all Mac OSX users!)

2011-08-17 Thread Skipper Seabold
On Wed, Aug 17, 2011 at 4:21 PM, Christoph Gohlke  wrote:
>
>
> On 8/17/2011 12:03 PM, Skipper Seabold wrote:
>> On Wed, Aug 17, 2011 at 4:49 AM, Christoph Gohlke
 wrote:
>> 
>>> The only thing worth providing might be the prebuilt static link
libraries
>>> and header files for zlib, libpng, and freetype for the 4 different MSC
>>> compilers/runtime libraries.
>>
>> This would be very helpful. I haven't been able to track down the
>> plot_directive bugs on windows, because I haven't been able to build
>> the dependencies with any luck.
>>
>> Skipper
>>
>
>
> OK. I uploaded matplotlib-1.x-windows-link-libraries.zip at
> <http://www.lfd.uci.edu/~gohlke/pythonlibs/#matplotlib>.
>

That's awesome. Thanks!

> The archive contains zlib-1.2.5, libpng-1.4.8, and freetype-2.4.6 link
> libraries and header files for the build systems listed below.
>
> All other Python package dependencies can also be downloaded from that
> page. Let me know if anything is missing.
>
> A description on how to build Python 2.6+ extensions using the free
> Windows SDK 7.0 is at
> <http://wiki.cython.org/64BitCythonExtensionsOnWindows>. I have not
> tested it with mpl though.
>

This is how I've been building python packages with extension on Windows if
I need to, but I wouldn't know how to build the dependencies. Can you
recommend a good resource for doing so/learning to do so with SDK?

Now for MPL, I just dropped the msvcr90-x64 files into my matplotlib source
directory because I got tired of messing with setupext.py to try to point to
them. I receive the following error


c:\users\skipper\src\matplotlib\zconf.h(380) : fatal error C1083: Cannot
open include file: 'unistd.h': No such file or directory
error: Command "cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG
-DPY_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API -DPYCXX_ISO_CPP_LIB=1 -I.
-IC:\Python27\lib\site-packages\numpy\core\include -I. -IC:\Python27\include
-IC:\Python27\PC /Tpsrc/_png.cpp
/Fobuild\temp.win-amd64-2.7\Release\src/_png.obj" failed with exit status 2

Whole build log is here: http://pastebin.com/EfxYjMnL

Thanks,

Skipper

> Christoph
>
>
> msvcr71-x32
> ---
> Python 2.5 32 bit
> Visual Studio .NET 2003
> MS C Compiler 13.10
> MSVCR71.DLL C runtime
>
> msvcrt-x64
> --
> Python 2.5 64 bit
> Microsoft Platform SDK for Windows Server 2003 R2
> MS C Compiler 13.10
> MSVCRT.DLL C runtime
>
> msvcr90-x32
> ---
> Python 2.6, 2.7, 3.1, 3.2 32 bit
> Microsoft Visual Studio 2008 Pro
> (or Microsoft Windows SDK v7.0 for Windows 7 and .NET Framework 3.5
> Service Pack 1)
> MS C Compiler 15.0
> MSVCR90.DLL C runtime
>
> msvcr90-x64
> ---
> Python 2.6, 2.7, 3.1, 3.2 64 bit
> Microsoft Visual Studio 2008 Pro
> (or Microsoft Windows SDK v7.0 for Windows 7 and .NET Framework 3.5
> Service Pack 1)
> MS C Compiler 15.0
> MSVCR90.DLL C runtime
>
--
Get a FREE DOWNLOAD! and learn more about uberSVN rich system, 
user administration capabilities and model configuration. Take 
the hassle out of deploying and managing Subversion and the 
tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2___
Matplotlib-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] Building on Windows (Was Re: Calling all Mac OSX users!)

2011-08-18 Thread Skipper Seabold
On Wed, Aug 17, 2011 at 7:33 PM, Christoph Gohlke  wrote:
> On 8/17/2011 4:05 PM, Skipper Seabold wrote:
> > On Wed, Aug 17, 2011 at 4:21 PM, Christoph Gohlke  > <mailto:[email protected]>> wrote:
> >>
> >>
> >>  On 8/17/2011 12:03 PM, Skipper Seabold wrote:
> >> > On Wed, Aug 17, 2011 at 4:49 AM, Christoph Gohlke > <mailto:[email protected]>>  wrote:
> >> > 
> >> >> The only thing worth providing might be the prebuilt static link
> > libraries
> >> >> and header files for zlib, libpng, and freetype for the 4 different MSC
> >> >> compilers/runtime libraries.
> >> >
> >> > This would be very helpful. I haven't been able to track down the
> >> > plot_directive bugs on windows, because I haven't been able to build
> >> > the dependencies with any luck.
> >> >
> >> > Skipper
> >> >
> >>
> >>
> >>  OK. I uploaded matplotlib-1.x-windows-link-libraries.zip at
> >>  <http://www.lfd.uci.edu/~gohlke/pythonlibs/#matplotlib>.
> >>
> >
> > That's awesome. Thanks!
> >
> >>  The archive contains zlib-1.2.5, libpng-1.4.8, and freetype-2.4.6 link
> >>  libraries and header files for the build systems listed below.
> >>
> >>  All other Python package dependencies can also be downloaded from that
> >>  page. Let me know if anything is missing.
> >>
> >>  A description on how to build Python 2.6+ extensions using the free
> >>  Windows SDK 7.0 is at
> >>  <http://wiki.cython.org/64BitCythonExtensionsOnWindows>. I have not
> >>  tested it with mpl though.
> >>
> >
> > This is how I've been building python packages with extension on Windows
> > if I need to, but I wouldn't know how to build the dependencies. Can you
> > recommend a good resource for doing so/learning to do so with SDK?
>
> Almost every library is different. Some require CMake, others scons,
> devenv, nmake, Perl... Refer to the readme or install files.
>

Right. Thanks. I got some ways there building zlib dependency with
nmake and/or vcbuild. They appear to be working at least.

> >
> > Now for MPL, I just dropped the msvcr90-x64 files into my matplotlib
> > source directory because I got tired of messing with setupext.py to try
> > to point to them.
>
> Try adding the directory containing the lib and include files to the LIB
> and INCLUDE environment variables.
>
> >I receive the following error
> >
> > 
> > c:\users\skipper\src\matplotlib\zconf.h(380) : fatal error C1083: Cannot
> > open include file: 'unistd.h': No such file or directory
> > error: Command "cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG
> > -DPY_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API -DPYCXX_ISO_CPP_LIB=1 -I.
> > -IC:\Python27\lib\site-packages\numpy\core\include -I.
> > -IC:\Python27\include -IC:\Python27\PC /Tpsrc/_png.cpp
> > /Fobuild\temp.win-amd64-2.7\Release\src/_png.obj" failed with exit status 2
> >
> > Whole build log is here: http://pastebin.com/EfxYjMnL
>
> Use an empty unistd.h file. I have added that to the zip file.
>

Thanks, that did the trick. Working mpl from source on windows 7,
python 2.7, 64-bit.

Skipper

> Christoph
>
>
> >
> > Thanks,
> >
> > Skipper
> >
> >>  Christoph
> >>
> >>
> >>  msvcr71-x32
> >>  ---
> >>  Python 2.5 32 bit
> >>  Visual Studio .NET 2003
> >>  MS C Compiler 13.10
> >>  MSVCR71.DLL C runtime
> >>
> >>  msvcrt-x64
> >>  --
> >>  Python 2.5 64 bit
> >>  Microsoft Platform SDK for Windows Server 2003 R2
> >>  MS C Compiler 13.10
> >>  MSVCRT.DLL C runtime
> >>
> >>  msvcr90-x32
> >>  ---
> >>  Python 2.6, 2.7, 3.1, 3.2 32 bit
> >>  Microsoft Visual Studio 2008 Pro
> >>  (or Microsoft Windows SDK v7.0 for Windows 7 and .NET Framework 3.5
> >>  Service Pack 1)
> >>  MS C Compiler 15.0
> >>  MSVCR90.DLL C runtime
> >>
> >>  msvcr90-x64
> >>  ---
> >>  Python 2.6, 2.7, 3.1, 3.2 64 bit
> >>  Microsoft Visual Studio 2008 Pro
> >>  (or Microsoft Windows SDK v7.0 for Windows 7 and .NET Framework 3.5
> >>  Service Pack 1)
> >>  MS C Compiler 15.0
> >>  MSVCR90.DLL C runtime
> >>
> >
> >
> >
> >
> > --
&

[matplotlib-devel] Caption in Plot Directive

2012-01-06 Thread Skipper Seabold
Moving this to matplotlib-devel

On Thu, Jan 5, 2012 at 1:17 PM, Skipper Seabold  wrote:
> Is this information incorrect?
>
> http://matplotlib.sourceforge.net/devel/documenting_mpl.html#module-matplotlib.sphinxext.plot_directive
>
> This line seems to preclude ever getting to the below code to process
> the caption.
>
> https://github.com/matplotlib/matplotlib/blob/master/lib/matplotlib/sphinxext/plot_directive.py#L601
>
> I think the proper fix is to make :caption: an option.

I implemented :caption: as an option [1], but this is at odds with the
original figure directive [2]. AFAICT either the check for content and
arguments has to be removed and all content after a filename is given
is assumed to be a caption, or caption has to become an option.

Skipper

[1] 
https://github.com/jseabold/matplotlib/commit/2f003e296a0c37bcbf6687702ddfd34ac12235b4
[2] http://docutils.sourceforge.net/docs/ref/rst/directives.html#figure

--
Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex
infrastructure or vast IT resources to deliver seamless, secure access to
virtual desktops. With this all-in-one solution, easily deploy virtual 
desktops for less than the cost of PCs and save 60% on VDI infrastructure 
costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox
___
Matplotlib-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] GSOC mentoring organization

2012-03-06 Thread Skipper Seabold
On Tue, Mar 6, 2012 at 11:25 AM, John Hunter  wrote:
>
>
> On Tue, Mar 6, 2012 at 9:57 AM, Nicolas Rougier 
> wrote:
>>
>>
>> And this page seems to gather all relevant links:
>>
>>
>> http://www.google-melange.com/gsoc/document/show/gsoc_program/google/gsoc2012/userguide
>>
>
>
> One thing I am unclear on.  They make a distinction between being mentors
> and organization administrators.  In the past, PSF has always been the
> sponsoring organization.  What I am wondering is: does mpl need to have an
> organization administrator in addition to mentors, or is PSF the
> organization administrator and we just sign up individually as mentors?

You might ask on the sympy list. I think they were actually registered
as an organization administrator last year, given the number of
students they had.

For statsmodels, we sign up under the umbrella of PSF who are the
organization. So we don't do anything until PSF announces that they
have been accepted as an organization IIRC.

We plan to do the same this year.

Skipper

--
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
___
Matplotlib-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] GSOC mentoring organization

2012-03-06 Thread Skipper Seabold
On Tue, Mar 6, 2012 at 11:43 AM, John Hunter  wrote:
>
>
> On Tue, Mar 6, 2012 at 10:31 AM, Skipper Seabold 
> wrote:
>>
>>
>> > One thing I am unclear on.  They make a distinction between being
>> > mentors
>> > and organization administrators.  In the past, PSF has always been the
>> > sponsoring organization.  What I am wondering is: does mpl need to have
>> > an
>> > organization administrator in addition to mentors, or is PSF the
>> > organization administrator and we just sign up individually as mentors?
>>
>> You might ask on the sympy list. I think they were actually registered
>> as an organization administrator last year, given the number of
>> students they had.
>>
>> For statsmodels, we sign up under the umbrella of PSF who are the
>> organization. So we don't do anything until PSF announces that they
>> have been accepted as an organization IIRC.
>>
>> We plan to do the same this year.
>>
>
> The timeline at   http://www.google-melange.com/gsoc/events/google/gsoc2012
> says March 6th is the "[GSOC] Mentoring organization application deadline".

March 9th?

>  How do you interpret "mentoring organization" there?  As the PSF or someone
> under their umbrella such as statsmodels or mpl?
>

I interpret it as PSF unless you want to register as a separate
mentoring organization. Eg., sympy wasn't under PSF last year. Since
spots are allocated to the organization, if you anticipate having a
lot of interest it makes sense to register as a mentoring organization
and try to get your own allotment. However, there's a greater burden
put on mentoring organization as far as administrative duties and
project size expectations. At least that's my understanding.

> I went ahead and filled out the mentor application form that Nicolas pointed
> me to as "John Hunter" and use matplotlib.sf.net as the website.  Perhaps a
> few other MPL devs willing to mentor  should do the same just to be on the
> safe side.
>

I can't recall is it's a GSoC requirement or a PSF requirement right
now (I think the latter), but you need at least 3 mentors per project.

Skipper

>
> http://www.google-melange.com/gsoc/profile/mentor/google/gsoc2012
>

--
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
___
Matplotlib-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] RFC: boxplot_enhanced & paired_stats

2012-11-16 Thread Skipper Seabold
On Fri, Nov 16, 2012 at 10:19 AM, Yaroslav Halchenko  
wrote:
> I just found some code (http://www.onerussian.com/tmp/plots.py and
> pasted below for review/feedback) laying around which I wrote around
> matplotlib for plotting primarily pair-wise stats results.  Here is a
> demonstration:
> http://nbviewer.ipython.org/url/www.onerussian.com/tmp/run_plots.ipynb
>
> I wonder if there is a need/place for it in matplotlib and what changes would
> you advise. Sorry for the lack of documentation -- I guess I have not finished
> it at that point (scipy dependency can easily be dropped, used only for
> standard error function iirc):
>

Looks nice. We'd certainly be interesting in including it in
statsmodels/graphics if there isn't sufficient interest here and/or
you'd like to keep the scipy dependency. ;)

Skipper

> #!/usr/bin/python
> #emacs: -*- mode: python-mode; py-indent-offset: 4; tab-width: 4; 
> indent-tabs-mode: nil -*-
> #ex: set sts=4 ts=4 sw=4 noet:
> #- =+- Python script -+= -
> """
>  @file  paired-plots.py
>  @date  Fri Jan 13 11:48:00 2012
>  @brief
>
>
>   Yaroslav HalchenkoDartmouth
>   web: http://www.onerussian.com  College
>   e-mail:  [email protected]  ICQ#: 60653192
>
>  DESCRIPTION (NOTES):
>
>  COPYRIGHT: Yaroslav Halchenko 2012
>
>  LICENSE: MIT
>
>   Permission is hereby granted, free of charge, to any person obtaining a copy
>   of this software and associated documentation files (the "Software"), to 
> deal
>   in the Software without restriction, including without limitation the rights
>   to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
>   copies of the Software, and to permit persons to whom the Software is
>   furnished to do so, subject to the following conditions:
>
>   The above copyright notice and this permission notice shall be included in
>   all copies or substantial portions of the Software.
>
>   THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
>   IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
>   FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
>   AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
>   LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 
> FROM,
>   OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
>   THE SOFTWARE.
> """
> #-\/--
>
> __author__ = 'Yaroslav Halchenko'
> __revision__ = '$Revision: $'
> __date__ = '$Date:  $'
> __copyright__ = 'Copyright (c) 2012 Yaroslav Halchenko'
> __license__ = 'MIT'
>
>
> import numpy as np
> import pylab as pl
> import scipy.stats as ss
>
> def plot_boxplot_enhanced(
> v,
> contrast_labels=None,
> condition_labels=None,
> ccolors=['y', 'b'],
> rand_offsets=None,
> grid=True,
> xticks_rotation=0,
> **bp_kwargs):
>
> width = bp_kwargs.get('width', 0.5)
> pl.boxplot(v, **bp_kwargs)
>
> if v.ndim < 2: v = v[:, None]
> ncol = v.shape[1]
>
> eff = np.mean(v, axis=0)  # effect sizes
> sem = ss.sem(v, axis=0)
>
> if rand_offsets is None:
> rand_offsets = np.random.randn(len(v)) * 0.02
>
> pl.plot((np.arange(ncol) + 1)[:, None] + rand_offsets,
> v.T, '.', color='k', markerfacecolor='k')
> for i in range(ncol):
> lw = 2
> pl.plot([1 - width/2. + i, 1+i],
> [0, 0],
> '--', color=ccolors[0], linewidth=lw) # first condition
> pl.plot([1+i, 1 + width/2. +i],
> [eff[i]]*2,
> '--', color=ccolors[1], linewidth=lw)
>
> # place ste
> pl.errorbar(i+1 + 1.1*width/2.,
> eff[i],
> sem[i],
> elinewidth=2, linewidth=0,
> color='r', ecolor='r')
>
> if contrast_labels and not i:# only for the first 
> one
> pl.text(1 - 1.1*width/2 + i, 0.1, contrast_labels[0],
> verticalalignment='bottom',
> horizontalalignment='right')
> pl.text(1 + 1.2*width/2 + i, eff[i], contrast_labels[1],
> verticalalignment='bottom', horizontalalignment='left')
> ax = pl.gca()
> if condition_labels:
> ax.set_xticklabels(condition_labels, rotation=xticks_rotation)
> else:
> # hide it
> ax.axes.xaxis.set_visible(False)
>
> if grid:
> ax.grid()
> return ax
>
>
> def plot_paired_stats(
> v0, v1, contrast_labels,
> condition_labels=None,
> style=['barplot_effect',
>'boxplot_raw',
>'boxplot_effect'],
> ccolors=['y', 'g'],
> xticks_rotation=0,
> grid=False,
> fig=None,
> bottom_adjust=None,