[matplotlib-devel] Auto backend

2009-01-23 Thread Дмитрий Ледков
Hello

I couldn't manage to find how to search the mailing list archive on
sourceforge, so sorry if it is already discussed/developed.

There are many backends for matplotlib and debian/ubuntu packages depend
  on at least one of the interactive once [1]. But matplotrc as
installed says "backend: TkAgg". This often results in errors upon
importing pylab  after installation saying "Please install python-tk".

Has there been any work done about providing an auto backend? The one
that would select the best one automagically.

I've pocked into code a little bit. My understanding is to hook into
pylab_setup() (lib/matplotlib/backends/__init__.py). That is if backend
is auto, run a script which returns a name of the pretties backend which
 then is used.

I think I will manage writing something like that. And I would be glad
to collaborate.

[1] One of the dependencies is:
python-tk | python-gtk2 | python-wxgtk2.8 | python-qt3 | python-qt4

ps. cloned github repo, now updating, takes ages =D Maybe git hub needs
to be updated with more revisions? =D
--
With regards,

Dmitrijs Ledkovs.



signature.asc
Description: OpenPGP digital signature
--
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


[matplotlib-devel] Polar Plot Design Issues

2009-01-23 Thread Evans, James R
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?

Thanks,
--James Evans


--
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