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, which can be downloaded for free..
I hope this helps!
The best i can find is:
show(implicit_plot(eq1,(x,-2,5),(y,-2,5)) + implicit_plot(eq2,(x,-2,5),(y,-2,5)))
But it sould be possible to do it shorter, should't it?
Since
plot
can plot either a function or a list of functions, it is indeed a bit surprising thatimplicit_plot
only accepts one equation, and not a list of equations. But that's how it is at this point!Strange as it may seem , i checked the documentation and the parameters correspond to the documentation. Strange but correct, there probably is a reason.
Do you mean this example is from the documentation and it fails? Can you say what page?
Bi, i mean that according to the documentation plot takes a collection of objects and implicit_plot only takes a function. The difference is strange