[Matplotlib-users] path polygon direction?

2014-02-24 Thread Andres Luhamaa
Hi
It has been reported in
http://matplotlib.1069221.n5.nabble.com/How-to-properly-use-path-Path-contains-point-td40718.htmlbut
I do not see anything has happened after this.
Following code illustrates the problem, when polygon defined in one
direction, I can check if point is inside it, if other direction, I can
not.

from matplotlib.patches import Polygon

poly1=Polygon([[0.,0.],[1.,0.],[1.,1.],[0.,1.]],facecolor='none')
print(poly1.contains_point([0.5,0.5]))

poly2=Polygon([[0.,0.],[0.,1.],[1.,1.],[1.,0.]],facecolor='none')
print(poly2.contains_point([0.5,0.5]))
print(poly2.contains_point([-0.5,-0.5]))

I do not see an obvious reason why polygons should be defined in one
direction only.

I have tried the code with several versions of matplotlib, newest is 1.3.1
with numpy 1.8 and python 3.2.3 and all newer versions do not work as I
would accept them. Only the oldest version, python2.6.6 with matplotlib
0.99.1.1 gives me correct answer.

I have digged in the source code and ended up in file _path.cpp where the
function point_in_path_impl seems to do the actual job, but understanding
it completely seems to take more time than I have at the moment.

Any feedback appreciated.

Andres
--
Flow-based real-time traffic analytics software. Cisco certified tool.
Monitor traffic, SLAs, QoS, Medianet, WAAS etc. with NetFlow Analyzer
Customize your own dashboards, set traffic alerts and generate reports.
Network behavioral analysis  security monitoring. All-in-one tool.
http://pubads.g.doubleclick.net/gampad/clk?id=126839071iu=/4140/ostg.clktrk___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] change ylim xlim from canvas doesn't work

2014-02-24 Thread Gabriele Brambilla
Hi,

when I try to change the ylim and xlim directly from the displayed canvas i
get this error(when  I change them in the code I have no problems):

Traceback (most recent call last):
  File C:\Anaconda\lib\site-packages\matplotlib\backends\backend_qt4.py,
line
594, in edit_parameters
figureoptions.figure_edit(axes, self)
  File
C:\Anaconda\lib\site-packages\matplotlib\backends\qt4_editor\figureoptio
ns.py, line 134, in figure_edit
icon=get_icon('qt4_editor_options.svg'), apply=apply_callback)
  File
C:\Anaconda\lib\site-packages\matplotlib\backends\qt4_editor\formlayout.py,
line 544, in fedit
dialog = FormDialog(data, title, comment, icon, parent, apply)
  File
C:\Anaconda\lib\site-packages\matplotlib\backends\qt4_editor\formlayout.py,
line 461, in __init__
self.formwidget.setup()
  File
C:\Anaconda\lib\site-packages\matplotlib\backends\qt4_editor\formlayout.py,
line 433, in setup
widget.setup()
  File
C:\Anaconda\lib\site-packages\matplotlib\backends\qt4_editor\formlayout.py,
line 408, in setup
widget.setup()
  File
C:\Anaconda\lib\site-packages\matplotlib\backends\qt4_editor\formlayout.py,
line 302, in setup
field = ColorLayout(QColor(value), self)
TypeError: QVariant must be holding a QColor

my code is:
fig = plt.figure()
figf = plt.figure()

for el in sequence:
#some operations
ax = fig.add_subplot(111)

img = ax.plot(xflo, yflo, label=etich, marker = '.')
ax.set_yscale('log')
ax.set_xscale('log')
ax.legend(bbox_to_anchor=(1.05, 1), loc=4, borderaxespad=0.)
fig.canvas.draw()
ax1 = figf.add_subplot(111)

img1 = ax1.plot(logx, logy, label=etich)#, marker = style)
ax1.legend(bbox_to_anchor=(1.05, 1), loc=4, borderaxespad=0.)

figf.canvas.draw()

thanks

Gabriele
--
Flow-based real-time traffic analytics software. Cisco certified tool.
Monitor traffic, SLAs, QoS, Medianet, WAAS etc. with NetFlow Analyzer
Customize your own dashboards, set traffic alerts and generate reports.
Network behavioral analysis  security monitoring. All-in-one tool.
http://pubads.g.doubleclick.net/gampad/clk?id=126839071iu=/4140/ostg.clktrk___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] Stopping FuncAnimation

2014-02-24 Thread Derek Pyne
Does anyone know the preferred method for stopping FuncAnimation? I am using it 
to record data from a oscilloscope and woud like to be able to pause and 
restart the data on demand. Is there any way I can send a button click event to 
it?

Thanks, Derek

--
Flow-based real-time traffic analytics software. Cisco certified tool.
Monitor traffic, SLAs, QoS, Medianet, WAAS etc. with NetFlow Analyzer
Customize your own dashboards, set traffic alerts and generate reports.
Network behavioral analysis  security monitoring. All-in-one tool.
http://pubads.g.doubleclick.net/gampad/clk?id=126839071iu=/4140/ostg.clktrk___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users