Re: [Matplotlib-users] bug report

2015-09-18 Thread Bobby Wilkins
I installed CPython 2.7.10, and the appropriate versions of the same
packages, and I still get the same error:

[c:\python\dev\homework1] pip list
backports.ssl-match-hostname (3.4.0.2)
certifi (2015.9.6.2)
decorator (4.0.2)
functools32 (3.2.3.post2)
ipykernel (4.0.3)
ipyparallel (4.0.2)
ipython (4.0.0)
ipython-genutils (0.1.0)
ipywidgets (4.0.2)
Jinja2 (2.8)
jsonschema (2.5.1)
jupyter (1.0.0)
jupyter-client (4.0.0)
jupyter-console (4.0.2)
jupyter-core (4.0.5)
MarkupSafe (0.23)
matplotlib (1.4.3)
mistune (0.7.1)
nbconvert (4.0.0)
nbformat (4.0.0)
notebook (4.0.4)
numpy (1.9.2)
path.py (8.1.1)
pickleshare (0.5)
Pillow (2.9.0)
pip (7.1.2)
Pygments (2.0.2)
pyparsing (2.0.3)
pyreadline (2.1)
python-dateutil (2.4.2)
pytz (2015.4)
pyzmq (14.7.0)
qtconsole (4.0.0)
scipy (0.16.0)
setuptools (18.3)
simplegeneric (0.8.1)
six (1.9.0)
tornado (4.2.1)
traitlets (4.0.0)

Note: the program does not error if last "if" in the source reads:

if (maxTerm<32)#: or ((myFigBase<4) and (maxTerm<64)):

If I change it to something like this:

if (maxTerm<32) or ((myFigBase<4) and (maxTerm<64)):

... I get the below error:

[c:\python\dev\homework1] python PHYS404-homework1-problem3-rev05.py
Traceback (most recent call last):
  File "PHYS404-homework1-problem3-rev05.py", line 196, in 
graphMyetoNegX(mySlices,myRuns,0,1,0)
  File "PHYS404-homework1-problem3-rev05.py", line 185, in graphMyetoNegX

plt.savefig(figStrName+str(myFigBase*3+3).zfill(2)+figStrExt,bbox_inches='tight')
  File "C:\Python27\lib\site-packages\matplotlib\pyplot.py", line 577, in
savefig
res = fig.savefig(*args, **kwargs)
  File "C:\Python27\lib\site-packages\matplotlib\figure.py", line 1476, in
savefig
self.canvas.print_figure(*args, **kwargs)
  File "C:\Python27\lib\site-packages\matplotlib\backend_bases.py", line
2158, in print_figure
**kwargs)
  File "C:\Python27\lib\site-packages\matplotlib\backends\backend_agg.py",
line 521, in print_png
FigureCanvasAgg.draw(self)
  File "C:\Python27\lib\site-packages\matplotlib\backends\backend_agg.py",
line 469, in draw
self.figure.draw(self.renderer)
  File "C:\Python27\lib\site-packages\matplotlib\artist.py", line 59, in
draw_wrapper
draw(artist, renderer, *args, **kwargs)
  File "C:\Python27\lib\site-packages\matplotlib\figure.py", line 1085, in
draw
func(*args)
  File "C:\Python27\lib\site-packages\matplotlib\artist.py", line 59, in
draw_wrapper
draw(artist, renderer, *args, **kwargs)
  File "C:\Python27\lib\site-packages\matplotlib\axes\_base.py", line 2110,
in draw
a.draw(renderer)
  File "C:\Python27\lib\site-packages\matplotlib\artist.py", line 59, in
draw_wrapper
draw(artist, renderer, *args, **kwargs)
  File "C:\Python27\lib\site-packages\matplotlib\text.py", line 642, in draw
ismath=ismath, mtext=mtext)
  File "C:\Python27\lib\site-packages\matplotlib\backends\backend_agg.py",
line 206, in draw_text
font.get_image(), np.round(x - xd), np.round(y + yd) + 1, angle, gc)
  File "C:\Python27\lib\site-packages\numpy\core\fromnumeric.py", line
