Ask Your Question

Add legend to implicit_plot for different parameter values

asked 2017-12-22 00:54:19 +0200

flucoe gravatar image

Hi, I want to add a legend to an implicit plot, to plot the same function for different parameter values. I can plot the functions but the legend is not displayed. Is it possible to do it?

var('x y z')
xrange = (x,0,2)
yrange = (y,0,2)
g1 = implicit_plot(x**3-2*x+y**2==z,xrange,yrange,color='red',legend_label='g1')
g2 = implicit_plot(x**3-2*x+y**2==z,xrange,yrange,color='blue',legend_label='g2') 
g = g1+g2
g.legend(True)'upper right',frame=True)
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2017-12-28 19:08:50 +0200

eric_g gravatar image

Unfortunately, this is a known bug: labels of implicit plots are not displayed. The bug is reported as ticket #15903 on Sage Developer Trac, but it has not been corrected yet.

edit flag offensive delete link more


Thanks for the information

flucoe gravatar imageflucoe ( 2018-01-03 05:17:21 +0200 )edit

Your Answer

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

Add Answer

Question Tools


Asked: 2017-12-22 00:54:19 +0200

Seen: 1,139 times

Last updated: Dec 28 '17