1 | initial version |
I asked a similar question about using a colormap for implicit_plot3d last December, and it is still open. @schilly did show how to use matplotlib colormaps for plot3d
though, and it's pretty cool:
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)
sage: p.show(aspect_ratio=(1,1,1), figsize=[7,3])
And, as @Jason Grout said, you can see all of the available colormaps with colormaps.keys()
.
If you do figure out some way to use colormaps with implicit 3d plots, I would love to hear about it!
2 | No.2 Revision |
I asked a similar question about using a colormap for implicit_plot3d last December, almost a year ago, and it is still open. @schilly did show how to use matplotlib colormaps for plot3d
though, and it's pretty cool:
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)
sage: p.show(aspect_ratio=(1,1,1), figsize=[7,3])
And, as @Jason Grout said, you can see all of the available colormaps with colormaps.keys()
.
If you do figure out some way to use colormaps with implicit 3d plots, I would love to hear about it!
3 | No.3 Revision |
I asked a similar question about using a colormap for implicit_plot3d almost a year ago, and it is still open. @schilly did show how to use matplotlib colormaps for plot3d
though, and it's pretty cool:
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)
sage: p.show(aspect_ratio=(1,1,1), figsize=[7,3])
And, as @Jason Grout @Jason-Grout said, you can see all of the available colormaps with colormaps.keys()
.
If you do figure out some way to use colormaps with implicit 3d plots, I would love to hear about it!
4 | trying to get usernames right! |
I asked a similar question about using a colormap for implicit_plot3d almost a year ago, and it is still open. @schilly did show how to use matplotlib colormaps for plot3d
though, and it's pretty cool:
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)
sage: p.show(aspect_ratio=(1,1,1), figsize=[7,3])
And, as @Jason-Grout @jason-grout said, you can see all of the available colormaps with colormaps.keys()
.
If you do figure out some way to use colormaps with implicit 3d plots, I would love to hear about it!