Bug in plotting dashed lines with outlier?

Note that the y array has a screwy point - 1.0e18. What

    > happens is that the first plot ('plot1') looks fine but the

This is an Agg bug and is unrelated to ticking. In the agg routine
for drawing a dashed line we are getting the freeze. This occurs in
the agg code and not in the matplotlib agg wrappers, so it will take
some work to fix. Basically I need to isolate a pure agg C++ example
and hope Maxim can find a good solution.

The basic problem occurs when you set your viewlimits to be such a
small part of the data space that the transformed figure coordinate of
your data point is in outer space. In your case the transformed
coordinates with a viewlim set to 0,7 on an 800x600 canvas are

100 540
168.889 471.429
237.778 402.857
306.667 334.286
375.556 265.714
444.444 197.143
513.333 128.571
582.222 60
651.111 -8.57143
720 -6.85714e+19

It is possible that an earlier version handled this differently, as I
did refactor that part of the code at one point ....

Thanks for the report -- I'll keep you posted if I can figure out
something. One workaround is to drop points in the agg backend that
are far removed from the canvas, but this isn't ideal, since it could
lead to misleading results in zoomed images.

JDH

I had similar problems with zooming in extremely far. My work around
was to use masked arrays before zooming. Not perfect, but it worked.

···

On 2/24/06, John Hunter <jdhunter@...4...> wrote:

    > Note that the y array has a screwy point - 1.0e18. What
    > happens is that the first plot ('plot1') looks fine but the

This is an Agg bug and is unrelated to ticking. In the agg routine
for drawing a dashed line we are getting the freeze. This occurs in
the agg code and not in the matplotlib agg wrappers, so it will take
some work to fix. Basically I need to isolate a pure agg C++ example
and hope Maxim can find a good solution.

The basic problem occurs when you set your viewlimits to be such a
small part of the data space that the transformed figure coordinate of
your data point is in outer space. In your case the transformed
coordinates with a viewlim set to 0,7 on an 800x600 canvas are

100 540
168.889 471.429
237.778 402.857
306.667 334.286
375.556 265.714
444.444 197.143
513.333 128.571
582.222 60
651.111 -8.57143
720 -6.85714e+19

It is possible that an earlier version handled this differently, as I
did refactor that part of the code at one point ....

Thanks for the report -- I'll keep you posted if I can figure out
something. One workaround is to drop points in the agg backend that
are far removed from the canvas, but this isn't ideal, since it could
lead to misleading results in zoomed images.

JDH

-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
matplotlib-users List Signup and Options

Hi all,

I read in the manual that we can save file as binary.
I tried following code and got error, I would like to
have your comment.

···

=========================
import Numeric
import pylab

#ascii.dat is two dimensional array
fout=pylab.load('C:/Python23/code/ascii.dat')
t=fout[:,0]
x=fout[:,1]
X=Numeric.zeros((len(t),2),Float)
X[:,0]=t
X[:,1]=s
#I want to save as one dimensional array
file('C:/Python23/code/asciiBinary.dat','wb').write(X.tostring())

the error is :
Traceback (most recent call last):
  File "C:/Python23/code/asciiBinary.py", line 4, in
-toplevel-
    fout=pylab.load('C:/Python23/code/ascii.dat')
  File
"C:\Python23\Lib\site-packages\matplotlib\pylab.py",
line 1006, in load
    r,c = X.shape
ValueError: unpack tuple of wrong size

Thanks
Titi

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com

Sorry guys, just wrong file name and synyax lol.

Titi

--- Titi Anggono <tiang_ono@...9...> wrote:

Hi all,

I read in the manual that we can save file as
binary.
I tried following code and got error, I would like
to
have your comment.

=========================
import Numeric
import pylab

#ascii.dat is two dimensional array
fout=pylab.load('C:/Python23/code/ascii.dat')
t=fout[:,0]
x=fout[:,1]
X=Numeric.zeros((len(t),2),Numeric.Float)
X[:,0]=t
X[:,1]=x
#I want to save as one dimensional array

file('C:/Python23/code/asciiBinary.dat','wb').write(X.tostring())

···

==============================
the error is :
Traceback (most recent call last):
  File "C:/Python23/code/asciiBinary.py", line 4, in
-toplevel-
    fout=pylab.load('C:/Python23/code/ascii.dat')
  File
"C:\Python23\Lib\site-packages\matplotlib\pylab.py",
line 1006, in load
    r,c = X.shape
ValueError: unpack tuple of wrong size

Thanks
Titi

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam
protection around
http://mail.yahoo.com

-------------------------------------------------------

This SF.Net email is sponsored by xPML, a
groundbreaking scripting language
that extends applications into web and mobile media.
Attend the live webcast
and join the prime developer group breaking into
this new coding territory!

http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642

_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around