[matplotlib-devel] axes.get_xticklines() minor parameter

2009-08-14 Thread jason-sage
I just noticed that the following two functions seem inconsistent:

axes.get_xticklabels has a "minor" argument, which defaults to False

However, axes.get_xticklines has no such argument, so in order to get 
the minor ticklines, one has to go down to the axes.xaxis object.  This 
isn't a huge problem, but the inconsistency seems a little odd.  Can we 
make a minor argument for axes.get_xticklines?

Thanks,

Jason


--
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-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


[matplotlib-devel] transAxis attribute of the Axis object

2009-08-14 Thread jason-sage
In the documentation for the Axis object, I see that there is supposed 
to be a transAxis attribute.  However, when grepping for it in the 
source, the only place it appears is in the documentation:

gr...@tiny:~/sage/local/lib/python2.6/site-packages/matplotlib$ grep -r 
transAxis *
axis.py:* :attr:`transAxis` - transform axis coords to display coords
Binary file axis.pyc matches


Has this attribute been removed?  This is with version 0.99.0.

Thanks,

Jason



--
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-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] open bugs: too many, too old

2009-08-14 Thread Michael Droettboom
This is a great idea, Eric.  I don't think this is a SF bug, as I recall 
having seen this many since I "got here".  I've usually just stopped 
looking before the 0.91 release or so.  But you're right -- let's clean 
this stuff out.

I've cleaned out a few already, but are there any takers for me to 
assign Mac-specific and Windows-specific bugs?  I'm happy to take any 
Linux-specific ones.

Cheers,
Mike

Eric Firing wrote:
> After ignoring it for a long time, I took a look at the Sourceforge bug 
> tracker, and closed a couple bugs.  Our bug list is a bit embarrassing; 
> there are 52 open ones going back to 2005.  Is any of this an artifact 
> of all the reworking going on at SF?  Did some closed bugs get reopened 
> by accident?  In any case, it would be nice to get the list of open bugs 
> down to a much smaller number, and ensure that the oldest is not very 
> old.  I suspect many of the old ones have long since either been fixed 
> or rendered irrelevant by other changes.
>
> For all reading this list: even if you don't have mpl svn commit access, 
> if you can review a bug and propose a fix, or conclude it is obsolete, 
> or provide some other way of moving us towards getting it closed, your 
> effort would be much appreciated.
>
> Thank you.
>
> Eric
>
> --
> 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-devel mailing list
> Matplotlib-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/matplotlib-devel
>   

-- 
Michael Droettboom
Science Software Branch
Operations and Engineering Division
Space Telescope Science Institute
Operated by AURA for NASA


--
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-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] transAxis attribute of the Axis object

2009-08-14 Thread Michael Droettboom
It is now stored in the parent Axes object.

  axis.axes.transAxes

Same is true of transData.

Thanks for pointing this out.  I will update the docs.

Cheers,
Mike

jason-s...@creativetrax.com wrote:
> In the documentation for the Axis object, I see that there is supposed 
> to be a transAxis attribute.  However, when grepping for it in the 
> source, the only place it appears is in the documentation:
>
> gr...@tiny:~/sage/local/lib/python2.6/site-packages/matplotlib$ grep -r 
> transAxis *
> axis.py:* :attr:`transAxis` - transform axis coords to display coords
> Binary file axis.pyc matches
>
>
> Has this attribute been removed?  This is with version 0.99.0.
>
> Thanks,
>
> Jason
>
>
>
> --
> 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-devel mailing list
> Matplotlib-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/matplotlib-devel
>   

-- 
Michael Droettboom
Science Software Branch
Operations and Engineering Division
Space Telescope Science Institute
Operated by AURA for NASA


--
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-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] not clipping objects in a plot

2009-08-14 Thread Andrew Straw
jason-s...@creativetrax.com wrote:
> On this thread:
>
> http://www.mail-archive.com/matplotlib-devel@lists.sourceforge.net/msg05383.html
>
> clip_on was a suggested way of getting around the clipping that happens 
> at the edge of a frame.  In the Sage project, we are always setting the 
> limits on the axes via set_xlim and set_ylim.  Is there any way to get 
> the lines and circles that pass across the edge of the usual clip 
> boundary to still be drawn, even if we have set the xlim and ylim of the 
> axis?
>
> Basically (using an example from the gallery), is there a way to get the 
> scatter plot circles below not clipped, while still having the y-axis 
> only go from -2 to 2?  If not, is there a way to easily calculate the 
> protrusion of the various objects, like the circles below, so we know 
> how much to adjust the axes to just include the circles?
>   
Another idea would be to disable clipping specifically for any markers
at xlim[0] <= markerx <= xlim[1].

