Color for implicit plot region

36 views
Skip to first unread message

Dominique Laurain

unread,
May 11, 2014, 3:49:01 AM5/11/14
to sage-s...@googlegroups.com
Implicit plot (2D) in cell sagews worksheet.

Region of  first circle (function f1) is not red colored. Is there any explanation I missed ?

I checked before posting in SAGE help ("Contour plots") : parameter color is for the "plot color" but in case of region (fill = true), I believed color  would be applied to the plot (the border) or the region.

f1(x,y) = x^2 + y^2 - 2
f2(x,y) = (x-3)^2 + y^2 - 2
t1 = implicit_plot(f1, (-3, 6), (-3, 3),fill=True,color="red")
t2 = implicit_plot(f2, (-3, 6), (-3, 3),fill=False,color="red")
(t1+t2).show()

Dominique.

PS: not to simple, to doctest  "visual results" (request for library of bitmap files as doctest results ; use UNIX cmp to compare ; image results can be displayed by toggle button in SAGE help webpages)

P Purkayastha

unread,
May 11, 2014, 4:48:41 AM5/11/14
to sage-s...@googlegroups.com
Seems to be a bug with implicit_plot which seems incomplete in the way it handles colors. For now, a workaround is the following (since your f1 and f2 are symbolic expressions):

t1 = implicit_plot(f1, (-3, 6), (-3, 3),fill=True,incol="red")

I have opened http://trac.sagemath.org/ticket/16325 to track this.

Dominique Laurain

unread,
May 11, 2014, 6:02:17 AM5/11/14
to sage-s...@googlegroups.com
Thanks for all (the answer and the track ticket)... :-)

P Purkayastha

unread,
May 11, 2014, 7:12:08 AM5/11/14
to sage-s...@googlegroups.com
Patch is up for review :)
Reply all
Reply to author
Forward
0 new messages