Re: [matplotlib-devel] Bug in latex with \dots

2009-02-04 Thread Michael Droettboom
There was both a parser bug (where accents were taking precedence over 
symbols), and a mapping bug (where ldots was mapped to the wrong Unicode 
code point).  Both of these should now be fixed on the branch and 
trunk.  Let me know if you see any further problems.

Mike

Fernando Perez wrote:
> Howdy,
>
> the attached screenshot shows the output in matplotlib of:
>
> In [18]: plot([1,2])
> Out[18]: []
>
> In [19]: title(r'$a+b+\dots+\dot{s}+\ldots$')
> Out[19]: 
>
> along with the PostScript that Latex produces for the same equation.
> There are two bugs, I think:
>
> - \dots --> \dot{s} by matplotlib
> - \ldots rendered by MPL centered vertically, while in latex those are
> 'lower' dots.
>
> Should I open an SF ticket for this, or is it  a quick fix?
>
> Cheers,
>
> f
>   
>
> 
>
> 
>
> --
> Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
> software. With Adobe AIR, Ajax developers can use existing skills and code to
> build responsive, highly engaging applications that combine the power of local
> resources and data with the reach of the web. Download the Adobe AIR SDK and
> Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
> 
>
> ___
> Matplotlib-devel mailing list
> Matplotlib-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/matplotlib-devel
>   


--
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] Bug in latex with \dots

2009-02-04 Thread Fernando Perez
Hi Michael,

[Cc'ing nipy-dev, where we ran into the problem.  Docs should look
fine now, if you rebuild mpl]

On Wed, Feb 4, 2009 at 7:42 AM, Michael Droettboom  wrote:
> There was both a parser bug (where accents were taking precedence over
> symbols), and a mapping bug (where ldots was mapped to the wrong Unicode
> code point).  Both of these should now be fixed on the branch and trunk.
>  Let me know if you see any further problems.

Many thanks, it all looks good now.

Cheers,

f

> Mike
>
> Fernando Perez wrote:
>>
>> Howdy,
>>
>> the attached screenshot shows the output in matplotlib of:
>>
>> In [18]: plot([1,2])
>> Out[18]: []
>>
>> In [19]: title(r'$a+b+\dots+\dot{s}+\ldots$')
>> Out[19]: 
>>
>> along with the PostScript that Latex produces for the same equation.
>> There are two bugs, I think:
>>
>> - \dots --> \dot{s} by matplotlib
>> - \ldots rendered by MPL centered vertically, while in latex those are
>> 'lower' dots.
>>
>> Should I open an SF ticket for this, or is it  a quick fix?
>>
>> Cheers,
>>
>> f

--
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] FW: Polar Plot Design Issues

2009-02-04 Thread Drain, Theodore R
Another vote here for changing resolution=1 to be the default.  It seems 
strange to plot values on a line plot and not have the values connected.  At 
least in my area, every polar plot of real-world data we make needs to set this 
flag to 1 or the wrong plot is created.

Ted

> -Original Message-
> From: Michael Droettboom [mailto:md...@stsci.edu]
> Sent: Monday, February 02, 2009 8:28 AM
> To: James Evans; matplotlib development list
> Subject: Re: [matplotlib-devel] FW: Polar Plot Design Issues
>
> You can get this behavior you are asking for by passing "resolution=1"
> to polar.  (This has been there for ages, but unfortunately wasn't
> documented until recently).  We can consider making 1 the default.
>
> There are cases in which the automatic interpolation is useful, but in
> the present implementation the onus is on the user to avoid this "going
> the long way" problem.
>
> Mike
>
> James Evans wrote:
> > Michael,
> >
> > John said you were the one to go to for this one.  I was wondering if
> you had any comments about the following?
> >
> > --James Evans
> >
> >
> >> All,
> >>
> >> While looking over the polar plot code I came across the following
> issue:  When plotting something
> >> like 'polar( [2*pi/180, 358*pi/180], [2.0, 1.0] )' the plotted line
> will actually wrap around the
> >> origin of the plot before reaching its destination.  Initially I
> thought that this was correct
> >> behavior.  The line numerically passed through all angles between 2
> and 358 degrees in a linear
> >> fashion.  However after consulting several colleagues and text books
> I believe that the behavior is
> >> actually wrong.
> >>
> >> It is my understanding that for polar plots there is no linear
> mapping of the axes as it is currently
> >> implemented.  Rather for a simple two-point line defined in polar
> coordinates, the line should
> >> essentially take the direct route.  This is highlighted by the two-
> point equation of a line for polar
> >> plots:
> >>
> >> r = ( r1*r2*sin(t2-t1) ) / ( (r1*sin(t-t1)) - (r2*sin(t-t2)) )
> >>
> >> If you were to plug in the two points given above, then increment
> theta (t) from 2 degrees to 358
> >> degrees, then convert to Cartesian cords, and plot the results, you
> will get the correct line that
> >> directly crosses the zero degree line and not one that wraps around
> the origin.
> >>
> >> Is the polar plot function implemented this way on purpose?  Which
> way should it really be
> >> implemented?
> >>
> >
> >
>
> --
> Michael Droettboom
> Science Software Branch
> Operations and Engineering Division
> Space Telescope Science Institute
> Operated by AURA for NASA
>
>
> ---
> ---
> This SF.net email is sponsored by:
> SourcForge Community
> SourceForge wants to tell your story.
> http://p.sf.net/sfu/sf-spreadtheword
> ___
> Matplotlib-devel mailing list
> Matplotlib-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/matplotlib-devel
>
> No virus found in this incoming message.
> Checked by AVG - www.avg.com
> Version: 8.0.233 / Virus Database: 270.10.17/1931 - Release Date:
> 02/02/09 19:21:00

