Hi folks, With a function say f(x) = sin(x), one can fill the area between f and a horizontal line y=c using the "fill" option of function plot(). To get the desired effect, do I do this
fill=c # a numeric value, as suggested by http://www.sagemath.org/doc/reference/sage/plot/plot.html#sage.plot.plot.plot or this? fill="c" # a numeric value as a string For example, the commands [1] sage: plot(sin(x), xmin=-2*pi, xmax=2*pi, fill="0.5") and [2] sage: plot(sin(x), xmin=-2*pi, xmax=2*pi, fill=0.5) produce two completely different plots with different areas shaded. Command [1] is the one that produces what one would expect, i.e. filling the area between sin(x) and the horizontal line y=0.5. The same problem occurs when the value of fill is a dictionary: sage: plot([sin(x), cos(x)], xmin=-2*pi, xmax=2*pi, fill={0: "0.5"}) sage: plot([sin(x), cos(x)], xmin=-2*pi, xmax=2*pi, fill={0: 0.5}) sage: plot([sin(x), cos(x)], xmin=-2*pi, xmax=2*pi, fill=dict([(0, "0.5")])) sage: plot([sin(x), cos(x)], xmin=-2*pi, xmax=2*pi, fill=dict([(0, 0.5)])) -- Regards Minh Van Nguyen --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to sage-devel@googlegroups.com To unsubscribe from this group, send email to sage-devel-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URLs: http://www.sagemath.org -~----------~----~----~----~------~----~------~--~---