Ask Your Question

Display a graphics object with multiple primatives

asked 2018-04-20 15:02:29 -0500

ionsme gravatar image

I'm trying to show how a set of lines changes with a matrix transformation. The part i am having trouble with is:


 for c in range(10):

     g.add_primitive(parametric_plot(B*vector([x,c])  , (x, 0, 2*pi)))  


Because it doesn't plott the lines like i wanted but instead gives me

'Graphics' object has no attribute 'options'

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2018-04-20 18:53:09 -0500

Emmanuel Charpentier gravatar image

You don't say what is $B$.

Assuming that $B$ is some 2x2 matrix, the followig WorksForMe(TM) :

sage: g=Graphics()
sage: B=matrix([[1,2],[3,4]])
sage: for c in range(10):g+=parametric_plot(B*vector([x,c]),(x,0,2*pi))
Launched png viewer for Graphics object consisting of 10 graphics primitives


edit flag offensive delete link more


yes, B is a matrix, but why doesn't my code work?

ionsme gravatar imageionsme ( 2018-04-22 17:19:11 -0500 )edit

yes, B is a matrix, but why doesn't my code work?

I am not sure that parametric_plot returns a graphic primitive... May be a bug.

Emmanuel Charpentier gravatar imageEmmanuel Charpentier ( 2018-04-27 23:04:21 -0500 )edit

Your Answer

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

Add Answer

Question Tools

1 follower


Asked: 2018-04-20 15:02:29 -0500

Seen: 30 times

Last updated: Apr 20