#13422: Log scale plots should auto-expand axes range to include at least 2 
ticks
-----------------------------------------+----------------------------------
       Reporter:  ppurka                 |         Owner:  jason, was         
           Type:  enhancement            |        Status:  needs_work         
       Priority:  major                  |     Milestone:  sage-5.11          
      Component:  graphics               |    Resolution:                     
       Keywords:  log plot               |   Work issues:                     
Report Upstream:  N/A                    |     Reviewers:  Karl-Dieter Crisman
        Authors:  Punarbasu Purkayastha  |     Merged in:                     
   Dependencies:                         |      Stopgaps:                     
-----------------------------------------+----------------------------------

Old description:

> This comes up from an internal(?) email where it was asked that log scale
> plots should have automatic expansion of the axis if there are not enough
> ticks. The current behavior is to raise an error.
>
> The attached patch implements this feature and works as long as the user
> doesn't provide too few ticks via the `ticks` option of `show()`. This
> patch should work well with the following plots, all of which fail
> without this patch:
> {{{
> sage: plot_loglog(x, (1,10)).show(xmin=10, xmax=1)
> sage: list_plot_loglog(zip([1, 10], [0.5, 6.0]))
> sage: list_plot_loglog(zip([2, 3], [3, 4.0]), base=2)
> sage: list_plot_loglog(zip([2, 10], [0.5, 4.0]))
> }}}
>
> This patch fixes #13340 too.
>
> ----
>
> Apply [attachment:trac_13422-auto_expand_log.patch] to `devel/sage`

New description:

 This comes up from an internal(?) email where it was asked that log scale
 plots should have automatic expansion of the axis if there are not enough
 ticks. The current behavior is to raise an error.

 The attached patch implements this feature and works as long as the user
 doesn't provide too few ticks via the `ticks` option of `show()`. This
 patch should work well with the following plots, all of which fail without
 this patch:
 {{{
 sage: plot_loglog(x, (1,10)).show(xmin=10, xmax=1)
 sage: list_plot_loglog(zip([1, 10], [0.5, 6.0]))
 sage: list_plot_loglog(zip([2, 3], [3, 4.0]), base=2)
 sage: list_plot_loglog(zip([2, 10], [0.5, 4.0]))
 }}}

 This patch fixes #13340 too.

 ----

 Apply [attachment:trac_13422-rebase.patch] to `devel/sage`

--

Comment (by kcrisman):

 That said, I've still rebased, since I'm probably wrong and this is a
 different preexisting bug :)

 apply trac_13422-rebase.patch

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/13422#comment:12>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to