Created
March 2, 2025 16:02
-
-
Save arvsrao/11c3dfae9e301de0cee8ac63a43c45b3 to your computer and use it in GitHub Desktop.
a script for ploting multiple implicitly defined functions on the same plot.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from sympy import plot_implicit, symbols, Eq, And | |
x, y = symbols('x y') | |
p1 = plot_implicit(Eq(x - y, 0), (x, -5, 5), (y, -5, 5), show=False, line_color='blue', linewidth=1000) | |
p2 = plot_implicit(Eq(x + y, 0), (x, -5, 5), (y, -5, 5), show=False, line_color='red', linewidth=55) | |
p3 = plot_implicit(Eq(y, 1), (x, -5, 5), (y, -5, 5), show=False, line_color='green', linewidth=1000) | |
#p3 = plot_implicit(Eq(2*x - y, 0), (x, -5, 5), (y, -5, 5), show=False, line_color='green', linewidth=1000) | |
p1.append(p2[0]) | |
p1.append(p3[0]) | |
p1.show() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The plot generated by this script is shown below and can also be seen on my blog