2648, in round_
return round(decimals, out)
  File "C:\Python27\lib\site-packages\numpy\ma\core.py", line 4903, in round
result._mask = self._mask
AttributeError: 'numpy.float64' object has no attribute '_mask'

On Thu, Sep 17, 2015 at 6:46 AM, Bobby Wilkins 
wrote:

> Thank you all.
>
> I am using Python 3.4.3.
>
> I meant to include a pip list:
>
> Assimulo (2.8)
> decorator (4.0.2)
> gmpy2 (2.0.7)
> ipykernel (4.0.3)
> ipython (4.0.0)
> ipython-genutils (0.1.0)
> ipywidgets (4.0.2)
> Jinja2 (2.8)
> jsonschema (2.5.1)
> jupyter-client (4.0.0)
> jupyter-core (4.0.4)
> MarkupSafe (0.23)
> matplotlib (1.4.3)
> mistune (0.7.1)
> nbconvert (4.0.0)
> nbformat (4.0.0)
> nose (1.3.7)
> notebook (4.0.4)
> numpy (1.9.2)
> pandas (0.16.2)
> path.py (8.1)
> pickleshare (0.5)
> pip (7.1.2)
> Pygments (2.0.2)
> pyparsing (2.0.3)
> pyreadline (2.0)
> python-dateutil (2.4.2)
> pytz (2015.4)
> pyzmq (14.7.0)
> requests (2.7.0)
> scipy (0.16.0)
> setuptools (18.2)
> simplegeneric (0.8.1)
> six (1.9.0)
> sympy (0.7.6)
> testpath (0.2)
> tornado (4.2.1)
> traitlets (4.0.0)
>
> So, if the program works for Python 2.7 but not 3.4.3, maybe that is the
> problem?  Let me try to install Python 2.7 tonight and see what that does.
>
> On Wed, Sep 16, 2015 at 8:39 AM, Sterling Smith 
> wrote:
>
>> Works fine for
>>
>> {{{
>>  : python
>> Python 2.7.10 (default, Sep 15 2015, 11:26:42)
>> [GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.57)] on darwin
>> Type "help", "copyright", "credits" or "license" for more information.
>> /Users/smithsp/.pyhistory
>> >>> import matplotlib
>> >>> matplotlib.__version__
>> '1.4.3'
>> >>> import numpy
>> >>> numpy.__version__
>> '1.9.2'
>> >>> matplotlib.get_backend()
>> u’MacOSX'
>> }}}
>>
>> All are obtained through MacPorts on OSX 10.9.5.
>>
>> -Sterling
>>
>>
>>
>> On Sep 16, 2015, at 6:50AM, Benjamin Root  wrote:
>>
>> > Btw, I can't 

Re: [Matplotlib-users] bug report

2015-09-18 Thread Bobby Wilkins
One more note: changing the plot type from loglog to just plot, the errors
also go away.

On Thu, Sep 17, 2015 at 11:23 PM, Bobby Wilkins 
wrote:

> I installed CPython 2.7.10, and the appropriate versions of the same
> packages, and I still get the same error:
>
--
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] bug report

2015-09-18 Thread Bobby Wilkins
Thank you Christoph, and thank you for the extensive package builds!

I did update to matplotlib 1.5 and it seems to address the error; I get all
of my plots and they look correct, though I did get the following warning
on Python 2.7.10:

[c:\python\dev\homework1] python PHYS404-homework1-problem3-rev05.py
C:\Python27\lib\site-packages\numpy\core\fromnumeric.py:2648:
RuntimeWarning: invalid value encountered in rint
  return round(decimals, out)

... and the same on CPython 3.4 (do you think 3.5 is stable enough to move
to?):

[c:\python\dev\homework1] python PHYS404-homework1-problem3-rev05.py
C:\Python34\lib\site-packages\numpy\core\fromnumeric.py:2648:
RuntimeWarning: invalid value encountered in rint
  return round(decimals, out)

Many thanks again,
Bobby

