#17618: Update matplotlib so that plot_directive is less broken
-------------------------------------+-------------------------------------
       Reporter:  tmonteil           |        Owner:
           Type:  enhancement        |       Status:  new
       Priority:  major              |    Milestone:  sage-6.5
      Component:  packages:          |   Resolution:
  standard                           |    Merged in:
       Keywords:                     |    Reviewers:
        Authors:  Thierry Monteil    |  Work issues:
Report Upstream:  N/A                |       Commit:
         Branch:  u/fbissey/MPL-1.4  |  8ee674d1b6e6bc2e22d7bc9f0ad9af05cce766d5
   Dependencies:                     |     Stopgaps:
-------------------------------------+-------------------------------------

Comment (by tmonteil):

 I did the following test to compare the new `cubic` interpolation type
 with the former `nn`:

 Creation of a common test (taken from `discrete_gaussian_lattice.py`
 doctest):

 {{{
 from sage.stats.distributions.discrete_gaussian_lattice import
 DiscreteGaussianDistributionLatticeSampler
 D = DiscreteGaussianDistributionLatticeSampler(identity_matrix(2), 3.0)
 S = [D() for _ in range(2^12)]
 l = [vector(v.list() + [S.count(v)]) for v in set(S)]
 save(l, '/tmp/vectors.sobj')
 }}}

 Then, on the former 6.4:

 {{{
 sage: l = load('/tmp/vectors.sobj')
 sage: %timeit P = list_plot3d(l, interpolation_type='linear',
 texture="automatic", point_list=True)
 100 loops, best of 3: 12.4 ms per loop
 }}}

 [[Image(6.4_linear.png)]]

 {{{
 sage: %timeit P = list_plot3d(l, interpolation_type='nn',
 texture="automatic", point_list=True)
 10 loops, best of 3: 29.8 ms per loop
 }}}

 [[Image(6.4_nn.png)]]


 On the patched 6.5.beta5:

 {{{
 sage: l = load('/tmp/vectors.sobj')
 sage: %timeit P = list_plot3d(l, interpolation_type='linear',
 texture="automatic", point_list=True)
 100 loops, best of 3: 18.8 ms per loop
 }}}

 [[Image(6.5_linear.png)]]


 {{{
 sage: %timeit P = list_plot3d(l, interpolation_type='cubic',
 texture="automatic", point_list=True)
 1 loops, best of 3: 498 ms per loop
 }}}

 [[Image(6.5_cubic.png)]]

 The generation of the `cubic` interpolation is much (16x) slower that the
 `nn` interpolation, and the visual renderings are very different (`nn`
 looks more like a smoothed `linear` while `cubic` shows more spots at
 lattice points). So, i agree to add the `cubic` interpolation type, but
 disagree to let this replace `nn` in existing tests (too different) nor as
 becoming the default (too slow).

--
Ticket URL: <http://trac.sagemath.org/ticket/17618#comment:31>
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/d/optout.

Reply via email to