First time here? Check out the FAQ!

Ask Your Question
2

implicit_plot plot of a list

asked 6 years ago

JC gravatar image

Hello,

On Sage 8.5, Release Date: 2018-12-22, I am doing

var('x,y')

F1 =plot([k/x for k in [-5..5]], (-5, 5), ymin=-5, ymax = 5, detect_poles=True, color="red")

F2= implicit_plot([y^2 - x^2 -c for c in [-5..5]], (x,-5,5), (y,-5,5))

to obtain two families of orthogonal curves. While the first family is ok, there seems to be a problem with the second one.

I can circunvent my problem by doing a lis of plots (instead of the plot of a list), as follows :

[implicit_plot(y^2 - x^2 -c ==0, (x,-5,5), (y,-5,5), color="blue" ) for c in [-5..5]]

I was expecting that plot(...) and implicit_plot(...) would beheave in the same manner in this situation. Why this is not the case? Am I missing something in the syntax?

Regards, JC

Preview: (hide)

Comments

1

Indeed the interfaces are not consistent (but the documentation is clear: for implicit_plot it states that only one function/equation is accepted). It would be better if they were consistent. This was also requested in trac ticket #14526 six years ago.

rburing gravatar imagerburing ( 6 years ago )

1 Answer

Sort by » oldest newest most voted
2

answered 6 years ago

parzan gravatar image

updated 6 years ago

It seems that implicit_plot is not happy about receiving a list of functions. You can do this:

F2=sum([implicit_plot(y^2 - x^2 -c ==0, (x,-5,5), (y,-5,5), color="blue" ) for c in [-5..5]])

which should work for the purpose of displaying or saving the plot.

Preview: (hide)
link

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 6 years ago

Seen: 819 times

Last updated: Jan 27 '19