Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plots do not appear when executed plot_implicit() #238

Open
jmarcellopereira opened this issue Sep 16, 2018 · 1 comment
Open

Plots do not appear when executed plot_implicit() #238

jmarcellopereira opened this issue Sep 16, 2018 · 1 comment

Comments

@jmarcellopereira
Copy link

Plots do not appear when executed:

p = plot_implicit(Or(Eq(f3(x, y), 0), Eq(f4(x, y), 0)), (x, -5, 5), (y, -5, 5));

Only one plot is shown.

@jverzani
Copy link
Collaborator

Hmm, this may be a SymPy bug. I think the following (from https://docs.sympy.org/latest/modules/plotting.html) bypasses any SymPy.jl features, and there is still the issue:

@vars x y
plot_implicit(sympy[:Or](sympy[:Ge](y,x), sympy[:Ge](y,-x)));

If you are using Plots, there are two other alternatives. One is ImplicitEquations, which would be called like:

using ImplicitEquations
IE = ImplicitEquations
f3(x,y) = y - x; f4(x,y) = y + x
plot(IE.Ge((f3, 0) | IE.Ge(f4,0))

If you want to use expressions, this pattern can work:

plot(IE.Ge(lambdify(y-x,[x,y]), 0) | IE.Ge(lambdify(y+x,[x,y]),0))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants