Quantcast
Channel: First steps - JuliaLang
Viewing all articles
Browse latest Browse all 2795

Outdated example for Plots'"surface" command

$
0
0

@TheLateKronos wrote:

When I type “?surface” into the REPL, I get the following:

...
 Example
  ≡≡≡≡≡≡≡≡≡
julia> x = y = range(-3, 3, length = 100)
julia> surface(x, y, (x, y) -> sinc(norm([x, y])))

This example generates the following error:
“UndefVarError: norm not defined”

Changing it to hypot does not help, because of some other error. The example is obviously outdated.

Is there someone who could easily fix this? It really does a lot to the feeling about the possibilities of getting help in Julia when the example does not work.

A working replacement is :

julia> x = y = range(-3, 3, length = 100)
julia> surface(x, y, (x, y) -> sin(x)*sin(y))

Posts: 5

Participants: 3

Read full topic


Viewing all articles
Browse latest Browse all 2795

Trending Articles