I'll talk about this with John and other interested parties at the SciPy
conference (will you be there?) and hopefully address this issue during
the sprint, where I'm planning to work on MPL.

-Andrew

--
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-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] not clipping objects in a plot

2009-08-14 Thread Michael Droettboom
I think this is just a vanilla bug that set_clip_on is being ignored for 
collections.  That patch is rather straightforward.

Other developers: do you agree this should be fixed, or is there a good 
reason for current behavior that I'm missing?

Cheers,
Mike

Index: lib/matplotlib/collections.py
===
--- lib/matplotlib/collections.py   (revision 7486)
+++ lib/matplotlib/collections.py   (working copy)
@@ -207,8 +207,7 @@
 transform, transOffset, offsets, paths = self._prepare_points()

 gc = renderer.new_gc()
-gc.set_clip_rectangle(self.get_clip_box())
-gc.set_clip_path(self.get_clip_path())
+self._set_gc_clip(gc)

 renderer.draw_path_collection(
 gc, transform.frozen(), paths, self.get_transforms(),
@@ -1211,8 +1210,7 @@
 transOffset = transOffset.get_affine()

 gc = renderer.new_gc()
-gc.set_clip_rectangle(self.get_clip_box())
-gc.set_clip_path(self.get_clip_path())
+self._set_gc_clip(gc)

 if self._shading == 'gouraud':
 triangles, colors = self.convert_mesh_to_triangles(


jason-s...@creativetrax.com wrote:
> On this thread:
>
> http://www.mail-archive.com/matplotlib-devel@lists.sourceforge.net/msg05383.html
>
> clip_on was a suggested way of getting around the clipping that happens 
> at the edge of a frame.  In the Sage project, we are always setting the 
> limits on the axes via set_xlim and set_ylim.  Is there any way to get 
> the lines and circles that pass across the edge of the usual clip 
> boundary to still be drawn, even if we have set the xlim and ylim of the 
> axis?
>
> Basically (using an example from the gallery), is there a way to get the 
> scatter plot circles below not clipped, while still having the y-axis 
> only go from -2 to 2?  If not, is there a way to easily calculate the 
> protrusion of the various objects, like the circles below, so we know 
> how much to adjust the axes to just include the circles?
>
> import matplotlib.pyplot as plt
> import numpy as np
> fig = plt.figure()
> x = np.linspace(0r,2*np.pi,100r)
> y = 2*np.sin(x)
> ax = fig.add_subplot(1,1,1)
> q=ax.scatter(x,y)
> ax.set_ylim([-2,2])
> q.set_clip_on(False)
> ax.set_clip_on(False)
> ax.spines['left'].set_position(('outward',10))
> ax.spines['bottom'].set_position(('outward',10))
> ax.spines['top'].set_color('none')
> ax.spines['right'].set_color('none')
> ax.xaxis.set_ticks_position('bottom')
> ax.yaxis.set_ticks_position('left')
> fig.savefig('test.png')
>
> Thanks,
>
> Jason
>
>
>
> --
> 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-devel mailing list
> Matplotlib-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/matplotlib-devel
>   

-- 
Michael Droettboom
Science Software Branch
Operations and Engineering Division
Space Telescope Science Institute
Operated by AURA for NASA


--
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-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


[matplotlib-devel] getp broken

2009-08-14 Thread Jouni K . Seppänen
I just happened to type getp(gca()) on matplotlib 0.99.0, and the output
looks all garbled:

>>> getp(gca())
/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib/axes.py:1269:
 DeprecationWarning: use ax.patch instead
  warnings.warn('use ax.patch instead', DeprecationWarning)
stable = box
a = 1.0
or = C
ated = False
ct = auto
scale_on = True
scalex_on = True
scaley_on = True
 = Axes(0.125,0.1;0.775x0.8)
_locator = None
_bgcolor = w
[...]

It's been a long time since I last tried this, but does anyone have an
idea what changes could have caused this? Could it be related to the
ReST formatting in the docstrings?

Querying single attributes as in getp(gca(), 'yscale') seems to work
fine, it's just this listing of all attributes that seems to be broken.

-- 
Jouni K. Seppänen
http://www.iki.fi/jks


--
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-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] kwdoc processing with decorators

2009-08-14 Thread Jouni K . Seppänen
Eric Firing  writes:

> 3) Question: how does this affect startup time?  Jouni tested two 
> approaches to his work, and the decorator approach was significantly 
> slower.  