On Thu, Sep 17, 2015 at 11:23 PM, <
matplotlib-users-requ...@lists.sourceforge.net> wrote:

> Today's Topics:
>
>1. Re: bug report (Christoph Gohlke)
>2. Re: bug report (Bobby Wilkins)
>
>
> --
>
> Message: 1
> Date: Thu, 17 Sep 2015 10:30:30 -0700
> From: Christoph Gohlke <cgoh...@uci.edu>
> Subject: Re: [Matplotlib-users] bug report
> To: matplotlib-users@lists.sourceforge.net
> Message-ID: <55faf8b6.8020...@uci.edu>
> Content-Type: text/plain; charset=windows-1252; format=flowed
>
> I can reproduce the AttributeError on all Python versions and the crash
> (in Python's _tkinter.pyd extension) on Python 3.4.
>
> As a workaround you might try to upgrade to matplotlib 1.5, which seems
> to work for me.
>
> Christoph
>
>
--
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] bug report

2015-09-17 Thread Bobby Wilkins
Thank you all.

I am using Python 3.4.3.

I meant to include a pip list:

Assimulo (2.8)
decorator (4.0.2)
gmpy2 (2.0.7)
ipykernel (4.0.3)
ipython (4.0.0)
ipython-genutils (0.1.0)
ipywidgets (4.0.2)
Jinja2 (2.8)
jsonschema (2.5.1)
jupyter-client (4.0.0)
jupyter-core (4.0.4)
MarkupSafe (0.23)
matplotlib (1.4.3)
mistune (0.7.1)
nbconvert (4.0.0)
nbformat (4.0.0)
nose (1.3.7)
notebook (4.0.4)
numpy (1.9.2)
pandas (0.16.2)
path.py (8.1)
pickleshare (0.5)
pip (7.1.2)
Pygments (2.0.2)
pyparsing (2.0.3)
pyreadline (2.0)
python-dateutil (2.4.2)
pytz (2015.4)
pyzmq (14.7.0)
requests (2.7.0)
scipy (0.16.0)
setuptools (18.2)
simplegeneric (0.8.1)
six (1.9.0)
sympy (0.7.6)
testpath (0.2)
tornado (4.2.1)
traitlets (4.0.0)

So, if the program works for Python 2.7 but not 3.4.3, maybe that is the
problem?  Let me try to install Python 2.7 tonight and see what that does.

On Wed, Sep 16, 2015 at 8:39 AM, Sterling Smith 
wrote:

