# Combine output of several functions on the same interactive plot

**URL:** https://discourse.julialang.org/t/combine-output-of-several-functions-on-the-same-interactive-plot/96972
**Category:** Visualization
**Tags:** plotting, glmakie
**Created:** [April 2, 2023, 3:35pm UTC](https://discourse.julialang.org/t/combine-output-of-several-functions-on-the-same-interactive-plot/96972 "2023-04-02T15:35:27Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![ittomsk](https://avatars.discourse-cdn.com/v4/letter/i/a87d85/32.png) [@ittomsk](https://discourse.julialang.org/u/ittomsk)
#### Post date: [April 2, 2023, 3:35pm UTC](https://discourse.julialang.org/t/combine-output-of-several-functions-on-the-same-interactive-plot/96972/1 "2023-04-02T15:35:27Z")

</div>

I need to add some lines on top of the agent’s polygon to represent its properties. However, I am currently stuck at grouping the output of two functions in the following line: `Group([agent_poly, agent_orientation])` .

```julia
const animal_shape = Polygon(Point2f[(-0.5, -0.5), (1, 0), (-0.5, 0.5)])

function draw_animal(live::Object)
     φ = atan(live.orientation_matrix[2], live.orientation_matrix[1])
     agent_poly = scale(rotate2D(animal_shape, φ), live.weight/15)

     agent_orientation = lines([Point2f(0, 0), Point2f(live.orientation_matrix[1], live.orientation_matrix[2])])

     Group([agent_poly,agent_orientation])
end

GLMakie.activate!()

fig, abmobs = abmexploration(model;
     agent_step! = life!, model_step! = dummystep,
     am = draw_animal,
     ac=:blue,
     )

display(fig)

```

How do i do it the right way?