No, actually the difference was barely measurable. The reason I chose
the boilerplate approach of generating source files instead of using
magic wrappers to generate functions at runtime was that I thought the
latter were too magical - difficult to get right, and probably more
difficult to debug when something breaks.

-- 
Jouni K. Seppänen
http://www.iki.fi/jks


--
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-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] kwdoc processing with decorators

2009-08-14 Thread Jason R. Coombs
Oh, so you want _everything_ to work after the patch?  GG

Thanks for reporting this.  I'll track it down and get it fixed.

-Original Message-
From: Eric Firing [mailto:efir...@hawaii.edu] 
Sent: Thursday, 13 August, 2009 21:33
To: Jason R. Coombs
Cc: matplotlib development list
Subject: Re: [matplotlib-devel] kwdoc processing with decorators

Jason R. Coombs wrote:
> I'm about to upload a new patch that implements some of the ideas John and
> Darren have sent. Would you mind running the performance tests against
that
> one also?  This new change has the potential to increase performance drag.

Jason,

There is a problem with rev4, running "ipython -pylab":

In [1]:plot([1,2])
---
AttributeErrorTraceback (most recent call last)

/home/efiring/ in ()

/usr/local/lib/python2.6/dist-packages/matplotlib/docstring.pyc in 
(target)
 334 # language" - GVR. I think functools might help when 
Python 2.5

 335 # is required.

--> 336 return lambda target: dedent(copy(source)(target))
 337 from matplotlib import cbook
 338

/usr/local/lib/python2.6/dist-packages/matplotlib/docstring.pyc in 
do_copy(target)
 422 def do_copy(target):
 423 if source.__doc__:
--> 424 target.__doc__ = source.__doc__
 425 return target
 426 return do_copy

AttributeError: 'list' object attribute '__doc__' is read-only


Eric


smime.p7s
Description: S/MIME cryptographic signature
--
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-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] not clipping objects in a plot

2009-08-14 Thread Eric Firing
Michael Droettboom wrote:
> I think this is just a vanilla bug that set_clip_on is being ignored for 
> collections.  That patch is rather straightforward.
> 
> Other developers: do you agree this should be fixed, or is there a good 
> reason for current behavior that I'm missing?

It certainly looks to me like an annoying bug, so if your patch fixes 
it, great!

Eric