> Works fine for
>
> {{{
>  : python
> Python 2.7.10 (default, Sep 15 2015, 11:26:42)
> [GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.57)] on darwin
> Type "help", "copyright", "credits" or "license" for more information.
> /Users/smithsp/.pyhistory
> >>> import matplotlib
> >>> matplotlib.__version__
> '1.4.3'
> >>> import numpy
> >>> numpy.__version__
> '1.9.2'
> >>> matplotlib.get_backend()
> u’MacOSX'
> }}}
>
> All are obtained through MacPorts on OSX 10.9.5.
>
> -Sterling
>
>
>
> On Sep 16, 2015, at 6:50AM, Benjamin Root  wrote:
>
> > Btw, I can't reproduce the problem using matplotlib master, numpy master
> and linux. I know it isn't at all similar to your setup, but it is a data
> point.
> >
> > On Wed, Sep 16, 2015 at 9:43 AM, Benjamin Root 
> wrote:
> > What version of numpy do you have installed?
> >
> > On Wed, Sep 16, 2015 at 5:35 AM, Bobby Wilkins 
> wrote:
> > OS: Windows 8.1 Pro
> >
> > matplotlib version: 1.4.3
> >
> > where obtained: http://www.lfd.uci.edu/~gohlke/pythonlibs/
> >
> > customizations: none
> >
> > Sample Program: attached py file; this is a Physics homework problem; I
> have the answers I need, but would like to fix the errors to be able to
> label all lines.
> >
> > Debug output in attached output.txt file
> >
> > If you uncomment line 180, the error is reported as if it came from that
> line even though there is no float64 on that line (savefig).  If commented,
> it does not report a line from my .py file...
> >
> > If you make line 170 read as follows, the error goes away:
> >
> > if (maxTerm<32):
> >
> > This suggests to me that the additional labels for the 32, 64, 128, and
> 154 term runs is what is triggering the bug, but I cannot figure out what
> it is.
> >
> > Also, separate note, just about any time I make figures, when closing
> the last figure I get a python.exe app crash and this message:
> >
> > alloc: invalid block: 044E7680: 0 d
> >
> >
> > Thank you for any help,
> > Bobby
> >
> >
> >
> --
> > Monitor Your Dynamic Infrastructure at Any Scale With Datadog!
> > Get real-time metrics from all of your servers, apps and tools
> > in one place.
> > SourceForge users - Click here to start your Free Trial of Datadog now!
> > http://pubads.g.doubleclick.net/gampad/clk?id=241902991=/4140
> > ___
> > Matplotlib-users mailing list
> > Matplotlib-users@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/matplotlib-users
> >
> >
> >
> >
> --
> > Monitor Your Dynamic Infrastructure at Any Scale With Datadog!
> > Get real-time metrics from all of your servers, apps and tools
> > in one place.
> > SourceForge users - Click here to start your Free Trial of Datadog now!
> >
> http://pubads.g.doubleclick.net/gampad/clk?id=241902991=/4140___
> > Matplotlib-users mailing list
> > Matplotlib-users@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
>
--
Monitor Your Dynamic Infrastructure at Any Scale With Datadog!
Get real-time metrics from all of your servers, apps and tools
in one place.
SourceForge users - Click here to start your Free Trial of Datadog now!
http://pubads.g.doubleclick.net/gampad/clk?id=241902991=/4140___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] bug report