--
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


[matplotlib-devel] setupext.py chooses tk on mac OS X incorrectly

2009-02-04 Thread Jayson Barr
Hello,

I was having trouble getting matplotlib to link to the correct Tcl and
Tk, and as a result uncovered what I would call a bug, or at least
unpredictable behavior.

Basically, I have a custom Tcl/Tk installation, and I setup python to
correctly find them, so I have the expectation that Matplotlib would
use the same Tk.  It can be pretty easily figured out just by
importing Tkinter.  Anyway, I looked through the matplotlib
setupext.py and discovered that there is a function that does this,
and correctly: query_tcltk

anyway, the logic in the setupext file is such that if the
sys.platform is 'darwin' then it will look for a Framework first
(maybe only), and since there is always an ancient system version of
Tcl and Tk, it will always pick those before anywhere else.

The system frameworks are not complete, and I know you all recommend
installing a binary with everything in it.  Unfortunately, I did not
have this option for unimportant reasons.

Either way, I do believe that it is a bug that it does not choose the
Tk that is being used by Python or at least trying to before using
other available libraries and frameworks.  This is easy enough for me
to fix just for myself and at work, but I believe that you all should
consider using Python's Tk for these reasons:
1).  If python was installed from source, this is the one that the
user configured python to use, and therefore is the one they trust.
2).  If the Tk/Tcl libraries were installed from source instead of
using the binaries you suggested installing, then it will just use the
wrong system Framework anyway.  I bet people using macports and other
unix-like package managers on mac end up submitting a lot of bug
reports over this.
3).  It is just more predictable and sustainable if modules set Python
as their standard base.  Besides, it isn't much work as you already
wrote a function to find the correct tcl and tk.
4).  I don't mind helping write the patch.  I am only worried about
not knowing the intricacies of all the random supported platforms that
you all look out for.  For example: I know jack about Windows linking.
 Either way, I'll update it if you have someone look at it.  I'll work
on it sometimes this week when I'm not too busy at work and send it
in.

Anyway,
I am hoping that I convinced you all, and look forward to helping fix this.

Have a great rest-of-the-week!
Jayson

--
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] setupext.py chooses tk on mac OS X incorrectly

2009-02-04 Thread Jayson Barr
I should also add that the reason it won't find my tclConfig.sh and
tkConfig.sh files is because they were configured/installed with the
--prefix option, but with the information from Python this is easily
resolvable.

Jayson

On Wed, Feb 4, 2009 at 3:08 PM, Jayson Barr  wrote:
> Hello,
>
> I was having trouble getting matplotlib to link to the correct Tcl and
> Tk, and as a result uncovered what I would call a bug, or at least
> unpredictable behavior.
>
> Basically, I have a custom Tcl/Tk installation, and I setup python to
> correctly find them, so I have the expectation that Matplotlib would
> use the same Tk.  It can be pretty easily figured out just by
> importing Tkinter.  Anyway, I looked through the matplotlib
> setupext.py and discovered that there is a function that does this,
> and correctly: query_tcltk
>
> anyway, the logic in the setupext file is such that if the
> sys.platform is 'darwin' then it will look for a Framework first
> (maybe only), and since there is always an ancient system version of
> Tcl and Tk, it will always pick those before anywhere else.
>
> The system frameworks are not complete, and I know you all recommend
> installing a binary with everything in it.  Unfortunately, I did not
> have this option for unimportant reasons.
>
> Either way, I do believe that it is a bug that it does not choose the
> Tk that is being used by Python or at least trying to before using
> other available libraries and frameworks.  This is easy enough for me
> to fix just for myself and at work, but I believe that you all should
> consider using Python's Tk for these reasons:
> 1).  If python was installed from source, this is the one that the
> user configured python to use, and therefore is the one they trust.
> 2).  If the Tk/Tcl libraries were installed from source instead of
> using the binaries you suggested installing, then it will just use the
> wrong system Framework anyway.  I bet people using macports and other
> unix-like package managers on mac end up submitting a lot of bug
> reports over this.
> 3).  It is just more predictable and sustainable if modules set Python
> as their standard base.  Besides, it isn't much work as you already
> wrote a function to find the correct tcl and tk.
> 4).  I don't mind helping write the patch.  I am only worried about
> not knowing the intricacies of all the random supported platforms that
> you all look out for.  For example: I know jack about Windows linking.
>  Either way, I'll update it if you have someone look at it.  I'll work
> on it sometimes this week when I'm not too busy at work and send it
> in.
>
> Anyway,
> I am hoping that I convinced you all, and look forward to helping fix this.
>
> Have a great rest-of-the-week!
> Jayson
>

--
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel