(Sorry the previous email I forget to attach the plot file. I would delete it in the google mailgroup.) The original discussion is here:http://groups.google.com/group/sage- support/browse_thread/thread/3f4ad882ba420693?hl=en. However, since the discussion seems closed I can't reply to it so I just opened this another discussion. I'm using sage4.7.1 and running it on ubuntu 11.04. I tried to create a branch for sage and patch this: http://trac.sagemath.org/sage_trac/ticket/9491 and it seems worked since sagenb will not complain about the unknown argument 'opacity' after that but patching procedure reported: {{{ Hunk #1 FAILED at 119 Hunk #2 FAILED at 146 Hunk #3 FAILED at 167 Hunk #4 FAILED at 179 4 out of 4 hunks FAILED -- saving rejects to file sage/plot/ contour_plot.py.rej abort: patch failed to apply }}}
The region_plot works well to fill some area with color and
transparent to axis and lines but it fails for points. For my example:
{{{
c1 = line([[5,8],[7,0]])
c2 = line([[-1,7],[7,5]])
c3 = line([[-1,-2],[6,5]])
f = [()]
g = [()]
for i in range(8):
for j in range(8):
if (4*i+j<=28)&(i+4*j<=27)&(i-j<=1):
f.append((i,j))
else:
g.append((i,j))
f.pop(0)
g.pop(0)
c = line([[0,0],[2,5]])
var('x y')
r1=region_plot(max(x+4*y-28,x-y-1)<=-.5,(x,0,6),(y,
0,5),incol='lightblue',borderwidth=0,opacity=0.5)
r1+=point(f,rgbcolor=[1,0,0])+plot(c1)+plot(c2)+plot(c3)+point(g)
r1.show()
}}}
The points in the area of region_plot are covered by the region_plot.
I'm not sure whether I failed to patch it or the patch indeed fails to
work for points. Thx.
--
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org
points.pdf
Description: Adobe PDF document
