Opened 6 years ago

Last modified 4 years ago

#17660 new defect

Document (and/or implement better) colormaps with 3d plots

Reported by: kcrisman Owned by:
Priority: major Milestone: sage-6.5
Component: graphics Keywords:
Cc: niles, chapoton Merged in:
Authors: Reviewers:
Report Upstream: N/A Work issues:
Branch: u/chapoton/17660 (Commits, GitHub, GitLab) Commit: fbd53f8fba565233e91eaae6192bbceb5107ff77
Dependencies: Stopgaps:

Status badges


Perhaps ironically, in #12212 we now have a pretty nice syntax for using colormaps with an arbitrary function (scaled to 1) with parametric and implicit plots, but not "regular" 3d plots! We just have Harald's (edited by Jason) example

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])

which isn't ideal.

We need to document this, or (much better) use the same syntax, and maybe even enable it even when adaptive=False.

See also this ask.sagemath question and this one and this one.

Change History (3)

comment:1 Changed 6 years ago by chapoton

  • Branch set to u/chapoton/17660
  • Commit set to 8fc72c35f2469a40c32eba6f99a6e6fe3a293757

I just had a first look at the question.

New commits:

8fc72c3trac #17660 first exploration of the problem

comment:2 Changed 4 years ago by git

  • Commit changed from 8fc72c35f2469a40c32eba6f99a6e6fe3a293757 to fbd53f8fba565233e91eaae6192bbceb5107ff77

Branch pushed to git repo; I updated commit sha1. New commits:

fbd53f8Merge branch 'u/chapoton/17660' in 8.0.b9

comment:3 Changed 4 years ago by chapoton

one example added in #23859

Note: See TracTickets for help on using tickets.