Plotting Implicit Functions using ImplicitEquations.jl

julia> using ModelingToolkit; @variables x y;

julia> f(x,y)= sqrt((x^2+144)+(y^2+144))
f (generic function with 1 method)

julia> let ex = Differential(x)(f(x, y))
           func_ex = build_function(expand_derivatives(ex), x, y)
           @eval ∂xf(x, y) = ($func_ex)(x,y)
       end
∂xf (generic function with 1 method)

julia> using Plots, ImplicitEquations

julia> plot(∂xf ⩵ 0.1, xlims=(0, 10), ylims=(-100, 100))

produces

Screen Shot 2020-11-06 at 3.44.22 PM

In the future, people will have an easier time helping you if you actually show the code that produces the error. It’s a lot harder to help if we have to guess what you’re actually doing.

6 Likes