2015-09-17 Thread Christoph Gohlke
I can reproduce the AttributeError on all Python versions and the crash 
(in Python's _tkinter.pyd extension) on Python 3.4.

As a workaround you might try to upgrade to matplotlib 1.5, which seems 
to work for me.

Christoph


On 9/17/2015 6:46 AM, Bobby Wilkins wrote:
> Thank you all.
>
> I am using Python 3.4.3.
>
> I meant to include a pip list:
>
> Assimulo (2.8)
> decorator (4.0.2)
> gmpy2 (2.0.7)
> ipykernel (4.0.3)
> ipython (4.0.0)
> ipython-genutils (0.1.0)
> ipywidgets (4.0.2)
> Jinja2 (2.8)
> jsonschema (2.5.1)
> jupyter-client (4.0.0)
> jupyter-core (4.0.4)
> MarkupSafe (0.23)
> matplotlib (1.4.3)
> mistune (0.7.1)
> nbconvert (4.0.0)
> nbformat (4.0.0)
> nose (1.3.7)
> notebook (4.0.4)
> numpy (1.9.2)
> pandas (0.16.2)
> path.py (8.1)
> pickleshare (0.5)
> pip (7.1.2)
> Pygments (2.0.2)
> pyparsing (2.0.3)
> pyreadline (2.0)
> python-dateutil (2.4.2)
> pytz (2015.4)
> pyzmq (14.7.0)
> requests (2.7.0)
> scipy (0.16.0)
> setuptools (18.2)
> simplegeneric (0.8.1)
> six (1.9.0)
> sympy (0.7.6)
> testpath (0.2)
> tornado (4.2.1)
> traitlets (4.0.0)
>
> So, if the program works for Python 2.7 but not 3.4.3, maybe that is the
> problem?  Let me try to install Python 2.7 tonight and see what that does.
>
> On Wed, Sep 16, 2015 at 8:39 AM, Sterling Smith  > wrote:
>
> Works fine for
>
> {{{
>   : python
> Python 2.7.10 (default, Sep 15 2015, 11:26:42)
> [GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.57)] on darwin
> Type "help", "copyright", "credits" or "license" for more information.
> /Users/smithsp/.pyhistory
> >>> import matplotlib
> >>> matplotlib.__version__
> '1.4.3'
> >>> import numpy
> >>> numpy.__version__
> '1.9.2'
> >>> matplotlib.get_backend()
> u’MacOSX'
> }}}
>
> All are obtained through MacPorts on OSX 10.9.5.
>
> -Sterling
>
>
>
> On Sep 16, 2015, at 6:50AM, Benjamin Root  > wrote:
>
> > Btw, I can't reproduce the problem using matplotlib master, numpy 
> master and linux. I know it isn't at all similar to your setup, but it is a 
> data point.
> >
> > On Wed, Sep 16, 2015 at 9:43 AM, Benjamin Root  > wrote:
> > What version of numpy do you have installed?
> >
> > On Wed, Sep 16, 2015 at 5:35 AM, Bobby Wilkins  > wrote:
> > OS: Windows 8.1 Pro
> >
> > matplotlib version: 1.4.3
> >
> > where obtained:http://www.lfd.uci.edu/~gohlke/pythonlibs/
> 
> >
> > customizations: none
> >
> > Sample Program: attached py file; this is a Physics homework problem; I 
> have the answers I need, but would like to fix the errors to be able to label 
> all lines.
> >
> > Debug output in attached output.txt file
> >
> > If you uncomment line 180, the error is reported as if it came from 
> that line even though there is no float64 on that line (savefig).  If 
> commented, it does not report a line from my .py file...
> >
> > If you make line 170 read as follows, the error goes away:
> >
> > if (maxTerm<32):
> >
> > This suggests to me that the additional labels for the 32, 64, 128, and 
> 154 term runs is what is triggering the bug, but I cannot figure out what it 
> is.
> >
> > Also, separate note, just about any time I make figures, when closing 
> the last figure I get a python.exe app crash and this message:
> >
> > alloc: invalid block: 044E7680: 0 d
> >
> >
> > Thank you for any help,
> > Bobby
> >
> >
> > 
> --
> > Monitor Your Dynamic Infrastructure at Any Scale With Datadog!
> > Get real-time metrics from all of your servers, apps and tools
> > in one place.
> > SourceForge users - Click here to start your Free Trial of Datadog now!
> >http://pubads.g.doubleclick.net/gampad/clk?id=241902991=/4140
> > ___
> > Matplotlib-users mailing list
> >Matplotlib-users@lists.sourceforge.net
> 
> >https://lists.sourceforge.net/lists/listinfo/matplotlib-users
> >
> >
> >
> > 
> --
> > Monitor Your Dynamic Infrastructure at Any Scale With Datadog!
> > Get real-time metrics from all of your servers, apps and tools
> > in one place.
> > SourceForge users - Click here to start your Free Trial of Datadog now!
> 
> >http://pubads.g.doubleclick.net/gampad/clk?id=241902991=/4140___
> > Matplotlib-users mailing list
> 

Re: [Matplotlib-users] bug report

2015-09-16 Thread Sterling Smith
Works fine for

{{{
 : python 
Python 2.7.10 (default, Sep 15 2015, 11:26:42) 
[GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.57)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
/Users/smithsp/.pyhistory
>>> import matplotlib
>>> matplotlib.__version__
'1.4.3'
>>> import numpy
>>> numpy.__version__
'1.9.2'
>>> matplotlib.get_backend()
u’MacOSX'
}}}

All are obtained through MacPorts on OSX 10.9.5.

-Sterling



On Sep 16, 2015, at 6:50AM, Benjamin Root  wrote:

