Re: [Matplotlib-users] possible bug with linestyle='steps'

2009-08-25 Thread Paul Ray
Hi,

I just installed matplotlib 0.99.0 and I see that this problem is  
still there.
The command plot(a,ls='steps') is equivalent to plot(a,ls='steps-pre')  
and both cause the first value of the array to NOT be plotted.  This  
is REALLY not what should happen when one plots an array with several  
values.  It is fine if there is a custom option to make that behavior  
(like 'steps-pre'), but the default for ls='steps' or step(x,y) must  
be to have the first flat level at the level of the first entry (what  
the 'steps-post' does).

The docstring now correctly describes the behavior, so that is good,  
but please please make the default steps be steps-post.

Thanks,

-- Paul

On Jul 19, 2009, at 9:35 AM, John Hunter wrote:

 On Fri, Jul 17, 2009 at 5:15 PM, Paul Raypaul@nrl.navy.mil  
 wrote:


 Ryan Krauss-2 wrote:

 RTFM:

 plot(t,y, drawstyle='steps-post')



 Actually, 'steps-pre' (which is the default) and 'steps-post' seem  
 to have
 swapped definitions.
 Here is what the docs say:
*where*: [ 'pre' | 'post' | 'mid'  ]
  If 'pre', the interval from x[i] to x[i+1] has level y[i]
  If 'post', that interval has level y[i+1]
  If 'mid', the jumps in *y* occur half-way between the
  *x*-values.

 In fact both the default behavior and what you get with steps-pre  
 are what
 SHOULD happen with steps-post.  And steps-post (as you point out)  
 does what
 should be the default behavior and that of steps-pre.

 I have filed a bug report on this, since it is very important that  
 this work
 as expected.  As the original poster pointed out, this used to work
 correctly but recently seems to have gotten broken.



 I am looking first at the behavior of plot with the drawstyle property
 set -- let's make sure this is correct before turning to the steps
 command, which just uses plot with the drawstyle set -- here is my
 test code

 import numpy as np
 import matplotlib.pyplot as plt

 fig = plt.figure()
 ax = fig.add_subplot(111)

 a = np.array([1,2,3,4,5])

 styles = 'default' , 'steps' , 'steps-pre' , 'steps-mid' , 'steps- 
 post'
 styles = 'steps' , 'steps-pre'
 for ls in styles:
ax.plot(a, ls=ls, label=ls, lw=2)

 ax.legend(loc='upper left')

 plt.show()


 pre causes the step to rise on the x[i], post causes it to rise on
 x[i+1] and mid in the middle.  This seems like the correct behavior.
 So it does look like the docstring for  'step' is incorrect, and I've
 changed it to read


*where*: [ 'pre' | 'post' | 'mid'  ]
  If 'pre', the interval from x[i] to x[i+1] has level y[i+1]

  If 'post', that interval has level y[i]

  If 'mid', the jumps in *y* occur half-way between the


 JDH


--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] Crosshairs

2009-07-28 Thread Paul Ray
Hi,

I see that scatter() has a variety of different symbols that you can  
choose from, and even a way to create your own custom markers.   
However, I can't figure out how to make a crosshair symbol (a plus  
with non-touching lines) as my marker, which I'd like to use to show  
the  location of a star on an underlying image without obscuring the  
star itself.

Graphically, I'd like a marker symbol that looks like this...

  |
  |
  |

=== ===

  |
  |
  |

Does anyone know how to pull this off?

Thanks!

-- Paul


--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] possible bug with linestyle='steps'

2009-07-19 Thread Paul Ray


Ryan Krauss-2 wrote:
 
 RTFM:
 
 plot(t,y, drawstyle='steps-post')
 
 

Actually, 'steps-pre' (which is the default) and 'steps-post' seem to have
swapped definitions.
Here is what the docs say:
*where*: [ 'pre' | 'post' | 'mid'  ]
  If 'pre', the interval from x[i] to x[i+1] has level y[i]
  If 'post', that interval has level y[i+1]
  If 'mid', the jumps in *y* occur half-way between the
  *x*-values.

In fact both the default behavior and what you get with steps-pre are what
SHOULD happen with steps-post.  And steps-post (as you point out) does what
should be the default behavior and that of steps-pre.

I have filed a bug report on this, since it is very important that this work
as expected.  As the original poster pointed out, this used to work
correctly but recently seems to have gotten broken.

Cheers,
-- Paul
-- 
View this message in context: 
http://www.nabble.com/possible-bug-with-linestyle%3D%27steps%27-tp23568959p24542440.html
Sent from the matplotlib - users mailing list archive at Nabble.com.


--
Enter the BlackBerry Developer Challenge  
This is your chance to win up to $100,000 in prizes! For a limited time, 
vendors submitting new applications to BlackBerry App World(TM) will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize  
details at: http://p.sf.net/sfu/Challenge
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] DLL not found when importing pylab on Windows

2007-05-10 Thread Paul Ray
Hi,

A colleague of mine uses Python on Windows.  When he upgraded to  
matplotlib 0.90 (from 0.82, I think) he started getting an import  
error when importing pylab.  We tried many combinations and the only  
thing that fixed it was downgrading back to 0.82.

We tried:
python2.4 and python2.5
numpy 1.0.1 and 1.0.2
matplotlib 0.90 and 0.87.7

We got the same error with all of those combinations.  The error  
message was an ImportError: DLL load failed, when doing from  
matplotlib._ns_transforms import *.  It is the same problem that  
others reported earlier:
http://www.mail-archive.com/matplotlib-users@lists.sourceforge.net/ 
msg02841.html
All of our installs were from the .exe Windows binaries, not source  
compilations, and in all cases import numpy, numpy.test(1), and  
import matplotlib produced no errors.
Note that we have not installed either Numeric or numarray, but we  
tried adding Numeric and it didn't help.

Has anyone found a solution?  We'd like to upgrade to a matplotlib  
later that 0.87.5 to get matplotlib.patches.Ellipse().

Thanks,

-- Paul



-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] DLL not found when importing pylab on Windows

2007-05-10 Thread Paul Ray

On May 10, 2007, at 10:34 AM, Werner F. Bruhin wrote:

 What backend are you using?

 If you use wxPython then as of 0.87.?  something you need to either  
 use wxPython 2.6 Unicode or rename the following file:

I'm not 100% sure.  We certainly didn't intentionally use wxPython,  
since I don't even know what it is.  The only packages we installed  
were python, numpy, and matplotlib.  I think his backend is TkAgg,  
but I can't check since it was on my colleagues computer and he is on  
travel today.  (All the rest of us us python/numpy/matplotlib on Macs  
or Linux and everything is fine with 0.90)

I know there are a bunch of .pyd files in his matplotlib directory.   
Are those Windows DLL versions of packages?  As far as I could tell  
the relevant one _ns_transforms.pyd is there, so I'm not sure why  
it is having trouble finding it (though I'm working from memory here).

Cheers,

-- Paul


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] DLL not found when importing pylab on Windows

2007-05-10 Thread Paul Ray

On May 10, 2007, at 11:05 AM, Werner F. Bruhin wrote:

 Should you have a small matplotlib script which shows the problem  
 I'll give it a try on my setup (XP or Vista with Python 2.5 and numpy.

No need for a script.  import pylab produces the error.
If you are using Windows XP, Python 2.5, numpy 1.0.2, and matplotlib  
0.90, then you have the same setup that is causing us the error.   
What other packages do you have installed.  My guess is that there is  
some dependency we are not satisfying?

Thanks for your help,

-- Paul


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users