Passing graphics objects

15 views
Skip to first unread message

steven.v....@gmail.com

unread,
Mar 24, 2014, 4:58:04 PM3/24/14
to sage-s...@googlegroups.com
I want to create a plot by traversing a tree where some leaves of the data structure add line segments. I am trying to pass one graphics object to a function that adds a line segment to the graphics object. I assumed the graphics object is passed by reference so that changes inside the function would affect the original graphics object. However, that is not the case. How can one build up a graphics object via function calls?

kcrisman

unread,
Mar 24, 2014, 9:18:14 PM3/24/14
to sage-s...@googlegroups.com
Hi!  Can you give a more explicit example of what you'd like to have happen?


I want to create a plot by traversing a tree where some leaves of the data structure add line segments. I am trying to pass one graphics object to a function that adds a line segment to the graphics object. I assumed the graphics object is passed by reference so that changes inside the function would affect the original graphics object. However, that is not the case. How can one build up a graphics object via function calls?

I'm wondering, since you just want to add, whether you could just use the + operator for this?  But I may be misunderstanding this.

- kcrisman 
Reply all
Reply to author
Forward
0 new messages