1

In the Julia programming language, I know I can plot a surface with the "Plots" package using the command:

plot(x,y,z, st = :surface)

My question is this: instead of the colors on the surface indicating the z-value, can I make the colors indicate the values of some arbitrary function f(x,y,z) of the points on the surface? (the case f(x,y,z) = z would be the default behavior).

Nick
  • 499
  • 5
  • 13
  • 1
    Which plotting package is this? Have you looked at the documentation for that package? – David P. Sanders Jul 28 '16 at 08:29
  • 1
    It's the "Plots" package. I have looked at the documentation, and it looks like the "zcolor" argument does what I want, but only for scatterplots (or maybe only 2D graphs) – Nick Jul 28 '16 at 13:53
  • Good question, I suggest you open an issue at the `Plots.jl` repository (and cross-reference to this question). – David P. Sanders Jul 28 '16 at 15:35
  • I found a solution for Matlab/Octave...but still not for Julia. You can use the "isosurface" function, and supply a 3d array of values of my function "f" as an argument after all the main arguments. – Nick Jul 28 '16 at 15:43
  • 1
    http://stackoverflow.com/questions/36925356/julia-pyplot-plot-3d-surface-with-as-face-colors-the-norm-of-surface-gradient/36928417#36928417 – Tom Breloff Jul 28 '16 at 17:56
  • @TomBreloff: I saw the thread you linked to. It doesn't work for me. When I type in that code verbatim, I get an error: "ERROR: MethodError: `py_colormap` has no method matching py_colormap(::ColorTypes.RGBA{Float64}, ::Float64)" – Nick Jul 28 '16 at 18:06

0 Answers0