> 
> Cheers,
> Mike
> 
> Index: lib/matplotlib/collections.py
> ===
> --- lib/matplotlib/collections.py   (revision 7486)
> +++ lib/matplotlib/collections.py   (working copy)
> @@ -207,8 +207,7 @@
>  transform, transOffset, offsets, paths = self._prepare_points()
> 
>  gc = renderer.new_gc()
> -gc.set_clip_rectangle(self.get_clip_box())
> -gc.set_clip_path(self.get_clip_path())
> +self._set_gc_clip(gc)
> 
>  renderer.draw_path_collection(
>  gc, transform.frozen(), paths, self.get_transforms(),
> @@ -1211,8 +1210,7 @@
>  transOffset = transOffset.get_affine()
> 
>  gc = renderer.new_gc()
> -gc.set_clip_rectangle(self.get_clip_box())
> -gc.set_clip_path(self.get_clip_path())
> +self._set_gc_clip(gc)
> 
>  if self._shading == 'gouraud':
>  triangles, colors = self.convert_mesh_to_triangles(
> 
> 
> jason-s...@creativetrax.com wrote:
>> On this thread:
>>
>> http://www.mail-archive.com/matplotlib-devel@lists.sourceforge.net/msg05383.html
>>
>> clip_on was a suggested way of getting around the clipping that happens 
>> at the edge of a frame.  In the Sage project, we are always setting the 
>> limits on the axes via set_xlim and set_ylim.  Is there any way to get 
>> the lines and circles that pass across the edge of the usual clip 
>> boundary to still be drawn, even if we have set the xlim and ylim of the 
>> axis?
>>
>> Basically (using an example from the gallery), is there a way to get the 
>> scatter plot circles below not clipped, while still having the y-axis 
>> only go from -2 to 2?  If not, is there a way to easily calculate the 
>> protrusion of the various objects, like the circles below, so we know 
>> how much to adjust the axes to just include the circles?
>>
>> import matplotlib.pyplot as plt
>> import numpy as np
>> fig = plt.figure()
>> x = np.linspace(0r,2*np.pi,100r)
>> y = 2*np.sin(x)
>> ax = fig.add_subplot(1,1,1)
>> q=ax.scatter(x,y)
>> ax.set_ylim([-2,2])
>> q.set_clip_on(False)
>> ax.set_clip_on(False)
>> ax.spines['left'].set_position(('outward',10))
>> ax.spines['bottom'].set_position(('outward',10))
>> ax.spines['top'].set_color('none')
>> ax.spines['right'].set_color('none')
>> ax.xaxis.set_ticks_position('bottom')
>> ax.yaxis.set_ticks_position('left')
>> fig.savefig('test.png')
>>
>> Thanks,
>>
>> Jason
>>
>>
>>
>> --
>> 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-devel mailing list
>> Matplotlib-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/matplotlib-devel
>>   
> 


--
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-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


[matplotlib-devel] A few new feature in svn : BboxImage, AnnotationBox, etc.

2009-08-14 Thread Jae-Joon Lee
Hi,

There are a few new features I have committed into the svn. Nothing
significant, but hopefully useful (and fun to play with). Here is a
quick summary with screenshots ( I made a separate page because it
involves number of images).

http://abitofpythonabitofastronomy.blogspot.com/2009/08/few-new-things-in-mpl-svn.html

Give them a try when you have a chance. The api is still experimental
and any suggestion will be welcomed. On the other hand, I needed to
make some minor changes to the existing code. While I hope it does not
break any, let me know if anything odd happens.

Regards,

-JJ

--
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-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] kwdoc processing with decorators

2009-08-14 Thread Jason R. Coombs
Thanks again for pointing out the issue (to my embarrassment).

The rev5 patch addresses the issue. I had missed an essential parameter in
pyplot.autogen_docstring.  I've tested this new patch, and I'm able to call
help(pyplot.plot) and execute pyplot.plot([1,2]) without any errors.  I
believe this corrects the issue.

Please let me know if you encounter any additional issues.

Regards,
Jason

-Original Message-
From: Eric Firing [mailto:efir...@hawaii.edu] 
Sent: Thursday, 13 August, 2009 21:33
To: Jason R. Coombs
Cc: matplotlib development list
Subject: Re: [matplotlib-devel] kwdoc processing with decorators

Jason,

There is a problem with rev4, running "ipython -pylab":




smime.p7s
Description: S/MIME cryptographic signature
--
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-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] not clipping objects in a plot

2009-08-14 Thread jason-sage
Andrew Straw wrote:
> jason-s...@creativetrax.com wrote:
>   
>> On this thread:
>>
>> http://www.mail-archive.com/matplotlib-devel@lists.sourceforge.net/msg05383.html
>>
>> clip_on was a suggested way of getting around the clipping that happens 
>> at the edge of a frame.  In the Sage project, we are always setting the 
>> limits on the axes via set_xlim and set_ylim.  Is there any way to get 
>> the lines and circles that pass across the edge of the usual clip 
>> boundary to still be drawn, even if we have set the xlim and ylim of the 
>> axis?
>>
>> Basically (using an example from the gallery), is there a way to get the 
>> scatter plot circles below not clipped, while still having the y-axis 
>> only go from -2 to 2?  If not, is there a way to easily calculate the 
>> protrusion of the various objects, like the circles below, so we know 
>> how much to adjust the axes to just include the circles?
>>   
>> 
> Another idea would be to disable clipping specifically for any markers
> at xlim[0] <= markerx <= xlim[1].
>
> I'll talk about this with John and other interested parties at the SciPy
> conference (will you be there?) and hopefully address this issue during
> the sprint, where I'm planning to work on MPL.
>
>   

No, I won't be there, but I'm excited to hear what comes out of the sprint.

Andrew, thanks for suggesting a way to get this to work.  Michael and 
Eric, thanks for finding a fix for the general problem.

I'm impressed at how quickly developers respond to questions here!  I am 
really, really glad that Sage is using matplotlib for 2d graphics.

Thanks,

Jason


--
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-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel