Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Plotting issue, number of arguments error

Hey all,

I have a question that's probably been asked before (tough I couldn't find it here)

I'm trying to plot these two functions of d. Area is a function of d and some other functions of d. I could swear I had this code working a few months ago but now I get the error:


*File "", line 1, in <module>

  File "/tmp/tmp0fBGGb/___code___.py", line 21, in <module>
    plot1 = plot(Area, R1-R2, limit, color='red')
  File "sage/symbolic/expression.pyx", line 4382, in sage.symbolic.expression.Expression.__call__ (build/cythonized/sage/symbolic/expression.cpp:24669)
  File "sage/symbolic/ring.pyx", line 760, in sage.symbolic.ring.SymbolicRing._call_element_ (build/cythonized/sage/symbolic/ring.cpp:8970)
ValueError: the number of arguments must be less than or equal to 1*

Does anyone have any ideas what this could be? (Using sageNB and 6.4.1)

var('x, y, z, R1, R2, d, a, s1, s2, Area, limit, Area2')



R1 = 6
R2 = 4


a = (1/d)*sqrt( (-d+R1+R2)*(d-R1+R2)*(d+R1-R2)*(d+R1+R2) )

s1 = (a + 2*R1)/2
s2 = (a + 2*R2)/2

limit = sqrt(R1**2 - (R2/2)**2) + (R1 - R2)


Area = [((R1**2)*arcsin(a/(2*R1))) - sqrt(s1*(s1-a)*((s1-R1)^2)) + (R2**2)*(pi - arcsin(a/(2*R2))) + sqrt(s2*(s2-a)*((s2-R2)**2))]

plot1 = plot(Area, R1-R2, limit, color='red')


Area2 = ((R1**2)*arcsin(a/(2*R1))) - sqrt(s1*(s1-a)*((s1-R1)^2)) + (R2**2)*(arcsin(a/(2*R2))) - sqrt(s2*(s2-a)*((s2-R2)**2))

plot2 = plot(Area2, limit, R1+R2, color='green')
show(plot1)

Plotting issue, number of arguments error

Hey all,

I have a question that's probably been asked before (tough I couldn't find it here)

I'm trying to plot these two functions of d. Area is a function of d and some other functions of d. I could swear I had this code working a few months ago but now I get the error:


*File "", line 1, in <module>

  File "/tmp/tmp0fBGGb/___code___.py", line 21, in <module>
    plot1 = plot(Area, R1-R2, limit, color='red')
  File "sage/symbolic/expression.pyx", line 4382, in sage.symbolic.expression.Expression.__call__ (build/cythonized/sage/symbolic/expression.cpp:24669)
  File "sage/symbolic/ring.pyx", line 760, in sage.symbolic.ring.SymbolicRing._call_element_ (build/cythonized/sage/symbolic/ring.cpp:8970)
ValueError: the number of arguments must be less than or equal to 1*

Does anyone have any ideas what this could be? (Using sageNB and 6.4.1)

var('x, y, z, R1, R2, d, a, s1, s2, Area, limit, Area2')



R1 = 6
R2 = 4


a = (1/d)*sqrt( (-d+R1+R2)*(d-R1+R2)*(d+R1-R2)*(d+R1+R2) )

s1 = (a + 2*R1)/2
s2 = (a + 2*R2)/2

limit = sqrt(R1**2 - (R2/2)**2) + (R1 - R2)


Area = [((R1**2)*arcsin(a/(2*R1))) - sqrt(s1*(s1-a)*((s1-R1)^2)) + (R2**2)*(pi - arcsin(a/(2*R2))) + sqrt(s2*(s2-a)*((s2-R2)**2))]

plot1 = plot(Area, d, R1-R2, limit, color='red')


Area2 = ((R1**2)*arcsin(a/(2*R1))) - sqrt(s1*(s1-a)*((s1-R1)^2)) + (R2**2)*(arcsin(a/(2*R2))) - sqrt(s2*(s2-a)*((s2-R2)**2))

plot2 = plot(Area2, d, limit, R1+R2, color='green')
show(plot1)