JuliaPlots / Plots.jl

Powerful convenience for Julia visualizations and data analysis
https://docs.juliaplots.org
Other
1.84k stars 354 forks source link

surface plot with surface color specification? #612

Closed BoundaryValueProblems closed 7 years ago

BoundaryValueProblems commented 7 years ago

I am wondering whether I can plot a 3D surface with its color specified by the 4th input argument rather than its color representing the heights (or z values). The surf function of MATLAB does just this. This is particularly important if we want to display a complex-valued function with the height representing its real components and the color representing its imaginary components. It looks to me that matplotlib could do it using the attribute facecolors. So, Plots.jl should be able to do this in principle. See also the discussion https://github.com/JuliaPy/PyPlot.jl/issues/91 Thanks! BVPs

BoundaryValueProblems commented 7 years ago

Here's more discussion on how to use facecolors in matplotlib: http://stackoverflow.com/questions/25023075/normalizing-colormap-used-by-facecolors-in-matplotlib I hope that Plots.jl soon will be able to handle the facecolors attribute.

BoundaryValueProblems commented 7 years ago

I just want to report my progress. It is now possible to do what I wanted to do using plot_surface function in PyPlot. See my discussion at https://github.com/JuliaPy/PyPlot.jl/issues/264 Yet, I really want to do the same in the Plots.jl level rather than directly using PyPlot. I woud appreciate it if you could suggest the next step to fully incorporate in Plots.jl. Best, BVPs