> Btw, I can't reproduce the problem using matplotlib master, numpy master and 
> linux. I know it isn't at all similar to your setup, but it is a data point.
> 
> On Wed, Sep 16, 2015 at 9:43 AM, Benjamin Root  wrote:
> What version of numpy do you have installed?
> 
> On Wed, Sep 16, 2015 at 5:35 AM, Bobby Wilkins  
> wrote:
> OS: Windows 8.1 Pro
> 
> matplotlib version: 1.4.3
> 
> where obtained: http://www.lfd.uci.edu/~gohlke/pythonlibs/
> 
> customizations: none
> 
> Sample Program: attached py file; this is a Physics homework problem; I have 
> the answers I need, but would like to fix the errors to be able to label all 
> lines.
> 
> Debug output in attached output.txt file
> 
> If you uncomment line 180, the error is reported as if it came from that line 
> even though there is no float64 on that line (savefig).  If commented, it 
> does not report a line from my .py file...
> 
> If you make line 170 read as follows, the error goes away:
> 
> if (maxTerm<32):
> 
> This suggests to me that the additional labels for the 32, 64, 128, and 154 
> term runs is what is triggering the bug, but I cannot figure out what it is. 
> 
> Also, separate note, just about any time I make figures, when closing the 
> last figure I get a python.exe app crash and this message:
> 
> alloc: invalid block: 044E7680: 0 d
> 
> 
> Thank you for any help,
> Bobby
> 
> 
> --
> Monitor Your Dynamic Infrastructure at Any Scale With Datadog!
> Get real-time metrics from all of your servers, apps and tools
> in one place.
> SourceForge users - Click here to start your Free Trial of Datadog now!
> http://pubads.g.doubleclick.net/gampad/clk?id=241902991=/4140
> ___
> Matplotlib-users mailing list
> Matplotlib-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
> 
> 
> 
> --
> Monitor Your Dynamic Infrastructure at Any Scale With Datadog!
> Get real-time metrics from all of your servers, apps and tools
> in one place.
> SourceForge users - Click here to start your Free Trial of Datadog now!
> http://pubads.g.doubleclick.net/gampad/clk?id=241902991=/4140___
> Matplotlib-users mailing list
> Matplotlib-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users


--
Monitor Your Dynamic Infrastructure at Any Scale With Datadog!
Get real-time metrics from all of your servers, apps and tools
in one place.
SourceForge users - Click here to start your Free Trial of Datadog now!
http://pubads.g.doubleclick.net/gampad/clk?id=241902991=/4140
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] bug report and fix for bracket arrow (annotations)

2011-09-17 Thread Jae-Joon Lee
Thanks for reporting this.
This is now fixed in the v1.0.x-maint branch and the master branch.

Regards,

-JJ


On Sat, Sep 17, 2011 at 10:33 AM, Daniel Hyams dhy...@gmail.com wrote:
 In  http://matplotlib.sourceforge.net/users/annotations_guide.html ,
 about 1/3 of the way down, there is a little demonstrator for the
 different arrowstyles -, -, ]-, etc.

 Looking at the figure closely, there is no difference between the -[
 and ]- styles.

 The fix for this is in patches.py, around line 3276 (matplotlib
 1.0.0).  Comments in that routine clipped out for brevity.

   class BracketA(_Bracket):
        def __init__(self, widthA=1., lengthA=0.2, angleA=None):

            super(ArrowStyle.BracketA, self).__init__(None,True,
                     widthA=widthA, lengthA=lengthA, angleA=angleA )

 If you flip the first two args of the __init__ call, that fixes it:

   class BracketA(_Bracket):
        def __init__(self, widthA=1., lengthA=0.2, angleA=None):

            super(ArrowStyle.BracketA, self).__init__(True,None,
 ## flip these arguments
                     widthA=widthA, lengthA=lengthA, angleA=angleA )


 --
 Daniel Hyams
 dhy...@gmail.com

 --
 BlackBerryreg; DevCon Americas, Oct. 18-20, San Francisco, CA
 http://p.sf.net/sfu/rim-devcon-copy2
 ___
 Matplotlib-users mailing list
 Matplotlib-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/matplotlib-users


--
BlackBerryreg; DevCon Americas, Oct. 18-20, San Francisco, CA
http://p.sf.net/sfu/rim-devcon-copy2
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] bug report and fix for bracket arrow (annotations)

2011-09-16 Thread Daniel Hyams
In  http://matplotlib.sourceforge.net/users/annotations_guide.html ,
about 1/3 of the way down, there is a little demonstrator for the
different arrowstyles -, -, ]-, etc.

Looking at the figure closely, there is no difference between the -[
and ]- styles.

