Plot inequality using sympy

How to plot this inequality in sympy? I did other inequations and dont have this problem. Also this works pretty neat in python with plot_implicit

    @syms x, y;
    ineq = Ge(x + 2y, 5);
    @info ineq;
    w = solve(ineq, y);

    @info w;
    plot(ineq)
118 is not a Function, or is not defined at any of the values [-5.0, -1.0, 0.0, 0.01]

error(::String)@error.jl:35
tryrange(::SymPy.var"#118#119"{SymPy.var"###391"}, ::Vector{Float64})@adapted_grid.jl:183
macro expansion@user_recipe.jl:228[inlined]
apply_recipe(::AbstractDict{Symbol, Any}, ::SymPy.var"#118#119"{SymPy.var"###391"})@RecipesBase.jl:300
_process_userrecipes!(::Any, ::Any, ::Any)@user_recipe.jl:38
recipe_pipeline!(::Any, ::Any, ::Any)@RecipesPipeline.jl:72
_plot!(::Plots.Plot, ::Any, ::Any)@plot.jl:223
var"#plot#186"(::Base.Pairs{Symbol, V, Tuple{Vararg{Symbol, N}}, NamedTuple{names, T}} where {V, N, names, T<:Tuple{Vararg{Any, N}}}, ::typeof(RecipesBase.plot), ::Any)@plot.jl:102
plot(::Any)@plot.jl:93
top-level scope@Local: 8[inlined]

If you have PyPlot installed, I believe sympy.plot_implicit (Plotting - SymPy 1.11 documentation) might be helpful. Here you are bumping into the fact there is no default plot method for equations in SymPy, just symbolic expressions of a single indeterminate.

1 Like