Ask Your Question
0

'Graphics' object is not callable

asked 3 years ago

CyrilleP gravatar image

updated 3 years ago

tmonteil gravatar image

Sorry to ask anonymously a question but I cannot recover my account (...@...). . Why

var("x_2 z")
sol1=solve(4*x_1+ 3*x_2==z,x_2)
show(sol1)
obj1=sol1[0].substitute(z=10).rhs()
show(obj1)
plot(obj1,(x_1,0,100))

leads to 'Graphics' object is not callable ?

Preview: (hide)

Comments

Apart from the fact that i have to add some var("x_1"), it works well for me.

tmonteil gravatar imagetmonteil ( 3 years ago )

1 Answer

Sort by » oldest newest most voted
1

answered 3 years ago

rburing gravatar image

updated 3 years ago

Probably you have accidentally used plot (or solve or show) as the name of a variable in a piece of code that you didn't include here, so that the name no longer refers to the built-in function.

So don't use that name for your variable.

Preview: (hide)
link

Comments

Thanks. I feel so stupid.

CyrilleP gravatar imageCyrilleP ( 3 years ago )

Don't worry, it happens to the best of us. You can also use from sage.plot.plot import plot to get the usual plot back in an active session. To discover that statement I used import_statements("plot").

rburing gravatar imagerburing ( 3 years ago )

Your Answer

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

Add Answer

Question Tools

Stats

Asked: 3 years ago

Seen: 1,320 times

Last updated: Oct 29 '21