The fix for this is in patches.py, around line 3276 (matplotlib
1.0.0).  Comments in that routine clipped out for brevity.

   class BracketA(_Bracket):
def __init__(self, widthA=1., lengthA=0.2, angleA=None):

super(ArrowStyle.BracketA, self).__init__(None,True,
 widthA=widthA, lengthA=lengthA, angleA=angleA )

If you flip the first two args of the __init__ call, that fixes it:

   class BracketA(_Bracket):
def __init__(self, widthA=1., lengthA=0.2, angleA=None):

super(ArrowStyle.BracketA, self).__init__(True,None,
## flip these arguments
 widthA=widthA, lengthA=lengthA, angleA=angleA )


-- 
Daniel Hyams
dhy...@gmail.com

--
BlackBerryreg; DevCon Americas, Oct. 18-20, San Francisco, CA
http://p.sf.net/sfu/rim-devcon-copy2
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Bug report

2006-06-29 Thread John Hunter
 Tony == Tony Mannucci [EMAIL PROTECTED] writes:

Tony John, Thanks for the answer.

Tony My prime mistake was to assume that matlab behavior is
Tony mimicked in matplotlib. (I am not saying it should
Tony be!). matlab has a Line object and this includes the
Tony markers. So, what I called bugs was based on a false
Tony expectation. The matlab version of the code will produce
Tony lines and symbols of the same color.

Tony I will spend more time with the matplotlib manual and learn
Tony the differences with matlab, and make progress that way.

Hmm, I didn't know matlab behaved this way.  I know matlab does have
color, markerfacecolor and margeredgecolor, so I assumed that they
would be controlled independently.  So the behavior is

  set(l, 'color', 'red')

and both the linestyle and markercolor are changed?


JDH

Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Bug report

2006-06-29 Thread Tony Mannucci
John,

They do behave independently. This is about default behavior. Here 
are some examples (unverified), that assume some standard matplotlib 
rc file.

Ex 1:
No color specified.
MPL and matlab result: both line and marker edge have same default color.

Ex 2:
Set the color with the plot command, e.g. 'r+-' string.
matlab result: both marker and line are red.
MPL result: line is red, marker remains default blue.

Ex 3:
Set colors explicitly, e.g. 'ro-', 'markerfacecolor'=[0,1,0]
matlab and MPL result: line is red, marker face is green.  I 
**believe** that in MPL the marker edge will remain default blue, 
since it is not set explicitly. In matlab, the marker edge will pick 
up the red line color.

Both approaches are reasonable, one simply has to know what to 
expect. In my case, being somewhat new to MPL, I was quite confused 
by how Ex 2 worked in MPL. Now I know better. The matlab approach 
requires somewhat less typing typically.

-Tony

At 8:23 AM -0500 6/29/06, John Hunter wrote:
   Tony == Tony Mannucci [EMAIL PROTECTED] writes:

 Tony John, Thanks for the answer.

 Tony My prime mistake was to assume that matlab behavior is
 Tony mimicked in matplotlib. (I am not saying it should
 Tony be!). matlab has a Line object and this includes the
 Tony markers. So, what I called bugs was based on a false
 Tony expectation. The matlab version of the code will produce
 Tony lines and symbols of the same color.

 Tony I will spend more time with the matplotlib manual and learn
 Tony the differences with matlab, and make progress that way.

Hmm, I didn't know matlab behaved this way.  I know matlab does have
color, markerfacecolor and margeredgecolor, so I assumed that they
would be controlled independently.  So the behavior is

   set(l, 'color', 'red')

and both the linestyle and markercolor are changed?


JDH


-- 
Tony Mannucci
Supervisor, Ionospheric and Atmospheric Remote Sensing Group
  Mail-Stop 138-308, Tel  (818) 354-1699
  Jet Propulsion Laboratory,  Fax  (818) 393-5115
  California Institute of Technology, Email  [EMAIL PROTECTED]
  4800 Oak Grove Drive,   http://genesis.jpl.nasa.gov
  Pasadena, CA 91109

Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users