Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Hello, @ivaralink! Indeed, the solution you pose in your own comment is correct, albeit not stylistically elegant. Superimposing plots can be achieved by "adding" them. However, doing so in one command is considered a poor programming practice. I would recommend doing the following:

P1 = implicit_plot(eq1, (x,-2,5), (y,-2,5))
P2 = implicit_plot(eq2, (x,-2,5), (y,-2,5))
show(P1 + P2)

Even better, you can use the += composite operator:

P = implicit_plot(eq1, (x,-2,5), (y,-2,5))
P += implicit_plot(eq2, (x,-2,5), (y,-2,5))
P.show()

(Alternatively, this last line can also be show(P).)

I recommend you read the 2D plotting documentation. Also, if you are beginner, I recommend you this book by Gregory Bard.

I hope this helps!

Hello, @ivaralink! Indeed, the solution you pose in your own comment is correct, albeit not stylistically elegant. Superimposing plots can be achieved by "adding" them. However, doing so in one command is considered a poor programming practice. I would recommend doing the following:

P1 = implicit_plot(eq1, (x,-2,5), (y,-2,5))
P2 = implicit_plot(eq2, (x,-2,5), (y,-2,5))
show(P1 + P2)

Even better, you can use the += composite operator:

P = implicit_plot(eq1, (x,-2,5), (y,-2,5))
P += implicit_plot(eq2, (x,-2,5), (y,-2,5))
P.show()

(Alternatively, this last line can also be show(P).)

I recommend you read the 2D plotting documentation. Also, if you are beginner, I also recommend you read this book by Gregory Bard.Bard, which can be downloaded for free..

I hope this helps!