I would just like to give a +1 on the importance of fixing this.  I am
often irritated by my explicit bounds being expanded in hard to
predict ways.  I am somewhat confused by the way the 2D graphics use
and alter matplotlib, so I didn't fix it myself either, but I could at
least review a patch.

The first thing a lot of people want to do with something like Sage is
plot something, and if it doesn't look good they might not try it
again.  I have literally seen that happen.  The 3D graphics have been
a huge boost but 2D is what people try first.

-M. Hampton

On Apr 10, 6:15 am, "Joel B. Mohler" <[EMAIL PROTECTED]> wrote:
> On Wednesday 09 April 2008 07:37:56 pm gerhard wrote:
>
> > * The actual bounds used for the axes
> >    can yield very surprising results.
> >    Should the range bounds be honored if
> >    the user sets them explicitely?
>
> Since we had a thread about this a bit ago and I was allegedly going to write
> a patch, I'll share my results of the patch.  I had a patch which (in the
> case I was interested in) eliminated 3 places which nudge the margins about
> for aesthetic reasons.  I thought it might be a manageable job to turn that
> into a more generic patch which honors margins.
>
> However, I was thoroughly scared off when I saw what would need to be done to
> honor the bounds setting for all cases (frame/no frame, etc).  There is a lot
> of "magic constants" in the code (0.1, 0.015, 0.002, etc) which evidently
> were labored over for days.  This is a very worthwhile task, but it sure
> looks like it needs a more massive overhaul than I wanted to engage in.
>
> In general, I think the right algorithm is something like this:
> 1)  Honor the bounds settings
> 2)  Check if there are tick marks, axis labels, tick labels outside the
> viewable area
> 3)  Enlarge the viewable area using font metrics to include these labels.
>
> I know nothing about matplotlib so parts 2&3 are not possible for me in any
> amount of time I wanted to commit to this.  However, parts 2&3 are necessary
> for the frames=True option.  I don't know if it is actually difficult or not.
> I totally reject the "aesthetic" padding idea though so it really is (IMO)
> just a matter of finding font metrics from whatever code is making text.
>
> --
> Joel
--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to