#12212: Colormap for implicit_plot3d and parametric_plot3d
-------------------------------------+-------------------------------------
Reporter: niles | Owner: jason, was
Type: defect | Status: needs_work
Priority: major | 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,
Report Upstream: N/A | Jonathan Gutow
Branch: u/chapoton/12212 | Work issues: update documentation
Dependencies: | and examples
| Commit:
| be9d2a587dc3d7bfcb9c9e19689e8fa2feec104b
| Stopgaps:
-------------------------------------+-------------------------------------
Comment (by kcrisman):
Try this.
{{{
var('x,y,z')
t = sin(z).function(x,y,z)
@interact
def _(cm = [colormaps[c] for c in colormaps],v = ['jmol','tachyon']):
show(implicit_plot3d(z-x*x-y*y,(x,-2,2),(y,-2,2),(z,-1,4),color=(t,cm),viewer=v))
}}}
(Could be slow.)
I don't know if I like having a switch to 1, though, as most of the
colormaps seem to mostly care about 0 to 1 or -1 to 1 as color values.
(Switch the function about to `z` instead of `sin(z)` to see this.) That
could be a somewhat bizarre change. What if you switched it from 0 to
0.01 or something like that?
For instance,
{{{
var('x,y,z')
t = SR(0).function(x,y,z)
implicit_plot3d(z-x*x-y*y,(x,-2,2),(y,-2,2),(z,-1,4),color=(t,colormaps.terrain))
# or flag or whatever
}}}
this seems to work fine. Changing to `SR(1)` gives quite a different
color! So I would recommend not putting in that bit where you check for
the `0` color - especially since the other viewers work fine! No need to
mess them up.
Anyway, as far as I'm concerned the fault here clearly lies with jmol or
jsmol, and is not so horrible as to keep us from putting this in.
--
Ticket URL: <http://trac.sagemath.org/ticket/12212#comment:146>
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.