#12212: Colormap for implicit_plot3d and parametric_plot3d
-------------------------------------+-------------------------------------
       Reporter:  niles              |        Owner:  jason, was
           Type:  defect             |       Status:  positive_review
       Priority:  blocker            |    Milestone:  sage-6.5
      Component:  graphics           |   Resolution:
       Keywords:  colormap, plot     |    Merged in:
        Authors:  Joris              |    Reviewers:  Frédéric Chapoton,
  Vankerschaver, Frédéric Chapoton,  |  Niles Johnson, Karl-Dieter Crisman,
  Niles Johnson                      |  Jonathan Gutow
Report Upstream:  N/A                |  Work issues:
         Branch:  u/chapoton/12212   |       Commit:
   Dependencies:  #17645             |  36e4d8cae0037fc8442fbd20594a8e36c5b46196
                                     |     Stopgaps:
-------------------------------------+-------------------------------------

Old description:

> Colormaps work for `plot3d`, but not for `implicit_plot3d` or
> `parametric_plot3d`.
>
> Compare the following:
>
> {{{
> sage: var('r v')
> sage: cmsel = [colormaps['autumn'](i) for i in sxrange(0,1,0.05)]
> sage: p = plot3d(0.2*(r**2 + v**2) + cos(2*r)*sin(2*v),(r,-2,2),
> (v,-2,2), adaptive=True, color=cmsel, plot_points=10, opacity=0.9)
> sage: p2 = sphere((0,0,0),1,color='black',opacity=0.5)
> sage: (p+p2).show(aspect_ratio=(1,1,1), figsize=[7,3])
> }}}
>

> {{{
> sage: cmsel = [colormaps['autumn'](i) for i in sxrange(0,1,0.05)]
> sage: var('x,y,z')
> sage: implicit_plot3d(x^2+y^2+z^2==4, (x, -3, 3), (y, -3,3), (z, -3,3),
> color=cmsel)
> ERROR: An unexpected error occurred while tokenizing input
> The following traceback may be corrupted or invalid
> The error message is: ('EOF in multi-line statement', (49, 0))
> ---------------------------------------------------------------------------
> TypeError                                 Traceback (most recent call
> last)
> ...
> TypeError: 'NoneType' object is not iterable
> }}}
>

> See details at this [http://ask.sagemath.org/question/17/use-a-colormap-
> for-implicit_plot3d Ask Sage question].

New description:

 Colormaps work for `plot3d`, but not for `implicit_plot3d` or
 `parametric_plot3d`.

 Compare the following:

 {{{
 sage: var('r v')
 sage: cmsel = [colormaps['autumn'](i) for i in sxrange(0,1,0.05)]
 sage: p = plot3d(0.2*(r**2 + v**2) + cos(2*r)*sin(2*v),(r,-2,2), (v,-2,2),
 adaptive=True, color=cmsel, plot_points=10, opacity=0.9)
 sage: p2 = sphere((0,0,0),1,color='black',opacity=0.5)
 sage: (p+p2).show(aspect_ratio=(1,1,1), figsize=[7,3])
 }}}


 {{{
 sage: cmsel = [colormaps['autumn'](i) for i in sxrange(0,1,0.05)]
 sage: var('x,y,z')
 sage: implicit_plot3d(x^2+y^2+z^2==4, (x, -3, 3), (y, -3,3), (z, -3,3),
 color=cmsel)
 ERROR: An unexpected error occurred while tokenizing input
 The following traceback may be corrupted or invalid
 The error message is: ('EOF in multi-line statement', (49, 0))
 ---------------------------------------------------------------------------
 TypeError                                 Traceback (most recent call
 last)
 ...
 TypeError: 'NoneType' object is not iterable
 }}}


 See details at this [http://ask.sagemath.org/question/17/use-a-colormap-
 for-implicit_plot3d Ask Sage question].

 New jmol package available here:
  * [​http://chapoton.perso.math.cnrs.fr/jmol-14.2.11_2015.01.20.tar.bz2]

--

Comment (by fbissey):

 When you have a new version of a package, please put it in the ticket
 description so that it is easy to find.

--
Ticket URL: <http://trac.sagemath.org/ticket/12212#comment:165>
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